restart iptables from shell script hangs unitl button is pressed
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 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 |
Just a dirty hack but can you try instead:
Code:
#!/bin/bash |
feinbein, I tried what you said, but it still hangs at unloading iptables modules.
I have noticed that this is something which is only relative to the boxes that I am working on, which is my test environment. Iptables restarts fine within my live environment, which uses centos 5.5 instead of centos 5.4, which is my test environemnt |
Do you really _need_ to unload the modules on stop?
|
What I _need_ to do is to restart the iptables.
doing that via the init script involves unloading the module. Is there another way to do this? |
All times are GMT -5. The time now is 02:19 AM. |