Hello,
I'm new to FreeBSD and loving it. The only thing I'm really struggling with is getting a good
Here's my attempt. Sadly I can't get it to allow IPv6 traffic. Can anyone help me with what I'm doing wrong?
IPv4 works but I can't get the fireawall to allow traffic directed at the IPv6 address. I can ssh into my server at
I love FreeBSD but PF has been a bit too powerful and overwhelming for me. I wish there were some clear examples out there for best practices for a web-server firewall. I'm afraid of leaving big security holes when I'm struggling so much to understand a basic
Very strangely, when I restart the firewall with
I'm new to FreeBSD and loving it. The only thing I'm really struggling with is getting a good
pf.conf
.Here's my attempt. Sadly I can't get it to allow IPv6 traffic. Can anyone help me with what I'm doing wrong?
Code:
vtnet0 = "vtnet0"
set skip on { lo0 lo1 }
# basic hardening
scrub in all fragment reassemble max-mss 1440
antispoof quick for $vtnet0
# block everything by default
block all
# only allow in 80, 443, and 34020 (for ssh)
# allow this on IPv4
pass in inet proto { tcp udp } to port { https, http, 34020 }
# and IPv6
pass in inet6 proto { tcp udp } to port { https, http, 34020 }
# only allow the server to connect out to these ports
pass out proto { tcp udp } to port { 22 53 80 123 443 465 27017 }
IPv4 works but I can't get the fireawall to allow traffic directed at the IPv6 address. I can ssh into my server at
user@IP_4_ADDRESS
but it doesn't allow any traffic when ssh'ing into user@IP_6_ADDRESS
.I love FreeBSD but PF has been a bit too powerful and overwhelming for me. I wish there were some clear examples out there for best practices for a web-server firewall. I'm afraid of leaving big security holes when I'm struggling so much to understand a basic
pf.conf
. Any help with a full working example pf.conf would be really appreciated.Very strangely, when I restart the firewall with
sudo pfctl -d
and then sudo pfctl -e
, the firewall allows IPv6 traffic for about 30 seconds with the firewall freshly running, and then it drops it again.