NAT works but port forwarding does not

Zeno Lee zeno_lee at hotmail.com
Wed Dec 15 07:30:01 PST 2004


I appreciate all your help.  It's still not working.

Antonio's suggestion is the syntax I already had.  I mistyped my email.
I tried Paul's suggestion but it still doesn't work.

I'm not a network expert.  It's probably something very obvious.  I'm going 
to describe my 2 interfaces more

external interface is: em0 inet 160.79.174.98  netmask 255.255.255.248
internal interface is: em1 inet 192.168.1.55  netmask 255.255.255.0

em0 is running at 100 half duplex
em1 is running at 100 full duplex

/etc/pf.conf

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 proto tcp from any to $ext_if port 80 -> $webserver port 80

NAT is working perfectly fine.  I can ssh into em0 and then telnet to port 
80 and do a GET on index.html.


It's a brand new FreeBSD 5.3 install.  I updated to 5.3 stable and rebuilt 
the kernel only adding the following to the configuration

device          pf
device          pflog
device          pfsync

options         ALTQ
options         ALTQ_CBQ        # Class Bases Queueing
options         ALTQ_RED        # Random Early Drop
options         ALTQ_RIO        # RED In/Out
options         ALTQ_HFSC       # Hierarchical Packet Scheduler
options         ALTQ_CDNR       # Traffic conditioner
options         ALTQ_PRIQ       # Priority Queueing
options         ALTQ_NOPCC      # Required for SMP build
options         ALTQ_DEBUG



More information about the freebsd-pf mailing list