Results 1 to 3 of 3
I am trying to follow the info on Getting IPTables to survive a reboot
eveything works untill I reboot but the script does not run when linux starts.
The article ...
- 08-22-2010 #1Just Joined!
- Join Date
- Sep 2003
- Posts
- 36
using a script at startup
I am trying to follow the info on Getting IPTables to survive a reboot
eveything works untill I reboot but the script does not run when linux starts.
The article says to create a script so ifupdown loads these rules on boot:
it put what I think is a symlink in if-upd but iptables still does not survive reboot.Code:echo "#!/bin/sh" > /etc/network/if-up.d/iptables echo "iptables-restore < /etc/firewall.conf" >> /etc/network/if-up.d/iptables chmod +x /etc/network/if-up.d/iptables
What am I doing wrong.
- 08-23-2010 #2Just Joined!
- Join Date
- Aug 2010
- Posts
- 89
An easy way is to put your iptables cmd in a bash scripts, let say in /usr/local/bin or whatever, make it executable (chmod +x) and just call it in /etc/rc.local
This will run your ruleset in the boot process, just after services (network, ...) will be started.
- 08-26-2010 #3Just Joined!
- Join Date
- Sep 2003
- Posts
- 36


Reply With Quote
