Subject: Re: NAT Question
To: Jeff <jeff@praeclara.com>
From: Daniel Eggert <danieleggert@mac.com>
List: port-macppc
Date: 10/10/2002 22:27:54
On torsdag, okt 10, 2002, at 17:11 Europe/Copenhagen, Jeff wrote:

>
>
> My ipnat question is pretty straightforward.  I know that you're not
> _supposed_ to do this, but I want to anyway.  How does one (or can one)
> use a box with only 1 NIC (and one static IP) to accomplish network
> address
> and port forwarding on NetBSD?  I've searched high and low, and I've 
> read
> all the docs I could find (there's a _lot_).  But they all explain the
> ipnat procedure with 2 NICs.
>
> Anyone want to point me to a how-to or doc?  Or just tell me?  I'm 
> pretty
> sure it's an easy task, as I was able to do it with one or two commands
> on OS X
> and LinuxPPC.

I'm not at all sure, but I can't see, why the following shouldn't work. 
Put this inside your ipnat.rules (the file for ipnat to read).

map de0 192.168.0.0/16 -> aa.bb.cc.dd/32 portmap tcp/udp 20000:30000
map de0 192.168.0.0/16 -> aa.bb.cc.dd/32

Where (obviously) you'd replace 'aa.bb.cc.dd' with you external ip and 
'de0' with you nic name (run 'ifconfig -a').

> My setup is simply the Performa with the connection to the outside 
> world.
> And then 2 computers behind the Performa (I want these to be 
> 192.168.*.*)
> I want the Performa (obviously) to do the address and port translating
> for the other
> 2 machines.
>
> A long time ago (July 91) someone sent me a link (offlist) that gives 
> the info I ask for below.  Does anyone have this link?  Or a new link?
>
> Thanks for any advice.
>
> Jeff
>
> Jeffrey P. Hergan, Ph.D.
> Adjunct Professor of Philosophy
> Saint Xavier University
> Chicago
>