noway2
September 20th, 2009, 12:20 PM
I was trying to configure a set of rules for IPTables that will load upon startup and I placed the "iptables-restore < /etc/iptables.rules" command in the rc.local script file. My problem is that placing the command in this file doesn't appear to have any effect.
From what I can tell, rc.local is called as part of the run level 2 init script as it is symbolically linked in as part of the rc2.d directory. From what I can tell rc.local is what causes Snort to execute and this does occur. The referenced script file does an if -x check to see if /etc/rc.local exists and from I can tell executes it if it does. So basically, I think it should be calling the script, but it doesn't appear to.
Does anybody have any ideas or suggestions?
I was able to work around the issue by placing the iptables-restore command in /etc/networking instead, but I am curious as to why it doesn't seem to work in rc.local.
From what I can tell, rc.local is called as part of the run level 2 init script as it is symbolically linked in as part of the rc2.d directory. From what I can tell rc.local is what causes Snort to execute and this does occur. The referenced script file does an if -x check to see if /etc/rc.local exists and from I can tell executes it if it does. So basically, I think it should be calling the script, but it doesn't appear to.
Does anybody have any ideas or suggestions?
I was able to work around the issue by placing the iptables-restore command in /etc/networking instead, but I am curious as to why it doesn't seem to work in rc.local.