how to close iptables and reboot iptables on debian--wheezy?

  • Posted February 11, 2015

service iptables stop service iptables restart The two commands can’t work on my debian–wheezy ,how to close iptables and reboot iptables on debian–wheezy?


If you are unable to restart the services in this way you can also try calling the init scripts directly:

/etc/init.d/iptables stop

/etc/init.d/iptables restart

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

iptables is not a system service, but a single command. RedHat-based distros ship with an init script for convenience which allows you to save your iptables configuration, but this is not present on Ubuntu or Debian. You can get similar functionality by using iptables-persistent You can install it with:

sudo apt-get update
sudo apt-get install iptables-persistent

Then save your rules by running:

sudo service iptables-persistent save

And it flush your IPtables rules, effectively disabling your firewall, run:

sudo service iptables-persistent stop

While this article is targeted at Ubuntu, it applies to Debian as well. Check it out for more info on IPtables:

* [How To Set Up a Firewall Using Iptables on Ubuntu 14.04](