我在/ etc / network / interfaces中使用IPTABLES
pre-up iptables-restore /etc/firewall.txt
我尝试在Ubuntu上search/etc/init.d/iptables这样的东西,但似乎并不存在。所以如果我必须暂时停止IPTABLE以便系统pipe理员工作,那么我该怎么做?
iptables不是一个服务,而是一个内核的设施。 这就是为什么你不能阻止它。
如果你需要快速停止iptables,这是我的build议:
configuration你的iptables完成。
首先保存configuration: iptables-save > /etc/iptables.conf
刷新iptables,并将其configuration为“打开”:
保存“打开”规则集: iptables-save > /etc/open-iptables.conf
现在,只要你需要快速“禁用”iptables,就可以:
cat /etc/open-iptables.conf | iptables-restorecat /etc/open-iptables.conf | iptables-restore。
之后,使用以下命令重新启用iptables:
cat /etc/iptables.conf | iptables-restore
( iptables-restore < /etc/open-iptables.conf也可能工作;但是我读过其他地方, 有时它不工作)