MacOS – How to open a specific port in Firewall OS X 10.9.4

firewallmacos

How do I open a specific port in the firewall?
I can not use the "allow connections from application" as I want to open the port for Jenkins, that is not on the list…

Best Answer

Apple's OS X Mavericks contains three firewalls. First of all, the Application Level Firewall which can be configured using the system settings. But there is also ipfw, a packet filtering firewall like netfilter/iptables on GNU/Linux and pf (FreeBSD/OpenBSD).

You can either configure ipfw using the command line, or using a graphical front-end like the free/libre WaterRoof.

You could start with an ipfw command like:

sudo ipfw add 31010 allow tcp from any to any dst-port 8080