您的位置:首页 > 其它

ubuntu下设置Iptables在重启后自动生效

2015-09-09 16:24 309 查看

save roles to a file

iptables-save /etc/iptables.roles

edit /etc/network/interfaces

vim /etc/network/interfaces

add:

pre-up iptables-restore < /etc/iptables.roles

done.

update:

pre-up
: 网卡启用前的动作

up
: 启用时候的动作

post-up
: 启用后的动作

pre-down
: 关闭前的动作

down
: 关闭时动作

post-down
: 关闭后动作
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: