Alejandro Muñoz Fernández Page

Firewalld firewall

Quick reference to install and configure Firewalld on a Debian system (largely applicable to Fedora as well).
This is mainly a simple personal cheat sheet for desktop environments.


1. Installation

sudo apt install firewalld

Optional: install the GUI (firewall-config):

sudo apt install firewall-config

2. systemd integration (auto-start)

Firewalld is managed through systemd, so it’s important to make sure it starts automatically.

Enable at boot:

sudo systemctl enable firewalld

Start it manually for the current session:

sudo systemctl start firewalld

Check full service status:

sudo systemctl status firewalld

Quick check (should return running):

sudo firewall-cmd --state

3. Zone configuration

Show default zone:

sudo firewall-cmd --get-default-zone

Change default zone. For a desktop connected to a trusted home network, home is usually the best choice:

sudo firewall-cmd --set-default-zone=home

4. Allowed services and ports

4.1. KDE Connect

On modern systems, KDE Connect is already defined as a service, so no need to open ports manually:

sudo firewall-cmd --zone=home --permanent --add-service=kdeconnect

Note: On older systems, if that fails, you can open the port range manually:

sudo firewall-cmd --zone=home --permanent --add-port=1714-1764/tcp
sudo firewall-cmd --zone=home --permanent --add-port=1714-1764/udp

4.2. Samba

To allow file sharing over the network:

sudo firewall-cmd --zone=home --permanent --add-service=samba

5. Apply changes

Whenever you make changes using --permanent, reload the configuration:

sudo firewall-cmd --reload

6. Useful checks

List full configuration of the active zone:

sudo firewall-cmd --list-all

List persistent rules:

sudo firewall-cmd --list-all --permanent

7. Notes

sudo systemctl status firewalld

Nothing fancy — just the basic setup I typically use on a desktop to get Firewalld working quickly.

Tags: