Debian系统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