1

I am trying to follow this answer on OS X 11.x

block return from any to 192.0.2.2

The console displays :

-bash: block: command not found

So, I tried to install it using brew:

brew install block

However, I got another error .

  • How to install this firewall utility?
Abdennour TOUMI
  • 902
  • 3
  • 12
  • 24

1 Answers1

3

On recent versions of OS X, pf is installed and running by default. The linked question is referring to changing the pf configuration, not installing a new utility. Modifying a firewall on a production system is not something which should be done without reading the documentation (man pf.conf , man pfctl).

To add that block line (or experiment with other configuration changes), you would add it to the configuration file /etc/pf.conf with your preferred editor, and then reload the firewall configuration with

$ sudo pfctl -f /etc/pf.conf
user4556274
  • 8,725
  • 2
  • 31
  • 37