Subject: Re: NetBSD Gateway with dynamic IP
To: daniel veiga <danieldvv@yahoo.com.br>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-help
Date: 02/08/2007 23:21:44
On Thu, Feb 08, 2007 at 11:25:00AM -0300, daniel veiga wrote:
> Hello,
> 
> I have this configuration of my home-network:
> 
> Netbsd 3.0
> my kernel was net.inet.ip.forwading=1
> 
> ex0
> ip 192.168.1.1 - its my internal network, this IP i
> put manually, connect with xinXP
> 
> vr0
> ip dynamic (internet link) - I get the IP through the
> command: $sudo dhclient
> 
> My ipnat.conf is
> map ex0 192.168.1.0/24 -> 0/32 portmap tcp/udp
> 40000:60000
> map ex0 192.168.1.0/24 -> 0/32
> i tried to put vr0 and does not work to.

This needs to be vr0. This won't work with ex0 in your setup.
> 
> to up ipnat.conf, i use this command: sudo
> /etc/rc.d/ipnat start

You also need to start ipfilter before ipnat:
/etc/rc.d/ipfilter start
for this you need an empty /etc/ipf.conf

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--