Override DNS in Firefox

13

2

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.

John J. Camilleri

Posted 2010-09-02T11:55:49.793

Reputation: 321

Answers

7

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.

Dysaster

Posted 2010-09-02T11:55:49.793

Reputation: 321

1True 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 – 2010-09-02T14:13:29.523

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 – 2010-09-04T12:38:08.310

5

Fiddler has such an option: Tools->hosts

Alex Reitbort

Posted 2010-09-02T11:55:49.793

Reputation:

Thanks, but unfortunately I'm not able to install it on my machine either... – John J. Camilleri – 2010-09-02T12:26:12.327

3

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

Arjan

Posted 2010-09-02T11:55:49.793

Reputation: 29 084

1

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.

white_gecko

Posted 2010-09-02T11:55:49.793

Reputation: 204

1broken links in post – Hayden Thring – 2019-01-21T21:47:04.740

0

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

https://superuser.com/a/1319727/247728

JayRizzo

Posted 2010-09-02T11:55:49.793

Reputation: 194