Subject: Re: PPP NAT inbound mapping ports
To: T&B <research@tandb.com.au>
From: Daniel Parks <daniel@mwdesign.dyndns.org>
List: port-mac68k
Date: 08/05/2001 20:09:56
At 12:33 PM +1000 8/6/2001, T&B wrote:
>eg I want to allow incoming SMTP (port 25) connections from the 
>outside through my public PPP IP address of 203.57.42.254 to an 
>internal SMTP server running at 192.168.1.218. Similarly, I want web 
>requests from the outside to go to 192.168.1.220.

rdr ex0  0.0.0.0/0 port # -> In.ter.nal.IP port # tcp/udp

ex0 should be your external interface, and tcp/udp can be tcp/udp, udp, or tcp.

So, for http, you would add this to /etc/ipnat.conf then restart 
ipnat (assuming ae0 is you external interface):
rdr ae0 0.0.0.0/0 port 80 -> 192.168.1.220 port 80 tcp

Note that accessing 203.57.42.254 from inside the network will be 
different than accessing it from the outside, so if you want to test 
it you need to use an external machine.

Hope this helps.

Daniel

-- 
My PGP public key: http://mwdesign.dyndns.org/~daniel/publickey.txt

Don't use PGP? Check out http://www.pgpi.org/doc/whypgp/en/