Debian系统iptables防火墙规则保存

in debian •  7 years ago  (edited)

#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
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!