I followed this tutorial to set up IP rules on ubuntu 12.04. Everything worked fine on setup -- but now I've made changes to the firewall that do not persist upon reboot. I do not understand why that is. Here is a demonstration of how I am using iptables-persistent. What am I doing wrong?
$ sudo service iptables-persistent start
* Loading iptables rules... * IPv4... * IPv6...
$ sudo iptables -L //shows a certain rule
$ iptables -D INPUT ... //command successfully drops the rule
$ sudo iptables -L //shows rule has been deleted
$ sudo service iptables-persistent restart
* Loading iptables rules... * IPv4... * IPv6... [ OK ]
$ sudo iptables -L //rule is back
iptables -D INPUT
rule isn't insudo
are you sure it's actually reporting a success? Does the behavior change if you do run it withinsudo
? – Bratchley Apr 21 '14 at 16:29sudo iptables-save
NOT permanently save iptables configurations. – Andrew Dec 15 '22 at 19:23