How to block/unblock specific port/address using pfctl in command line on OSX Yosemite?

1.6k views Asked by At

Up till Yosemite, I was using ipfw to block and unblock ports for testing reasons on my shared WiFi network from the laptop.

I would like to know how I can now use pfctl instead of ipfw to have the same effect as:

ipfw add deny udp from 1.1.1.1 4000 to 2.2.2.2 5000
ipfw delete 100

I need to be able to do these on the fly from the terminal, and not through the manipulation of configuration files.

0

There are 0 answers