Subject: Re: ipnat
To: None <tech-net@netbsd.org, rimantas@remo.lt>
From: Matthew Mondor <mm_lists@pulsar-zone.net>
List: tech-net
Date: 03/16/2005 12:08:07
On Wed, 16 Mar 2005 02:09:02 +0200 (EET)
"Rimantas Petrauskas" <rimantas@remo.lt> wrote:

> Hello,
> 
> i use following rdr syntax in ipnat.conf and it seems to not work.
> rdr IF from SRCIP to 192.168.0.1 port = 80 -> 192.168.0.1 port 80
> rdr IF from SRCIP to any port = 80 -> 192.168.0.1 port 8081
> 
> SRCIP will be redirected to 192.168.0.1 port 8081 if he goes anywhere
> on port 80 but 192.168.0.1.
> On NetBSD 1.6.2 it worked fine, but now i'm using 2.0.
> 
> Am I doing it wrong?

Maybe try instead the following syntax:

rdr <iface> <srcaddr>/<srcmask> port <port> -> <dstaddr> port <port> <proto>

Where <proto> may be tcp, udp, or tcp/udp, and <srcmask> may be /32 if
you specify an absolute single address.

Matt