I'm looking for a way to override DNS entries in Firefox, for development/testing purposes. I know the normal way to do this is via the hosts file, but I cannot edit it since I don't have admin access on my work machine. Does anyone know of a browser plugin/addon which would do this for me?

I did find the SwitchHosts add-on, although it also requires admin rights in order to install itself.

migrated from stackoverflow.com Sep 4 '10 at 12:25

This question came from our site for professional and enthusiast programmers.

One possibility is to have a socks 5 server on a machine that you have administrative control on, set up this machine as your socks proxy in firefox, and change network.proxy.socks_remote_dns in about:config to true. In theory, all DNS lookups should be done through the proxy, so you should be able to supply your own IP addresses.

  • 1
    True that would work, although I was hoping for something a bit simpler.. Also a disadvantage to this method is that I wouldn't be able to change DNS entries on the fly. – John J. Camilleri Sep 2 '10 at 14:13
  • 1
    @John, the "something a bit simpler" might be to talk to your boss to get admin privileges on your development box. This DNS issue is a very good example of why you need that, if you'd ask me! – Arjan Sep 4 '10 at 12:38

Fiddler has such an option: Tools->hosts

  • Thanks, but unfortunately I'm not able to install it on my machine either... – John J. Camilleri Sep 2 '10 at 12:26

If it's just for a few specific requests: the Live HTTP Headers allows for editing HTTP headers and then re-playing the request.

(For other options see also Send Host header when accessing IP address in Firefox on Stack Overflow.)

There are many plug-ins which can change the hosts file:

but they all need write access to the hosts file.

I wonder, why it is not possible to edit the browsers DNS-cache. My use-case: Seeing the local version of a page in one browser and the online version in another browser.

This is my answer to fix this on another post. It has to do with your firefox preferences.


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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.