sammlung:nftables
Inhaltsverzeichnis
nftables
nftables ist der moderne Nachfolger von iptables und bietet eine einheitliche Syntax für Paketfilterung und NAT.
Merkmale
- Flexibler und effizienter als iptables
- Einfache Syntax, zentrale Konfiguration
Wichtige Befehle
sudo nft list ruleset sudo nft add rule inet filter input tcp dport 22 accept sudo nft delete rule inet filter input handle <handle>
Beispiel: Freigabe von FTP, HTTP und SSH (reboot-fest)
# Beispiel-Regeln in /etc/nftables.conf eintragen:
table inet filter {
chain input {
type filter hook input priority 0;
tcp dport {21,22,80} accept
}
}
# Regeln laden und beim Booten aktivieren:
sudo nft -f /etc/nftables.conf
sudo systemctl enable nftables
Weitere Informationen
sammlung/nftables.txt · Zuletzt geändert: von 127.0.0.1
