Tunnel DNS through ssh -D socks proxy

By | 2012/12/19

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.


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:




Leave a Reply

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

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