How to do DNS through a proxy in Firefox?

Solution 1:

  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.

Solution 2:

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.

Solution 3:

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.

Solution 4:

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