PF and tun1

From: Alex Thomas <karlthane_at_gmail.com>
Date: Tue, 28 Dec 2021 01:55:27 UTC
I am trying to get nebula working on tun1 with pf as my firewall. If I
turn pf off, everything works. How to I tell pf to ignore / let
everything pass on the tun1 device.

freebsd-version = 13.0-RELEASE-p5

The following is my pf.conf.

vtnet0 = "vtnet0"
nebula1 = "tun1"
icmp_types = "{ echoreq unreach }"
table <bruteforce> persist
table <rfc6890> { 0.0.0.0/8 10.0.0.0/8 100.64.0.0/10 127.0.0.0/8
169.254.0.0/16          \
                  172.16.0.0/12 192.0.0.0/24 192.0.0.0/29 192.0.2.0/24
192.88.99.0/24    \
                  192.168.0.0/16 198.18.0.0/15 198.51.100.0/24
203.0.113.0/24            \
                  240.0.0.0/4 255.255.255.255/32 }

set skip on lo0
set skip on tun1
set skip on $nebula1
scrub in all fragment reassemble max-mss 1440
antispoof quick for $vtnet0
block in quick on egress from <rfc6890>
block return out quick on egress to <rfc6890>
block all
pass in on $vtnet0 proto tcp to port { 22222 } \
        keep state (max-src-conn 15, max-src-conn-rate 3/1, \
                overload <bruteforce> flush global)
pass out proto { tcp udp } to port { 22 53 80 123 443 }
pass out inet proto icmp icmp-type $icmp_types