Firewalls
Linux filters packets in the kernel (netfilter). You'll meet three front-ends:
| Tool | Distro | Example |
|---|---|---|
firewalld | RHEL/Fedora | firewall-cmd --add-service=http --permanent |
ufw | Ubuntu/Debian | ufw allow 22/tcp |
iptables/nftables | Low-level, all | iptables -A INPUT -p tcp --dport 22 -j ACCEPT |
firewalld (RHCSA):
$ firewall-cmd --permanent --add-service=https
$ firewall-cmd --reload
$ firewall-cmd --list-all
ufw (Ubuntu):
$ ufw allow 22/tcp
$ ufw enable
$ ufw status verbose
Exam trap: In firewalld, changes need--permanentand a--reloadto survive; without--permanentthey're lost on reload/reboot.