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

Re: DHCP Clients/server and Debians IPMasq package



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 01 March 2002 19:19, Simon Higgs wrote:
> [Also posted to linux.debian.user]
>
> I have an old 486 which i'm using as a 'broadband router' for my cable
> service. It has3 nic's. One connects to the cable modem, and obtains
> it's IP via DHCP. The box also runs a DHCP server, which allocates
> IP's to the other two nic's.(192.168.1.0/24 and 192.168.2.0/24)
> Finally I have the IPMasq package which I am using as a start point
> for the firewall.
> Although my (isp) allocated IP has only changed during re boots of the
> router, it is a dynamic service.
> This surely will break the ipchains ruleset produced by IPMasq?
> How would I ensure '/etc/init.d/ipmasq restart' is run if my IP
> changes?
>

Your dhcp client should have a way to run a command every time the ip changes 
or is renewed. For dhclient (pump and dhcpcd didn't work well with my ISP) 
it's /etc/dhclient-enter-hooks. Be sure to check if the IP has really changed 
or if it's just a license renewal. You don't want to be reseting your 
firewall every ~30 minutes.

> TIA, Simon.

Pedro Corte-Real.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8f/qb2SBo0jBmgGARAgNLAKDbKuYUy7zxqEhOWYbshHVEVGJRZACfe4W3
ALkH4HD3OOeunz9L/40bP+w=
=sueT
-----END PGP SIGNATURE-----



Reply to: