ipchains start scripts

Rob Trahan robtrahan at yahoo.com
Sun Jun 23 12:34:12 PDT 2002

I installed recently installed ipchains and got it
working ok. Now I want to be 
able to run a script that would turn it on and off.
(BTW, I am currently behind 
a hardware firewall, so this is just practice).

I got it runnng by placing a file containing my simple
set of rules in /etc/rc.d
/init.d, names rc.firewall:


/sbin/ipchains -A input -s 0/0 -d 0/0 -i lo -j ACCEPT 
/sbin/ipchains -A input -s [my dns went here] 53 -d
0/0 -p udp -j ACCEPT
/sbin/ipchains -A input -s [my dns went here]  53 -d
0/0 -p udp -j ACCEPT 
/sbin/ipchains -A input -s 0/0 -d 0/0 -p tcp -y -j
REJECT --log
/sbin/ipchains -A input -s 0/0 -d 0/0 -p udp -j REJECT

I then added an empty file to
/etc/rc.d/rcsysinit.d/S49rc.firewall, which was a 
link to the file in /etc/rc.d/init.d.

In the ipchains HOWTO there is a script with cases
that allows you to turn ipchains on and off. 

My question is this: How can I incorperate something
like this, and if it requir
es an argument like /pathtoscript/script start, how
does it get started on boot?

My basic problem is that I don't understand how the
boot scripts all relate to o
ne another. inittab to rcsysint.d to /etc/sysconfig
files to init.d to the runle
vel scripts. 

If anyone could point me in a direction or shed some
light I would be greatful. 

Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-security' in the subject header of the message

More information about the lfs-security mailing list