Search This Blog

Sunday, November 16, 2014

Proxy via SSH in OS X

Let's say you need to access a URL with your, but that URL is only accessible from inside a network. If your are working remotely, this will allow you to access the URL using an SSH dynamic port forwarding.
  1. First, you need connect to your network via ssh, using dynamic port forwarding. For example
    ssh -D <PORT> [username@]host
  2. With the SSH connection in place, go to your mac's network settings (in System Preferences). Click on Advanced ... and select the Proxies tab. Check the SOCKS proxy protocol and in its configuration set localhost as your SOCKS Proxy Server and <PORT> as the SOCKS Proxy Server Port.
  3. That's it. Now you can browse de web normally, but remote resources will assume you are inside your work's network.

No comments:

Post a Comment