Skip to content

Instantly share code, notes, and snippets.

@nk952777
Last active January 27, 2017 17:55
Show Gist options
  • Save nk952777/259e2592be8a68bb89a08303a9a89e54 to your computer and use it in GitHub Desktop.
Save nk952777/259e2592be8a68bb89a08303a9a89e54 to your computer and use it in GitHub Desktop.
iptables settings
先匯出當前設定,避免玩壞無法還原
# iptables-save > iptables.backup
# iptables -F
# iptables -X
# iptables -Z
# iptables -A INPUT -i eth1 -p tcp --dport 80 -j ACCEPT
# /etc/init.d/iptables save
真的不小心玩壞了,就把先前匯出的設定檔匯入
# iptables-restore < iptables.backup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment