Subject: Re: How-to IP NAT (masquerading)
To: Francis Peter <francisp@innet.be>
From: Scott Reynolds <scottr@og.org>
List: port-mac68k
Date: 07/20/1997 13:30:15
On Sun, 20 Jul 1997, Francis Peter wrote:

> If I use the command ipnat -l, I can't see any active sessions:
> /======================
> List of active MAP/Redirect filters:
> map ppp0 192.168.32.0/24 -> 194.7.7.92/32 portmap tcp/udp 10000:65000
> 
> List of active sessions:
> [...]
> For me it seems there is no Network Address Translation active.

Did you realize that you need to enable ip_filter before NAT works?
Edit the appropriate flag in /etc/rc.conf to start ipf, and create
an appropriate filter configuration file.  My /etc/ipf.conf looks like
this:

---8<-----
pass in from any to any
pass out from any to any
---8<-----

This isn't documented particularly well, apparently.  Perhaps someone
should file a PR about this, if they can confirm it...

> If there 
> is a NAT active, what is the output of ipnat -l? What will the List of 
> active sessions be? Why is it not working in my configuration?

It should look something like this:

List of active MAP/Redirect filters:
map ppp0 10.0.0.0/24  -> 206.242.16.156/32  portmap tcp/udp 1025:65535

List of active sessions:
MAP 10.0.0.2        1058  <- -> 206.242.16.156  1027  [199.249.167.180 88] 1198 0 d56d
MAP 10.0.0.2        1058  <- -> 206.242.16.156  1026  [199.249.167.180 750] 1190 0 d56c

> Yes, and the cards are working concurrently. This is my output from 
> netstat -nr

Excellent... I'll note that you're only enabling NAT on one of those
networks, though.  I assume this was intentional.

--scott