default DNS response for unknown hosts?

David Botham dns at botham.net
Thu Jan 16 21:17:26 UTC 2003




> -----Original Message-----
> From: bind-users-bounce at isc.org [mailto:bind-users-bounce at isc.org] On
> Behalf Of Mike Parker
> Sent: Thursday, January 16, 2003 8:09 AM
> To: comp-protocols-dns-bind at isc.org
> Subject: Re: default DNS response for unknown hosts?
> 
> I asked an extremely similar question - my setup is cable, however if
it
> goes down I want to redirect all web access to a status page on my
> webserver
> advising of the problem. As you have correctly pointed out, you can
> redirect
> the web traffic however its the dns failing that prevents the users
from
> viewing the web page.
> 
> Kevin Darcy kindly replied with the following :-
> 
> ======================================
> BIND has no built-in way to do this, but you could script a
> reconfiguration of BIND whenever the network fails and then again when
> it is restored again; a "fake" root zone with a wildcard A record
> pointing to your local server should suffice while in "disconnected"
mode.
> ======================================
> 
> The way I have resolved my problem is with a script running in the
> background monitoring the internet status. If it detects an no access,
it
> overwrites the existing named.conf with my 'down' defaults, one of
which
> has
> a root zone entry to my down zone file and then use ndc reload.
> I also wanted my script to mail me details of the internet going down
and
> this meant that I had to ensure that my down zone had mx record info
etc.

I am assuming that you are sending this email to an internal server.  If
not, how do you send out email when your internet connection is down?


> When the internet is restored I simply replace named.conf with my
original
> file and reload.
> 
> I know that this does not solve your exact problem however when you
> establish your isdn connection, your script could then reconfigure
> named.conf etc and similarly when you disconnect from isdn.
> 
> Hope this helps
> Mike
> 
> 
> "Alexander Widmann" <alexander.widmann at gmx.de> wrote in message
> news:b01nkj$4ats$1 at isrv4.isc.org...
> >
> > Hi folks,
> >
> > I have a private lan connected to the internet via a linux router
> > (dialup ISDN, iptables). Within the lan, there's a couple of windoze
> > clients as well as another linux box running apache and bind
(caching
> > only).
> >
> > With this setup, I'm trying to do the following:
> >
> > whenever the router is offline, all http requests from the lan (win
> > clients) should get redirected to the linux box running apache. In
> > case the ISDN connection is up, the requests should get send out to
> > the internet.
> >
> > I already tried to redirect all (http) requests to the outside world
> > to my apache box using iptables whenever the ppp link is down -
works
> > fine as long as the requested url can be resolved from bind's cache
> > (browser gets an ip address back from the DNS query, tries to
contact
> > the remote server and gets redirected to the local apache). In case
> > the bind daemon cannot answer the DNS query from its cache this
> > doesn't work (naturally, since bind cannot forward the request,
hence
> > the browser doesn't get an ip address back).
> >
> >
> > Question: is there a way to teach the bind daemon to return some
sort
> > of a default ip address (address of the apache box) for all DNS
> > requests which would normally have to be forwarded to other DNS
> > servers on the internet?
> >
> > Any other ideas how to solve the problem?
> >
> > Tanx a lot in advance,
> >
> > Alex
> >




More information about the bind-users mailing list