[PLUG] Browser redirection for site testing

Wil Cooley wcooley at nakedape.cc
Fri Nov 30 20:46:59 UTC 2007


On Thu, 2007-11-29 at 21:31 -0800, Eric Wilhelm wrote:
> # from Keith Lofstrom
> # on Thursday 29 November 2007 19:26:
> 
> >THE QUESTION:  Is there some way to ask Firefox for, say,
> >http://123.45.67.89:www.keithl.com/ , so that the browser goes
> >to the right IP address and Apache gets the right browser information,
> >as if DNS was actually pointing there?
> >
> >Yes, I can fake out the DNS on my own browser machine, but I would
> >like a technique that I can use on another machine that I do not
> >control, to make sure the new IP address is reachable before I change
> >the DNS server to point to it.
> 
> You just need a proxy.  For instance, you have squid on a machine that 
> you control and one or more machines are configured to use that as a 
> proxy.  Then just just jiggle the DNS or hosts file on the squid box.

A web proxy is probably the route I would take. It is not particularly
difficult to talk your testers through re-configuring their browsers;
directions for doing so are probably pretty easy to find.

Squid, for example, can be given non-default nameservers and use a hosts
file other than the standard. ('dns_nameservers' and 'hosts_file') The
hosts file is probably the easiest, but you could also test your DNS
changes with split-DNS (such as, for example, queries from the proxy
only getting the new addresses).

"Pound" is also a nice option for a web proxy; it's much simpler than
Squid (although I have never found Squid particularly difficult). If you
wanted ultimate control, of course, you could probably whip together
something with a few modules from CPAN.

Wil




More information about the PLUG mailing list