William Park <(E-Mail Removed)> writes:
> pantomas <(E-Mail Removed)> wrote:
> > I have a standalone linux box without internet connection.
> > It should redirect all http requests to a single information page.
> > The problem is with dns.
> > Is it possible to configure some dns server which will return always the
> > same addr?
> > www.cnn.com -> 192.168.1.1
> > www.yahoo.com -> 192.168.1.1
> >
> > Or maybe some other solution?
>
> Well, you can do anything locally. Just edit /etc/named.conf and create
> zone files for <cnn.com> and <yahoo.com>. Then, all your machine will
> think that you're authoritative nameserver for those domains.
This will work only if you create zones for all expected domains;
it won't work if the requirement means that requests to sites not
known in advance should also be redirected. Some possible ways to
redirect *all* requests are:
1. Use wildcard records in DNS. See the debate over VeriSign's
recent use of wildcards for some of the problems they can cause.
2. Require all HTTP requests to go through a proxy that's configured
to respond identically to every request.
3. Redirect HTTP requests at the network layer using a firewall or
other packet filtering/forwarding mechanism.
All of these possibilities have potential problems and limitations;
you'll have to evaluate which, if any, best fits your requirements.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/