I use IPTABLES in /etc/network/interfaces
pre-up iptables-restore /etc/firewall.txt
I tried searching for some thing like /etc/init.d/iptables
on Ubuntu but that does not seem to exist.So if I have to stop IPTABLE for temporarily for sysadmin work how can I do that?
iptables
is not a service, but a facility inside the kernel. That is why you can't stop it.If you ever need to stop iptables quickly, here's my suggestion:
Configure your iptables to completion.
Save the configuration first:
iptables-save > /etc/iptables.conf
Flush the iptables, and configure it 'open':
iptables-save > /etc/open-iptables.conf
Now, whenever you need to quickly 'disable' iptables, do:
After that, 're-enable' iptables using:
(
iptables-restore < /etc/open-iptables.conf
might also work; but I've read somewhere else that sometimes it doesn't work )ADD: Newer versions of
iptables-restore
can directly read from a file. So the above commands can be simplified to:respectively.