NAT works but port forwarding does not

Antonio Torres antonio.torres at newspace.net.br
Tue Dec 14 14:58:07 PST 2004


On Tue, 14 Dec 2004 17:14:08 -0500
"Zeno Lee" <zeno_lee at hotmail.com> wrote:

...
> >> > My network setup
> >> >
> >> > Internet <----> em0 | FreeBSD | em1 <----->  LAN
> >> >
> >> >
> >> > my pf.conf file only has:
> >> >
> >> > ext_if="em0"
> >> > int_if="em1"
> >> > webserver="192.168.1.54"
> >> >
> >> > nat on $ext_if from $int_if:network to any -> ($ext_if)
> >> > rdr on $ext_if from any to any port 80 -> $webserver
> >> >
> >> >
> >> > NAT works, however, I cannot get port forwarding to work.  I am testing 
> >> > it
> >> > vial a remote  computer on the internet whose packets only come through 
> >> > em0

try a full sintax:

     rdr on $ext_if proto tcp from any to any port 80 -> $webserver port 80

works fine to me.



Antonio Torres
antonio.torres at newspace.net.br


More information about the freebsd-pf mailing list