Skip to content

Instantly share code, notes, and snippets.

@elvisw
Last active August 29, 2015 14:13
Show Gist options
  • Save elvisw/3d031bdf2309657ce423 to your computer and use it in GitHub Desktop.
Save elvisw/3d031bdf2309657ce423 to your computer and use it in GitHub Desktop.
iptables规则保存

#iptables规则保存(Debian) root身份登陆

iptables-save > /etc/iptables
touch /etc/network/if-pre-up.d/iptables
chmod +x /etc/network/if-pre-up.d/iptables
nano /etc/network/if-pre-up.d/iptables

iptables内容为

#!/bin/sh
/sbin/iptables-restore < /etc/iptables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment