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

Re: Losing routing when dhcp client renews with new IP



Dennis Schoen wrote:

On Tue, Mar 27, 2001 at 08:20:15PM -0600, Perrier,Kent - PLANO wrote:

I have searched the archive at sigmasoft and I know I am probably
searching for the wrong key word, so I am asking here.  My OpenBSD
box is serving as a firewall/nat router.  My cable provider internet
service is provided by videon.  Everything works great until the
dhcp server renews my IP address lease with a different IP address.
At this point my ipnat rules don't work and I have to reboot in order
to get nat routing working again.

Is there a programatic way to fix this?

How about showing us your NAT Rules?

Sure. Here thay are:
[/home/kperrier]$ cat /etc/ipnat.rules # $OpenBSD: ipnat.rules,v 1.2 1999/05/08 16:33:10 jason Exp $
#
# See /usr/share/ipf/nat.1 for examples.
# edit the ipnat= line in /etc/rc.conf to enable Network Address Translation


#map ppp0 10.0.0.0/8 -> ppp0/32 portmap tcp/udp 10000:20000

# Scenario: Two network interfaces; one connected to internal 192.168.0.XXX
# network, other connected externally to the Internet. Suppose the internal
# interface is named we2 and the external interface is named ep0. The
# following mapping will provide the internal network with Internet
# connectivity for tcp/udp traffic (note the we2 name is not used; instead
# its network address is used):
map ep0 192.168.0.0/24 -> ep0/32 portmap tcp/udp 10000:20000

[/home/kperrier]$

Nothing tremendously earthshattering here.  What does not get updated
is the default route, i.e. what 'route show' or 'netstat -rn' prints
out.  I don't think my nat rules are the problem, is the routing table.

Would using routed fix the problem by dynamically updating my
routing table when my IP changes?

Kent
--
You can never entirely stop being what you once were. That's
why it's important to be the right person today, and not put
it off till tomorrow.
                       -- Larry Wall, 3rd State of the Onion



Visit your host, monkey.org