Subject: Re: ipnat.conf question
To: Jon <jons@dotnet.com>
From: Rick Byers <rb-netbsd@BigScaryChildren.net>
List: netbsd-help
Date: 11/06/2001 15:59:47
Hi,

> I want all http and ftp traffic which comes into my gateway to be sent
> to 192.168.1.4 on my internal network
>
> rdr ppp0 192.168.1.1/24 port 80 -> 192.168.1.4 port 80 tcp
> rdr ppp0 192.168.1.1/24 port 21 -> 192.168.1.4 port 80 tcp

- did you intend for both rdr rules to end in "port 80"?  You probably
want the send rule to have a "port 21" destination

- the source IP is probably wrong, I think you want to enter your external
ipaddress there (so that all requests to THAT address get redirected to an
internal address).  You might be able to do "0/0" for the source, but I'm
not sure - I just do "1.2.3.4/32" (where 1.2.3.4 is my external IP)

- I think redirecting port 21 will only work for active FTP where the
client provides an IP address for the server to connect back to.  Many ftp
clients default to passive FTP now which expects the server to provide an
IP/port for the client to connect to.  In your case, the server would
always say "use 192.168.1.4 for passive connections", which obviously
wouldn't work (since the outside world knows nothign of your internal
network).  I'm not sure if there is any easy way around this.

Rick