There is no need to do the restart. do this is: sudo bash -c "iptables-save > /etc/ iptables/rules" This command makes changes in real time. #!/bin/bash #blah blah run some commands to get the IP start #redhat based servers like centos /etc/init.d/cron start #debian to enter full path of IPTABLES command if your rules aren't added to /etc/sysconfig/iptables. Iptables command is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel. You must run command as per. These can be saved in a file with the command iptables-save for Older iptables -persistent versions (e.g. like those in Debian Squeeze) still do not support IPv6 rules. Additional information can also be found here RHEL 6. Well, how to fix the issue? iptables is part of the base system/install. iptables -L bash: iptables: command not found [email protected]:~$. The iptables command can pretty much only be usefully run as root, not as another user. So it is not in the default command search path for. iptables needs a root priviledges. Seems like you are trying to execute it as a normal user. so: sudo iptables. Also, check are iptables loaded in. Two of the most common uses of iptables is to provide firewall 8 -j ACCEPT # log iptables denied calls (access via 'dmesg' command) -A As IP-Tables are not persistent, they will be deleted ("flushed") with the next reboot. okay im trying to configure mah firewall using iptables but for some reason it keeps telling me the command cannot be found. i checked in my.