Date: Tue, 28 Dec 2021 13:49:59 -0600 From: Alex Thomas <karlthane@gmail.com> To: questions@freebsd.org Subject: Re: PF and tun1 Message-ID: <CABMOuVegdDcuxC9QnWusO7T6ysDvRyrqcQsvOS7XEAoftmQc2A@mail.gmail.com> In-Reply-To: <CAOyJeZTLdocx0tKujMU0=CGnDVCQT_Lj9MwE%2BYKJEpLk1Ft4uA@mail.gmail.com> References: <CABMOuVfxHtXzR0EC7P1h1KPYjpyxX9FnTyexLW4sThDpaE8PfA@mail.gmail.com> <5f2cca65-daab-989c-5fd0-6a5373f5bd56@pp.dyndns.biz> <CABMOuVer0Dy1D0sMAjTJCFee%2B9Lpjo8899c6KKOZyHtwZCh%2Bgg@mail.gmail.com> <CAOyJeZTLdocx0tKujMU0=CGnDVCQT_Lj9MwE%2BYKJEpLk1Ft4uA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
After every change I did a pfctl -f /etc/pf.conf. On Tue, Dec 28, 2021 at 1:41 PM Shamim Shahriar <shamim.shahriar@gmail.com> wrote: > > Have you tried reloading pf rules once tun1 is active/up? > > On Tue, 28 Dec 2021, 19:35 Alex Thomas, <karlthane@gmail.com> wrote: >> >> I have tried that, and have commented out the table for rfc6890 and >> the rules for it. Still not having any success. >> >> On Tue, Dec 28, 2021 at 1:28 AM Morgan Wesstr=C3=B6m >> <freebsd-database@pp.dyndns.biz> wrote: >> > >> > On 2021-12-28 02:55, Alex Thomas wrote: >> > > 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. >> > > >> > > vtnet0 =3D "vtnet0" >> > > nebula1 =3D "tun1" >> > > icmp_types =3D "{ 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 >> > > >> > >> > In my experience the skip rules only work on interfaces that are avail= able when >> > pf starts, which excludes tun-interfaces. I don't know if this is by d= esign. >> > Remove your skip rules for tun1 and $nebula1 and just add a pass rule = for that >> > interface: >> > >> > pass on tun1 all >> > >> > Additionally, since you're quick blocking all traffic to and from priv= ate IP >> > addresses, make sure you don't use any of those IP addresses on tun1. >> > >> > /Morgan >> > >>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABMOuVegdDcuxC9QnWusO7T6ysDvRyrqcQsvOS7XEAoftmQc2A>