A ssh tunnel for Firefox to a remote computer is good security measure. Especially when connecting via an untrusted network like a wifi hotspot or other public networks. The tunnel encrypts and sends the data to your remote machine then it is sent over the web to your destination. This tutorial assumes you have an account on a remote machine you can ssh into. This is a pretty easy set up.
The command to connect
Code:
ssh -D 9999 -C me@ipaddress.com
The -D switch - Specifies a local “dynamic” application-level port forwarding. We are also adding the -C switch for compression.
Next we need to put the settings into Firefox.
Firefox> Edit> Preferences> Advanced tab> Network tab> Settings button.
Select Manual proxy configuration
SOCKS Host: localhost Port: 9999
SOCKS v5
No Proxy for: localhost, 127.0.0.1
Screenshot below.
Note: Sometimes localhost can cause a problem. If your settings are right and it still is not working replace localhost with 127.0.0.1.
Using the ssh SOCKS5 proxy all of your info is passed through the tunnel except DNS requests. DNS requests are requests that look up names like google.com and turn them into IP addresses. If you want your DNS requests to go through the SOCKS5 proxy (yes you want this feature -- trust me if you are going through all the trouble to create this encrypted tunnel), you need to do the following.
1. Open up firefox
2. Type about:config on the location bar
3. Filter for the following: network.proxy.socks_remote_dns
4. Set the value to True (Right Click on the value in the column)
5. Restart Firefox
Now all DNS requests will go through the SOCKS5 proxy rather than the local network.
Thanks to Kevdog for the DNS section.
Bookmarks