To bypass censorship and get around a restrictive firewall blocking you from browsing certain web sites, all you need is a dynamic port forwarding. As we have explained in this post:
Dynamic port forwarding is actually a SOCKS proxy. Once you have created a tunnel with dynamic port forwarding, you can configure the web browser to use that proxy.
- go to Edit -> Preferences -> General -> Network Proxy -> Settings…
- check “Manual proxy configuration”
- make sure “Use this proxy server for all protocols” is cleared
- clear “HTTP Proxy”, “SSL Proxy”, “FTP Proxy”, and “Gopher Proxy” fields
- enter “127.0.0.1” for “SOCKS Host”
- enter “1080” (or whatever port you chose) for Port.
You can also set Firefox to use the DNS through that proxy, so even your DNS lookups are secure:
- check the box “Proxy DNS when using SOCKS v5”
The SOCKS proxy will stop working when you disconnect your SSH session. You will need to change these settings back to normal in order for Firefox to work again.
System Proxy Settings (Mail.app, Safari, Google Chrome etc.)
Mail.app, Safari or Google Chrome uses your computer’s system proxy settings to connect to the network. Changing these settings will affect Mail.app, Safari and Google Chrome as well as other programs that connects to the Internet.
- Choose Apple menu > System Preferences, and then click Network.
- Choose the network service you use from the list, Wi-Fi, Ethernet or AirPort for example.
- Click Advanced, and then click Proxies.
- Select SOCKS Proxy, and then type “
127.0.0.1” in the address field.
- Enter “
1080” (or whatever port you chose) for port number field.
- Click “OK” then “Apply” button to make changes to take effect.
- Choose Dropbox > Preferences…, and then click Network.
- Choose Proxies, and then click Change Settings… button.
- Select Manual in Proxy settings, and then select
SOCKS5from Proxy type, type “
127.0.0.1” in the Server field, and type the port number of dynamic port forwarding in the port number field: