Solved conflict with pf and wireguard

Hello everybody.
I am completely new to FreeBSD and I am trying to setup a simple NAS with wireguard and a couple other services some of which running in jails.
However I cannot seem to properly configure PF since every time I reboot the computer I have to manually restart PF in order to get wireguard and the services running in the jails to work.
From what I gathered the issue seems to lie in the fact that the wireguard service starts after pf but even changing the scripts manually didn't change this behavior.
I appreciate any help!
Thanks.

pf.conf
Code:
ext_if="re0"
int_if="wg0"
IP_PUB="192.168.1.225"

scrub in all

nat on $ext_if from lo1:network to any -> ($ext_if)
nat on $ext_if from $int_if:network to any -> ($ext_if) #allow wireguard traffic


#TAUTULLI
rdr on $ext_if proto tcp from any to $IP_PUB port 8181 -> 192.168.0.2

#SAMBA
rdr on $ext_if proto tcp from any to $IP_PUB port 445 -> 192.168.0.3
 
I think if you'll replace this "from $int_if:network" by this "from ($int_if:network)" it'll help. But I'd suggest replace both nat lines by this one
Code:
nat on $ext_if from !($ext_if) -> ($ext_if)
 
Back
Top