How to do DNS through a proxy in Firefox?

31

16

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....

Jace Luken

Posted 2010-02-02T01:16:03.357

Reputation:

Answers

37

  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.

Nick Kavadias

Posted 2010-02-02T01:16:03.357

Reputation: 1 888

@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 – 2015-11-10T10:21:06.943

@Utku probably was originally written before SOCKS5. SOCKS4 didn't support the proxy handling DNS queries. – Boyd Stephen Smith Jr. – 2018-08-17T20:45:40.727

I always forget this step, very important. – Spencer K – 2012-09-14T15:19:26.053

11

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.

keiki

Posted 2010-02-02T01:16:03.357

Reputation: 331

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 – 2015-09-04T11:23:48.300

7

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.

herrtodd

Posted 2010-02-02T01:16:03.357

Reputation: 716

3

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

Akkad

Posted 2010-02-02T01:16:03.357

Reputation: 31