Open a port in OSX Mavericks' Firewall
Firewall
I googled around and to make a long story short, here’s how to open port 8080 on any interface to any application on your OSX Mavericks installation in 3 steps:
sudo vim /etc/pf.conf
Then add the following lines at the end of the file:
# Open port 8080 for TCP on all interfaces pass in proto tcp from any to any port 8080
Test (and, according to the documentation, load) your edits with:
sudo pfctl -vnf /etc/pf.conf
Reboot.
(I have found at least 5 pieces of voodoo to make the Firewall restart and reload, but none of them seemed to work reliably, so pardon the reboot)
You can close it by commenting out the lines in pf.conf and reboot again. If anybody knows of an easier way to do this, preferably in one terminal command, and without rebooting, let me know.
Hope this helps.