Hello everyone!
Why does my pf.conf lock everything and stop sharing the internets?
Why does my pf.conf lock everything and stop sharing the internets?
Code:
ext_if="em0"
int_if="em1"
ext_ip="my external ip"
## Macros
SYN_ONLY="S/FSRA"
## TABLES
## TRAFFIC NORMALIZATION
## QUEUEING RULES
## TRANSLATION RULES (NAT)
nat on $ext_if from !($ext_if) -> ($ext_if:0)
## FILTER RULES
# Block everything (inbound AND outbound on ALL interfaces) by default (catch-all)
block all
pass out quick on $ext_if proto { tcp, udp, icmp } all keep state
# Default TCP policy
block return-rst in log on $ext_if proto TCP all
pass in log quick on $ext_if proto TCP from any to $ext_ip port 22 flags $SYN_ONLY keep state
pass in log quick on $ext_if proto TCP from any to $ext_ip port 49152:65535 flags $SYN_ONLY keep state
# Default UDP policy
block in log on $ext_if proto udp all
# It's rare to be hosting a service that requires UDP (unless you are hosting
# a dns server for example), so there typically won't be any entries here.
# Default ICMP policy
block in log on $ext_if proto icmp all
pass in log quick on $ext_if proto icmp from any to $ext_ip icmp-type echoreq keep state
# Allow the local interface to talk unrestricted
pass in quick on lo0 all
pass out quick on lo0 all