iptables设定的规则,掉电重启会清空。若需要保存,最好是使用iptables-save/restore配合重定向,示例如下:
iptables-save > /etc/network/iptables-config
iptables-restore < /etc/network/iptables-config
配置文件位置可根据需要更改,可将iptables-restore加入到开机自动执行的配置文件中。
iptables设定的规则,掉电重启会清空。若需要保存,最好是使用iptables-save/restore配合重定向,示例如下:
iptables-save > /etc/network/iptables-config
iptables-restore < /etc/network/iptables-config
配置文件位置可根据需要更改,可将iptables-restore加入到开机自动执行的配置文件中。
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。