Plain freebsd jail, no ezjail or other magic.
Local network and wifi is on 192.168.0.0/24
Trying to bridge all jails to bridge0 with 192.168.1.0/24
epair#a on bridge0 while epair#b the jail interface
If I setup the bridge:
bridge0
epair1a
epair2a
epair3a
2,3 are the test jails while epair1 is for system.
epair1b is setup as 192.168.1.1/24 and routing is on between interfaces for this server.
A ping from from jail test2 with 192.168.1.3 to 8.8.8.8 stops at the external interface and doesn't get translated by NAT according to tcpdump.
I can ping 192.168.0.1 192.168.1.1 and the external assigned ip just fine. If I launch other jails I can ping them. A ping just doesn't NAT to the external internet. All other internal traffic is natted just fine.
If I skip setting up bridge0 and setup a single epair.... jail traffic from a test jail gets natted properly.
epair2a gets 192.168.1.1/24 and 2b gets 192.168.1.2/24 in the jail. All is identical expect for not going through a bridge.
pf.conf:
nat on $ext from 192.168.0.0/16 to any -> ($ext)
set skip on lo0
set skip on bridge0
block log all
pass from $ext to any keep state
pass from 192.168.0.0/16 to any keep state
Local network and wifi is on 192.168.0.0/24
Trying to bridge all jails to bridge0 with 192.168.1.0/24
epair#a on bridge0 while epair#b the jail interface
If I setup the bridge:
bridge0
epair1a
epair2a
epair3a
2,3 are the test jails while epair1 is for system.
epair1b is setup as 192.168.1.1/24 and routing is on between interfaces for this server.
A ping from from jail test2 with 192.168.1.3 to 8.8.8.8 stops at the external interface and doesn't get translated by NAT according to tcpdump.
I can ping 192.168.0.1 192.168.1.1 and the external assigned ip just fine. If I launch other jails I can ping them. A ping just doesn't NAT to the external internet. All other internal traffic is natted just fine.
If I skip setting up bridge0 and setup a single epair.... jail traffic from a test jail gets natted properly.
epair2a gets 192.168.1.1/24 and 2b gets 192.168.1.2/24 in the jail. All is identical expect for not going through a bridge.
pf.conf:
nat on $ext from 192.168.0.0/16 to any -> ($ext)
set skip on lo0
set skip on bridge0
block log all
pass from $ext to any keep state
pass from 192.168.0.0/16 to any keep state