Port Forwarding on a Mac
Last modified on 12 June 2015 11:41 AM
When enabling port 80 and 443 on the Mac where the PaperCut App Server is running, it is necessary to use ipfw (IP Firewall) / pf (Packet Filter) to allow port forwarding.
This will allow users to navigate to e.g. http://[servername]/user to access the User Web Page, without having to specify a port.
Note that this is an OS-level function, so there are many ways to get this configured. If you are happy configuring this using another method, and it’s working successfully then please feel free to continue to use that method, and also if you’d like to leave a note in the comments with your method, that’d be great!
OS X 10.9 and earlier:
With earlier versions of Mac OS, ipfw was the primary way to handle firewall changes and port forwarding. With 10.7, the preference was to use PF but the ipfw utility was still included with Mac OS.
As detailed on the original link at the top of this page, with 10.9 and earlier, you can run this command to configure ipfw to forward port 80 to port 9191:
OS X 10.10 and above:
With Yosemite, ipfw has been removed from the Mac OS X build completely, so running the above command will result in a ‘command not found’ error message. The new method using pf is a little more involved:
1. Create an anchor file
2. In the com.papercut anchor file, enter:
3. Test the anchor file:
4. Add the anchor file to the pf.conf file:
This can be done either manually (see below) or create a dedicated Launch Daemon to load and enable the config on boot, or edit the current daemon for pf to enable the new config automatically at startup:
To test this method manually (no restart required) you can use