Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a situation where a user has an iphone and a macbook. The macbook uses a SOCKS proxy via ssh to access some internal webpages. Is is possible for either the iPhone to do the same, or can the macbook 'share' the proxy? Is a VPN from the macbook the answer? and if so where would I start?

share|improve this question
Looks like a question that falls into the "interfacing with your computer" exception to the electronic devices rule and is therefore on topic. – Daniel Beck Nov 20 '11 at 22:50
up vote 2 down vote accepted

Pretty straightforward; I was trying to do this myself.

Assuming you have an ssh host already set up, use:

ssh -D 9999

You may have to use ssh -N -g -D 9999, but just -D worked for me.

Once you have the ssh tunnel going, you'll need to serve a proxy configuration file with your local webserver to use your SOCKS proxy as an http proxy.

Go to your ~/Sites/ directory, and create a Proxy Auto-Config (PAC) file (eg proxy.pac). It should have the following:

function FindProxyForURL(url, host) {
   return "SOCKS 192.168.xx.xx:yyyy";

Then, enable internet sharing and web sharing in Mac Preferences (you can enable basic WEP security from the Airport Options button).


On your iPhone, join your ad-hoc network, go to Settings > Wifi and click the blue arrow to the right of your network, scroll to the bottom, click Auto and type in the address to your PAC file (e.g. http://192.168.xx.xx/mysupersecretproxy.pac).


and (referenced in the first article)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.