I am using bastille for jails and the /etc/pf.conf used to look like this
Now I was trying to get vm-bhyve to work and the only way I could find to do it was like this
As you can see I had to comment out all of the bastille configuration.... My question is: Is there a way to combine these two in PF so that I can use vm-bhyve and bastille containers without having to comment one or the other out every single time?
Code:
ext_if="wlan0"
set block-policy return
scrub in on $ext_if all fragment reassemble
set skip on lo
table <jails> persist
nat on $ext_if from <jails> to any -> ($ext_if:0)
rdr-anchor "rdr/*"
block in all
pass out quick keep state
antispoof for $ext_if inet
pass in inet proto tcp from any to any port ssh flags S/SA keep state
Now I was trying to get vm-bhyve to work and the only way I could find to do it was like this
Code:
ext_if="wlan0"
virt_net="10.0.0.0/24"
scrub all
nat on $ext_if from $virt_net to any -> ($ext_if)
pass log all
#ext_if="wlan0"
#set block-policy return
#scrub in on $ext_if all fragment reassemble
#set skip on lo
#table <jails> persist
#nat on $ext_if from <jails> to any -> ($ext_if:0)
#rdr-anchor "rdr/*"
#block in all
#pass out quick keep state
#antispoof for $ext_if inet
#pass in inet proto tcp from any to any port ssh flags S/SA keep state
As you can see I had to comment out all of the bastille configuration.... My question is: Is there a way to combine these two in PF so that I can use vm-bhyve and bastille containers without having to comment one or the other out every single time?