Created
May 5, 2011 21:59
-
-
Save eegrok/958060 to your computer and use it in GitHub Desktop.
how to save iptables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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