Creating Your Own Proxy Server On Mac OSX

I’m not going to tell you that I invented this method but I did collate and refresh the steps required to implement this on Snow Leopard so I thought I’d post them here for others to find. You can find out more about proxy servers on Wikipedia.

Setting Up The Host Mac:

1. In the System Preferences > Accounts control panel confirm that all user accounts on the host Mac have strong passwords. You’re going to open this Mac up to the internet and attackers will be trying to get in so strong password are a prerequisite.

2. Next turn on Remote Access. In System Preferences > Sharing you must enable “Remote Login”. Press the¬†“+” button to add a user to the allowed users list. Make a note of this username and password because you’ll need these credentials to login on the client Mac later.


3. If your Mac is on a network with a router (which ts probably is) then you’ll need to give it a static IP address and set up port forwarding on the router. You must forward incoming connections on port 22 to your Mac’s IP address. Your router’s interface will differ.


Adding An Exception For SSH To Little Snitch (If Running On The Host Mac):

Little Snitch uses a standard dialog box to select applications so you can’t navigate to the SSH executable which lives in a hidden folder at /usr/bin/. Therefore you’ll need to put an alias to SSH on your desktop and point Little Snitch to that.

1. In the Finder, select Go > Go To Folder…


2. In the Go To Folder… dialog, enter /usr/bin/ and press “Go”.


3. Find “ssh” in the bin folder and make an alias of it on your desktop.

4. Launch Little Snitch Configuration.

5. Click the green “+” icon to add a new rule.

6. Configure the new connection as illustrated below. Click the gear icon and select “Choose Application…” to find and choose the ssh alias you created in step 3.


7. Click OK and close Little Snitch Configuration.

8. Delete the ssh alias (not the original) from your desktop, as you’re done with it.

Setting Up The Client Mac:

1. Open You must leave it open until you are done using the proxy – closing the terminal window will terminate the proxy connection. Enter the following command, filling in the username with name from step 2 above, and with the IP address from step 4: ssh -D 2001

2. Launch and configure Firefox to use this new SSH proxy connection. In the Firefox preferences, click the “Advanced” tab and selected “Network.”


3. Click “Settings” then set the SOCKS Host to your local IP (which is always, port 2001 and SOCKS v4 proxy.


4. Click OK, close the Preferences dialog and then browse to to confirm that you are using the proxy.

Happy surfing!

Leave a Reply