nftables je nástupce iptables s lepší syntaxí a výkonem.
nftables¶
nft add table inet filter nft add chain inet filter input { type filter hook input priority 0 \; policy drop \; } nft add rule inet filter input ct state established,related accept nft add rule inet filter input tcp dport { 22, 80, 443 } accept nft list ruleset
Firewalld¶
firewall-cmd –list-all firewall-cmd –add-service=http –permanent firewall-cmd –reload
Kdy co¶
- nftables — plná kontrola
- firewalld — jednodušší správa, RHEL
- iptables — legacy, migrujte
Migrujte na nftables¶
Pro nové projekty nftables nebo firewalld.