[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Losing routing when dhcp client renews with new IP
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: Losing routing when dhcp client renews with new IP
- From: "Perrier,Kent - PLANO" <Kent_(_dot_)_Perrier_(_at_)_Oneco_(_dot_)_net>
- Date: Wed, 28 Mar 2001 08:50:56 -0600
- Reply-to: "Perrier,Kent - PLANO" <kent_(_dot_)_perrier_(_at_)_Oneco_(_dot_)_net>
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