IP Chains fire up script
Hi folks. Can you help me out with this one?
I want to fire up my ipchains set up when my machine boots. I am
running IP Masq and I get my internet connection via DHCPCD. My second
ethernet card in my MASQ machine is set up using the
/etc/network/interfaces as below
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/netbase/examples for more information.
#
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
# iface lo inet loopback
And is fired up at boot by the init script 'netstd_misc' by the rc2.d
symbolic link 'S30netsd_misc'.
My question lies with firing up my DHCPCD daemon on boot by init script
'dhcpcd' by rc2.d symbolic link 'S13dhcpcd'. The IP Masquerade HOWTO
tells me that a niffty way to fire up my ipchains set up which is on my
dhcpcd connection is by using one of the following methods:
Older versions used syntax like:
# dhcpcd -c /etc/rc.d/ipchains.rc eth0
#
# Newer versions use syntax like:
# dhcpcd eth0 /etc/rc.d/ipchians.rc
Looking at /etc/init.d/dhcpcd I see the following section of the
script:
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile \
/var/run/$NAME-$IFACE.pid --exec $DAEMON -- $OPTIONS
$IFACE
echo "$NAME."
Does this mean if I set 'OPTIONS=-c /etc/rc.d/ipchains.rc' or just
'OPTIONS=/etc/rc.d/ipchains.rc' my ipchains set up will be loaded at
boot. Can I set the $OPTIONS variable in the /etc/dhcpc/config file
given that the $IFACE variable is set in this file as well.
Your comments and help will be greatly appreciated.
MTY
Reply to: