Skip to content

Instantly share code, notes, and snippets.

@eegrok
Created May 5, 2011 21:59
Show Gist options
  • Save eegrok/958060 to your computer and use it in GitHub Desktop.
Save eegrok/958060 to your computer and use it in GitHub Desktop.
how to save iptables
#on redhat based linux's
service iptables save
#on debian based linux's
#put the following 2 lines in your /etc/network/interfaces file
post-up iptables-restore < /etc/iptables.rules
post-down iptables-save > /etc/iptables.rules
# it'll then automatically save -- if you want to guard against a possible hard powerdown (power plug pulled, e.g.)
# you can manually save them then using
iptables-save > /etc/iptables.rules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment