Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Up front: the per browser (or per process, if you will) part is the important part here. I'm well aware of the /etc/hosts(and its Windows counterpart), but would like to avoid this system-global method.

What tools exist to override the IP for a given (i.e. configurable) name per browser? For Firefox there are "Modify Headers" and "Tamper Data". Both of them do not appear to be suitable for my case, because the DNS lookup is done before that. So I can only modify the HTTP headers (e.g. the Host header), but not influence the IP to which it gets sent. But manipulating to what IP it gets sent is exactly what I want to do.

share|improve this question
up vote 3 down vote accepted

That can be done using the .Net Proxy Fiddler2 and a little bit of FiddlerScript.

The sample script for redirecting traffic can be found in the sample script section "Point all requests for one server to a different server, including HTTPS tunnels" on:

share|improve this answer

A method that works with all browsers is to set up a proxy server, such as Privoxy or Squid, that has the ability to rewrite requests. When a HTTP proxy server is used, the full URL is sent to the proxy without performing any name resolution.

share|improve this answer
Thanks. But how do I get the proxy to send the request to an IP that does not match the host name via DNS lookup (on the proxy)? It seems to me this ultimately just shifts the problem to the proxy ... – 0xC0000022L Apr 26 '11 at 10:13
Perhaps you could set up a proxy running in a chroot environment with a modified /etc/hosts, listening on a local port. Then configure each browser to use/not use this local proxy as required. A bit convoluted, but it might work. – user89061 Jul 8 '11 at 21:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .