I needed to use a ssh tunnel but was behind a proxy server so In this example we are going to use and configure one.
ssh -D 9999 -C root@yourwebsite -o "ProxyCommand=nc -X connect -x PROXYSERVER:PROXYPORT %h %p"
Code language: Bash (bash)
In the browser in proxy settings:
For firefox to pass dns via the tunnel
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