Subject: Re: Problems with NAT
To: None <netbsd-users@netbsd.org>
From: Rafael Almeida <almeidaraf@gmail.com>
List: netbsd-users
Date: 08/30/2006 01:37:03
On 8/29/06, Rub=E9n Gonz=E1lez Arnau <ruben@cirdanetireth.com> wrote:
> Hola Rafael,
>
> Try to use static-port option in your nat.
>
> Like this
> nat on $ext_if from !($ext_if) -> ($ext_if:0) static-port
>
> Hope it helps.
>
Hola,

That solved all my problems! Thank you! :)

I still didn't understand quite well what static-port does, though. In
the pf.conf manpage it says:
     static-port
           With nat rules, the static-port option prevents pf(4) from modif=
y-
           ing the source port on TCP and UDP packets.
What does it mean? Why would the source port be changed? If I specify

rdr pass on $ext_if proto { tcp, udp } to port 6112:6119 -> 192.168.0.3

shouldn't it just pass those ports to 192.168.0.3? Why would it be
changed? Is there some document I can read to learn about that stuff?