Subject: Re: dumb port redirection
To: Richard Grace <rgrace@aapt.com.au>
From: Wojciech Puchar <wojtek@chylonia.3miasto.net>
List: netbsd-users
Date: 06/03/2002 09:41:40
>
> I gather that one is Public IP and the other is RFC1918 Private IP?

yes

>
> > if udp packet from 10.10.10.10 port 10000 goes to router, change it's
> > header to be from 1.2.3.4 port 1234 and route
> >
> > if udp packet comes to 1.2.3.4 port 1234 change it's header to be to
> > 10.10.10.10 port 10000 and route
>
> If fxp1 has a public IP address, and IP Forwarding is turned on, and
> the machine knows how to route to 10.10.10.10/32, then:
>
>   map fxp1 10.10.10.10/32 -> 210.10.94.15/32

you mean 1.2.3.4 not 210.10.94.15?

>   rdr fxp1 1.2.3.4/32 port 1234 -> 10.10.10.10/32 port 1000 udp

does the outgoing thing.

will

rtr fxp0 10.10.10.10/32 port 10000 -> 1.2.3.4/32 port 1234 udp

do the rest?