[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: iptables script - where to put it?



There seems to be many ways to do this, but in our network we create a firewall script (similar to how you have done and we do a whole bunch more than just set iptables rules in it) and we stick it in /etc/init.d/if-up.d/. Then I add to the /etc/network/interfaces file to the public interface 'up /etc/init.d/if-up.d/firewall.sh'. Then whenever the interface is brought up our firewall script gets run. So far, after 4-5 years of this it works like a champ.

On Fri, Oct 10, 2008 at 1:42 PM, Mumia W.. <paduille.4061.mumia.w+nospam@earthlink.net> wrote:
On 10/10/2008 09:04 AM, tyler wrote:
Hi,

I'm trying to learn how to firewall my laptop. I think I've got an
appropriate, simple iptables script, but I can't figure out where to put
it. Google provides lots of conflicting advice. I think it's supposed to
go in /etc/init.d/? What do I need to do with this file to get it to run
every time I boot? The actual content is copied below.
[...]

/Etc/init.d/ is the right folder, but your script must be structured properly too. The script must respond to the commands "start," "stop" and "restart." For an example, see /etc/init.d/gdm.




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Brian J. Schrock

Reply to: