Hello!
I have a debian guest running on FreeBSD 13.0 using bhyve.
If I disable pf the guest can communicate with WAN. A httpd running on debian is also reachable from WAN.
If I enable pf I can ssh into the debian guest, but the guest cannot communicate with WAN, neither is the httpd reachable.
I tried to debug with tcpdump but I cannot see any traffic on the bhyve host coming from the guest...
My interfaces:
I added for testing purposes this to pf.conf. I think the bridge rules aren't necessary but for God's sake...:
Full pf file:
Do you have any hints?
Thanks!
I have a debian guest running on FreeBSD 13.0 using bhyve.
If I disable pf the guest can communicate with WAN. A httpd running on debian is also reachable from WAN.
If I enable pf I can ssh into the debian guest, but the guest cannot communicate with WAN, neither is the httpd reachable.
I tried to debug with tcpdump but I cannot see any traffic on the bhyve host coming from the guest...
My interfaces:
Code:
em0: flags=8963<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=4810099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,VLAN_HWFILTER,NOMAP>
ether a4:bb:6d:xx:xx:xx
inet 192.168.s.t netmask 0xffffff00 broadcast 192.168.s.x
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Code:
tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
ether 58:9c:fc:xx:xx:xx
groups: tap
media: Ethernet autoselect
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Opened by PID 1667
Code:
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 58:9c:fc:10:ff:f4
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 5 priority 128 path cost 2000000
member: em0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 1 priority 128 path cost 20000
groups: bridge
nd6 options=9<PERFORMNUD,IFDISABLED>
I added for testing purposes this to pf.conf. I think the bridge rules aren't necessary but for God's sake...:
Code:
# DEBUG: RULES FOR VMM
pass in quick on bridge0 all keep state
pass in quick on tap0 all keep state
pass out quick on bridge0 all keep state
pass out quick on tap0 all keep state
Full pf file:
Code:
### INTERFACES ###
if = "{ lo0, em0 }"
vif = "{ ue0 }"
### SETTINGS ###
set block-policy drop
### OFFENE TCP/UDP-PORTS ###
tcp_pass = "{ SOME_TCP_POSTS }"
udp_pass = "{ SOME_UDP_PORTS }"
icmp_types = "echoreq"
### NORMALISATION ###
scrub in all
antispoof for $if
### TABLES ###
table <intranet> { SOME_SUBNET_IP_RANGES }
table <smartnet> { A_SUBNET}
table <whitelist> { SOME_ADMIN_MACHINES }
table <bruteforce> persist
table <blocklist> persist file "A_FILE_PATH"
table <ssh_allowed> persist
### RULES ###
set skip on lo0
block all
block quick from <bruteforce>
# DEBUG: RULES FOR VMM
pass in quick on bridge0 all keep state
pass in quick on tap0 all keep state
pass out quick on bridge0 all keep state
pass out quick on tap0 all keep state
pass in quick proto tcp from <whitelist> to any keep state
pass in quick proto udp from <whitelist> to any keep state
pass in quick proto tcp from <intranet> to any port 8443 keep state
pass in quick proto tcp from <intranet> to 192.168.x.x port 443 keep state
pass in on $if proto udp from <intranet> to any port $udp_pass keep state
pass in on $vif proto udp from <smartnet> to 192.168.s.t port 53 keep state
pass in on $vif proto tcp from <smartnet> to 192.168.s.p port 53 keep state
pass in on $vif proto tcp from 192.168.10.16 to 192.168.s.r port 8443 keep state
pass in log (all, to pflog0) on $if proto tcp from any to any port $tcp_pass flags S/SA keep state (max-src-conn 200, max-src-conn-rate 25/5, overload <bruteforce> flush global)
pass in on $if proto udp to any port $udp_pass keep state
pass out quick all keep state
# PING #
pass in on $if inet proto icmp all icmp-type $icmp_types keep state
# TRACEROUTE #
pass in on $if inet proto udp from any to any port 33433 >< 33626 keep state
Do you have any hints?
Thanks!