19 ms·
>Is there a simple foolproof utility for blocking ports on BSD with a single command? Yes. It is called pf. block in on fxp0 proto tcp to any port { 2
by upofadown 8y ago
>Is there a simple foolproof utility for blocking ports on BSD with a single command?
Yes. It is called pf.
block in on fxp0 proto tcp to any port { 25 80 }
... blocks incoming email and http connections on the fxp0 interface. That is all you need to put in pf.conf to do that.
- bleu-ble-bleu 8y agoI agree. The syntax is very readable and easy to understand. With consumer firewalls being pwned all the time, OpenBSD with PF could be a good option for some people.
- ttul 8y agoI’m going to have to get it set up again... ahh the simplicity and robustness of OpenBSD...
- foodstances 8y agoI recommend using `egress` in a simple setup like that, it'll still work if you ever change your network device. block in on egress proto tcp to port { 25, 80 }