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?
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:
````[commands]
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](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-iptables-on-ubuntu-14-04)
If you are unable to restart the services in this way you can also try calling the init scripts directly: