Iptables

From Anthony Pastor Wiki Notes - Verba volant, scripta manent
Revision as of 15:37, 16 June 2015 by Anthoanthop (talk | contribs) (Created page with "To create persistent rules with iptables you could use the Debian/Ubuntu package: '''iptables-persistent''' apt-get update apt-get install iptables-persistent -y iptables-sa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

To create persistent rules with iptables you could use the Debian/Ubuntu package: iptables-persistent

apt-get update apt-get install iptables-persistent -y

iptables-save > /etc/iptables/rules.v4 ip6tables-save > /etc/iptables/rules.v6

After each reboot all rules will be restored automatically through an init-script. NB: The initscript is called: /etc/init.d/netfilter-persistent