Subject: Re: Using ipnat with DHCP.
To: Laine Stump <>
From: Scott Bartram <>
List: current-users
Date: 11/12/1999 15:36:03
Laine Stump wrote:
> At 01:20 PM 11/12/99 -0500, Ted Lemon wrote:
> >I don't claim to know how this works, but it seems to work fine even
> >when the globally-routable IP address changes.
> It's having the IP address set to 0 that makes it work. As long as you
> reload the NAT rules any time the IP address changes, you're okay - ipnat
> changes to the address of the interface at the time the rule is
> loaded. I do the following any time my IP changes:
>         ipnat -F
>         ipnat -C
>         ipf -E
>         ipf -F a -f /etc/ipf.conf
>         ipnat -f /etc/ipnat.conf
> (I copied this verbatim from a demand-dial PPP setup I got out of a FAQ
> somewhere). I run this manually; I haven't put it into my dhclient script
> because my provider only changes my address if my cable modem fries and
> they install a new one (happened once already).

You don't have to do the reload anymore (at least for NAT). I don't remember
when it changed but I haven't done this on my router since at least
1.3.something. I use demand-dial to a dynamic IP provider.