I am trying to restart iptables from within a shell script. I guess I am missing something very basic since I stripped the shell script down to just the iptables restart command yet still I am having problems.
What happens is that the iptabels starts the restart process but hangs at 'Unloaded iptables modules:'.
It will stay there forever until any key is pressed, after that it completes the restart.
my file test.sh looks like this
Code:
#!/bin/bash
/etc/init.d/iptables restart
The output looks like the following
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: mangle filter nat [ OK ]
Unloading iptables modules:
[ OK ]
Applying iptables firewall rules: [ OK ]
Loading additional iptables modules: ip_conntrack_netbios_n[ OK ]
I am using Centos 5.4 2.6.18-164.el5. I am executing the script as root