个人工具
登录
查看“IptablesHowTo”的源代码 - Ubuntu中文
页面
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“IptablesHowTo”的源代码
来自Ubuntu中文
←
IptablesHowTo
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
=== Configuration on startup 开机自动加载配置 === Save your firewall rules to a file 先将防火墙规则保存到/etc/iptables.up.rules文件中 <pre><nowiki> # iptables-save > /etc/iptables.up.rules </nowiki></pre> Then modify the ''/etc/network/interfaces'' script to apply the rules automatically (the bottom line is added) 然后修改脚本/etc/network/interfaces,使系统能自动应用这些规则(最后一行是我们手工添加的)。 <pre><nowiki> auto eth0 iface eth0 inet dhcp pre-up iptables-restore < /etc/iptables.up.rules </nowiki></pre> You can also prepare a set of down rules and apply it automatically 当网络接口关闭后,您可以让iptables使用一套不同的规则集。 <pre><nowiki> auto eth0 iface eth0 inet dhcp pre-up iptables-restore < /etc/iptables.up.rules post-down iptables-restore < /etc/iptables.down.rules </nowiki></pre>
返回至
IptablesHowTo
。