|
| 1 | +--- |
| 2 | +title: Firewalld |
| 3 | +summary: A quick start guide to using firewalld on Solus |
| 4 | +--- |
| 5 | + |
| 6 | +# Firewalld |
| 7 | + |
| 8 | +firewalld provides a dynamically managed firewall with support for network or firewall zones to define the trust level of network connections or interfaces. It has support for IPv4, IPv6 firewall settings, and for Ethernet bridges, and a separation of runtime and permanent configuration options. It also provides an interface for services or applications to add `iptables` and `nftables` rules directly. |
| 9 | + |
| 10 | +## Firewalld on Solus |
| 11 | + |
| 12 | +To install firewalld on Solus, search for "firewalld" in GNOME Software or KDE Discover, or use the command line: |
| 13 | + |
| 14 | +```bash |
| 15 | +sudo eopkg install firewalld |
| 16 | +``` |
| 17 | + |
| 18 | +There are two optional packages that you can choose to install, as well: |
| 19 | + |
| 20 | +- `firewalld-config`: A graphical configuration program to configure your firewall setup. |
| 21 | +- `firewalld-applet`: A system tray icon to show the current firewall status. It works with any desktop that supports a system tray via StatusNotifier. |
| 22 | + |
| 23 | +### Configuring firewalld |
| 24 | + |
| 25 | +As of $SYNC_DATE, our firewalld package is [Stateless](/docs/user/software/configuration_files). These are the default configuration file locations for firewalld: |
| 26 | + |
| 27 | +| Package | Default Location | |
| 28 | +|------------------|----------------------------------------------------| |
| 29 | +| firewalld | `/usr/share/defaults/etc/firewalld/firewalld.conf` | |
| 30 | +| firewalld-applet | `/usr/share/defaults/etc/firewall/applet.conf` | |
| 31 | + |
| 32 | +To modify the firewall configuration manually, copy the default file to `/etc/firewalld/firewalld.conf` or `/etc/firewall/applet.conf`, and make your changes. If you want to use a graphical tool, install the `firewalld-config` package, and search for Firewall in your desktop's applications menu, or run `firewall-config` from the command line. |
| 33 | + |
| 34 | +By default, the graphical configuration tool only modifies the runtime configuration. After ensuring that your changes work, save the configuration to the permanent configuration by clicking "Options" in the top menu bar, and clicking "Runtime to Permanent". |
| 35 | + |
| 36 | +### Starting and stopping firewalld |
| 37 | + |
| 38 | +Please note that firewalld does NOT run on system boot by default. It needs to be manually started/configured to start automatically: |
| 39 | + |
| 40 | +```bash |
| 41 | +# Start firewalld manually |
| 42 | +systemctl start firewalld |
| 43 | + |
| 44 | +# Configure firewalld to start automatically on each boot and immediately start the service |
| 45 | +systemctl enable --now firewalld |
| 46 | + |
| 47 | +# Check whether firewalld is running |
| 48 | +systemctl status firewalld |
| 49 | + |
| 50 | +# Restart firewalld manually |
| 51 | +systemctl restart firewalld |
| 52 | + |
| 53 | +# Stop firewalld manually |
| 54 | +systemctl stop firewalld |
| 55 | + |
| 56 | +# Configure firewalld to not start automatically on each boot and immediately stop the service |
| 57 | +systemctl disable --now firewalld |
| 58 | +``` |
| 59 | + |
| 60 | +If installed, the firewall applet will start automatically when logging in to your desktop. |
0 commit comments