PF PF || Deny all in || Deny all out || Allow only specific outgoing ports of my choice

This is my PF config

Code:
block in all
pass out all keep state

I want block all outgoing ports too & allow only specific ports as per my choice like 80, 443, etc.

When I was using Linux I used to do this using ufw. To get an idea about which outgoing ports to open I used follow this askubuntu page.
Please have a look at that askubuntu thread you will understand what I am trying to do.

Please show me how to do that. I am facing a serious issue while configuring FreeBSD's version of PF. For example when I apply the rules mentioned here >>https://imaprettykitty.com/wof/ & use the command pfctl -f /etc/pf.conf I lose all connectivity. Firefox refuses to load websites.
 
Read the handbook:

Specifically, section 31.3.2 directly addresses your use case.
 
Back
Top