I need to block one incoming port with pf. I'm new to pf, and I can't figure out what I'm doing wrong here.
Here is my entire rule file, made to block incoming port 22:
set block-policy drop pass in all keep state pass out all keep state block in proto tcp to port 22 After I start pf with sudo /sbin/pfctl -e -f /path/to/my/rule/file, all my network traffic is blocked. I try to load a webpage, and it won't load until I do sudo /sbin/pfctl -d to disable pf.
If I remove the fourth line (block in proto tcp to port 22) from my rule list, nothing is blocked. So what did I do wrong on the fourth line that is causing it to block everything instead of just incoming TCP port 22? All the examples did this similarly.
If it matters, my OS is OS X 10.8.5.