Hello all,
So I got this PF with NAT running on FreeBSD 9 RELEASE, together with pppoe and dhcpd. Physical setup as following:
All went well, traffic flows from localboxes to the internet and vice versa, but I can't ping the internet (i.e. http://www.google.com) and netstat -r shows empty table? Only if I disable pf then I can ping the internet and the routing table reappearz. Did I miss anything?
So I got this PF with NAT running on FreeBSD 9 RELEASE, together with pppoe and dhcpd. Physical setup as following:
Code:
ISPmodem --- FreeBSD 9 with pf --- switch --- localbox
All went well, traffic flows from localboxes to the internet and vice versa, but I can't ping the internet (i.e. http://www.google.com) and netstat -r shows empty table? Only if I disable pf then I can ping the internet and the routing table reappearz. Did I miss anything?
Code:
moon# ping www.google.com
^C
moon# netstat -r
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
^C
moon# pfctl -d
No ALTQ support in kernel
ALTQ related functions disabled
pf disabled
moon#
moon#
moon#
moon# ping www.google.com
PING www.l.google.com (74.125.128.106): 56 data bytes
64 bytes from 74.125.128.106: icmp_seq=0 ttl=51 time=14.748 ms
64 bytes from 74.125.128.106: icmp_seq=1 ttl=51 time=13.375 ms
64 bytes from 74.125.128.106: icmp_seq=2 ttl=51 time=16.259 ms
^C
--- www.l.google.com ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 13.375/14.794/16.259/1.178 ms
moon# netstat -r
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default x.x.x.x UGS 0 4045 tun0
x.x.x.x link#5 UHS 0 0 tun0
n119237148105.netv link#5 UHS 0 0 lo0
localhost link#3 UH 0 0 lo0
192.168.2.0 link#2 U 0 7643 em1
moon link#2 UHS 0 0 lo0
Internet6:
Destination Gateway Flags Netif Expire
:: localhost UGRS lo0
localhost localhost UH lo0
::ffff:0.0.0.0 localhost UGRS lo0
fe80:: localhost UGRS lo0
fe80::%em1 link#2 U em1
fe80::215:17ff:fe2 link#2 UHS lo0
fe80::%lo0 link#3 U lo0
fe80::1%lo0 link#3 UHS lo0
ff01::%em1 fe80::215:17ff:fe2 U em1
ff01::%lo0 localhost U lo0
ff02:: localhost UGRS lo0
ff02::%em1 fe80::215:17ff:fe2 U em1
ff02::%lo0 localhost U lo0
moon#
Code:
moon# cat /etc/pf.conf
wan="tun0"
lan="em1"
localsubnet=$lan:network
scrub in all
nat on $wan from $localsubnet to any -> ($wan)
block in log on $wan from any to any
pass in log on $lan from $localsubnet to any keep state