How to use SSL tunnelling on OS X to give full internet access to some applications while you are on a restrictive corporate network?


  • you want to be able to access some restricted destinations and/or ports with some applications from your computer but you are on a restricted network (corporate) - Even using a Torrent client.
  • you have an AWS machine running Ubuntu that you can use as a proxy (and you can SSH to this machine)
  • You cannot create a full VPN because this means that you will loose access to your intranet and you do not want that.
  • 1
    Please be aware that doing this is a security risk, and if you are seen bypassing corporate firewalls (especially with torrent sites), you can get into serious trouble.
    – Matt
    Jul 20, 2012 at 14:50
  • Do you have a handle on the network routing needed to choose between intranet and internet or the basics of using SSL tunneling? If you have solved one of these - it will help someone propose a workable configuration of the other. (there are three questions here - basic SSL tunneling, basic network routing, and understanding both well enough to synthesize a solution to make both work for the situation...)
    – bmike
    Jul 20, 2012 at 15:16

2 Answers 2


You can create a local SOCKS proxy by using the dynamic port forwarding function of SSH by running ssh with the -D flag. This will tunnel all traffic of applications that use the local SOCKS proxy through SSH connection.

For example running ssh -D1234 user@host will open a SOCKS proxy on localhost port 1234 that you can direct your applications to.


Assuming that you are running Lion or greater, I would recommend that you create an OS X virtual machine (using VMware Fusion or Parallels Desktop) and route that through a full VPN.

Alternatively, if you have a Mac at home, you could just use VNC or some other remote desktop solution and run your applications from there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .