Subject: Re: How-to IP NAT (masquerading)
To: Charles Sebold <pretender@macstore.com>
From: Jesse Swensen <jrs@pagesz.net>
List: port-mac68k
Date: 07/08/1997 07:15:19
At 3:55 PM -0500 7/7/97, Charles Sebold wrote:
>I've seen a few people asking how to do IP NAT (network address
>translation), and having finally figured it out, I thought I'd share it.

Thanks Charles.  This is VERY helpful.  A HOWTO would be great.  I know I
have been working with others who are in the same phase (I have all the
pieces, but how do I put them all together) as myself.


>Now we give ipnat the rules it needs to translate.
>
>(xxx.xxx.xxx.xxx is your real IP address, assigned by the ISP.  If you have
>static IP, you can set this up when you boot, or before you connect at
>least.  Something I haven't tried yet is using the loopback address, which
>will allow you to do this automatically upon booting up.)
>
>Put the following into a text file (I called mine /etc/nat.rules, you can
>do what you like):
>
>map ppp0 192.168.1.0/24 -> xxx.xxx.xxx.xxx/32 portmap tcp/udp 10000:65000
>map ppp0 192.168.1.0/24 -> xxx.xxx.xxx.xxx/32

Q: Could this be done at boot time by using:
	map ppp0 192.168.1.0/24 -> 0.0.0.0/32 portmap tcp/udp 10000:65000
	map ppp0 192.168.1.0/24 -> 0.0.0.0/32

Q: What does your routing table look like?
This seems to be the part I am struggling with.  If I set the default route
at start up as my BSD box or as local host, things local work fine but when
PPP starts I don't have a route from my gateway there my ISP's gateway.

Also, as another little side project, I wanted to setup DNS.  I have it
working internal, but do you know how to configure it to look at my ISP's
DNS if it can't resolve it locally?

TIA,
Jesse