I am using Firefox 3.5.7 with FoxyProxy. I have an ssh tunnel forwarding 8080 through to an HTTP proxy server on the other end. With FoxyProxy, I send work traffic direct but everything else goes through the proxy server. DNS lookups, though, still go to work's DNS servers for resolution. Is there an add-on that can funnel certain DNS traffic to the OS but shove everything else through my ssh tunnel? It's a long shot, but it never hurts to ask....

  1. In firefox type this in your address bar:

    about:config

  2. Click that you promise to be careful.

  3. In the filter textbox, type: proxy

  4. Find the preference name called network.proxy.socks_remote_dns. Double click it to set it to true.

Firefox will now proxy DNS requests instead of trying to resolve them locally.

  • I always forget this step, very important. – Spencer K Sep 14 '12 at 15:19
  • @NickKavadias Thanks for the awesome answer. By the way, do you know why Firefox acts in a "hipster" manner? For example this option is true on other browsers by default. Also, other browsers use Windows Certificate Store by default but Firefox doesn't etc. Do you know why Firefox is configured to act this way? – Utku Nov 10 '15 at 10:21
  • @Utku probably was originally written before SOCKS5. SOCKS4 didn't support the proxy handling DNS queries. – Boyd Stephen Smith Jr. Aug 17 at 20:45

Some time has passed. In the current firefox version you can check "Remote DNS" directly in the Network settings where you set the proxy settings.

  • Very good hint! No need to go to about:config anymore, it can be configured in the (graphical) settings dialog. But the link you posted is not working anymore. There's a mozillaZine article and bug report #134105. – basic6 Sep 4 '15 at 11:23

Configure your ssh client to do Dynamic forwarding (-D flag on the openssh client) so that it acts like a SOCKS server. Then you can do remote DNS lookups via SOCKS. A straight up HTTP proxy doesn't support what you want.

FoxyProxy has info on how to do what you want with SOCKS. Privoxy is another good option, too.

Firefox now has a visual way to enable remote DNS instead of depending on the system DNS. It's a check box next to the SOCKS v5 proxy option, called Remote DNS.

Proxy settings window in Firefox AKA Connection Settings

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.