Hello,
pf in FreeBSD is not my strongest side, is there anything I should improve (or anything missing) in our pf setup for a basic web server with low traffic?
Thank you very much,
pf in FreeBSD is not my strongest side, is there anything I should improve (or anything missing) in our pf setup for a basic web server with low traffic?
Thank you very much,
Code:
ext_if="vmx0"
me="11.22.33.44"
good_tcp_ports="{ 33333,443,80,8080,25,22222 }"
set skip on lo0
block in all
block out all
table <blockedips> persist file "/usr/local/etc/pf.blocked.ip.conf"
block drop in log (all) quick on $ext_if from <blockedips> to any
pass in quick on $ext_if inet proto tcp from any to $me port $good_tcp_ports
pass in on $ext_if proto tcp from any to $me port 22222 flags S/SA synproxy state
pass in on $ext_if proto tcp from any to $me port > 40000 keep state
pass out keep state
pass in quick on $ext_if inet proto udp from any port 53 to $me
pass in on $ext_if inet proto icmp all icmp-type echoreq keep state
pass out quick on $ext_if inet proto { tcp, udp, icmp } from $me to any