default DNS response for unknown hosts?

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

> -----Original Message-----
> From: bind-users-bounce at [mailto:bind-users-bounce at] On
> Behalf Of Mike Parker
> Sent: Thursday, January 16, 2003 8:09 AM
> To: comp-protocols-dns-bind at
> Subject: Re: default DNS response for unknown hosts?
> I asked an extremely similar question - my setup is cable, however if
> 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
> 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"
> ======================================
> 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,
> overwrites the existing named.conf with my 'down' defaults, one of
> 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
> this meant that I had to ensure that my down zone had mx record info

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
> 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> wrote in message
> news:b01nkj$4ats$1 at
> >
> > 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
> > 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 -
> > 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
> > 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,
> > the browser doesn't get an ip address back).
> >
> >
> > Question: is there a way to teach the bind daemon to return some
> > 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