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

Re: ipmasq and pon/poff questions

At 11:22 AM 11/15/00 +0000, Michael Boyd wrote:
>I think I might have answered my own question re getting ipmasq to
>recalculate the firewall rules when a connection is made or dropped.
>I spotted on a website last night that ipmasq gets started early in the
>boot sequence (init 2 I think) and so getting the rules recalculated
>when a connection is made 'updates' it.
>Can you confirm that I am right?

It depends on  exactly what you mean, especially what kind of connection you
mean. The ipmasq script can be re-run at any point to recalculate the
firewall rules, but it doesn't run itself -- something has to initiate it.

If you are using dhcpcd to get your address, it runs a script called
/etc/dhcpc/dhcpcd-if*.exe whenever it gets a new lease for interface if*.
The actual file name will be dhcpcd-eth0.exe, dhcpcd-eth1.exe, and the like,
depending on what interface is involved.

If you are using PPP (including PPPoE) to get your address, it runs the
programs contained in (or symlinked in) /etc/ppp/ip-up.d/ when the lease
address changes. Use this directory the same way you would use /etc/rc*.d/
to run scripts.

BTW, "init 2" is not "early in the boot sequence". It is a runlevel, and
only two runlevels get run during a normal boot/init process:

        single user: the script in /etc/rcS.d run in order
        default runlevel *: the scripts in /etc/rc*.d run in
                order [the usual default runlevel is 2]

"In order" means in ascii order, for the symlinks that begin with "S". On my
systems, ipmasq runs near the end of the runlevel-2 set of scripts.

------------------------------------"Never tell me the odds!"---
Ray Olszewski                                        -- Han Solo
Palo Alto, CA           	 	         ray@comarre.com        

Reply to: