Subject: Re: ipfiler/ipnat configuration
To: Water NB <netbsd78@126.com>
From: Martin Husemann <martin@duskware.de>
List: tech-net
Date: 05/09/2005 09:20:49
On Mon, May 09, 2005 at 10:55:08AM +0800, Water NB wrote:
> My system is NetBSD-2.0_STABLE i386. I have 2 NICs.
> External NIC is rtk1, get IP address/gateway via DHCP.
> Internal NIC is rtk0, 192.168.1.1/24.

You may want to read http://www.netbsd.org/Documentation/network/#simplenat
and use something like this in your /etc/ipnat.conf:

map rtk1 192.168.1.1/24 -> 0/32 portmap tcp/udp 40000:60000
map rtk1 192.168.1.1/24 -> 0/32

and then tune /etc/ipf.conf to be more restrictive than the "everything open"
variant used in above link.

Martin
P.S.: it seems the NetBSD guide could use a chapter on ipf setup