formats

Tunnel DNS through ssh -D socks proxy



When using ssh -D to setup a socks proxy, DNS queries and DNS traffic are not sent through the ssh tunnel. However, with Firefox a config change can be made to send DNS traffic through the ssh tunnel. Here’s how it works!



First, establish an ssh proxy:

$ ssh -D 9000 user@host


Then in Firefox, enable a SOCKS proxy to localhost, port 9000 (or whatever port desired). This will enable all web traffic to go through that ssh tunnel.


01_socksproxy


Next in order to also send DNS traffic through the proxy, open a Firefox tab and go to about:config

Change the following value to true:

network.proxy.socks_remote_dns



02_socksproxy


Done!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Home linux Tunnel DNS through ssh -D socks proxy