https://drive.google.com/file/d/12KMmIOUfDRMAax2w3xXzLjEB9S3EJhLk/view?usp=sharing
đź’ˇ Key Insight:
Firewalls implement defense in depth—even if one device is compromised, others stay protected.
| Feature | Firewalld (RHEL 8 Default) | iptables (Legacy) |
|---|---|---|
| Management | Dynamic (runtime changes) | Static (requires restart) |
| Configuration | Zones, Services, Rich Rules | Raw packet filtering rules |
| Interface | firewall-cmd, GUI, XML files |
Command-line only |
| Persistence | Automatic (--permanent) |
Manual save/restore |
| Use Case | Modern servers, dynamic environments | Legacy systems, custom rules |
⚠️ RHEL 8 Note:
Firewalld is default—iptables rules are managed through firewalld's backend.
# Remove if conflicting (rarely needed)
sudo dnf remove firewalld -y
# Install and enable
sudo dnf install firewalld -y
sudo systemctl enable --now firewalld
sudo systemctl status firewalld
# Verify running
firewall-cmd --state # Should return "running"
| Zone | Policy | Use Case |
|---|---|---|
public |
Default for untrusted networks | Internet-facing servers |
dmz |
Limited access to LAN | Public servers needing internal access |
internal |
Trusted internal network | Corporate LAN |
home |
Trustworthy home network | Home PCs |
drop |
All incoming dropped | Highly secure systems |
block |
All incoming rejected | Similar to drop but sends rejection |