[Dnsmasq-discuss] Return an address if unable to resolve?
dmoeller at pobox.com
Thu Oct 18 23:27:28 BST 2007
Thanks for the replys. A couple of notes that might better define my
The clients that will be accessing this will be web only and
unfortunately I don't have the ability to change their configuration.
I have the redirect to port 80 in the system already, but that doesn't
really solve my problem because the client will do a DNS lookup first
and if that fails it won't try to connect to the web server at all.
What I need is for the DNS lookup to return an address when the DNS
lookup fails so that I can redirect them to port 80 on the localhost.
> Doug Moeller wrote:
>> Does anyone know if there is a way to have dnsmasq return a
>> predefined address if it was unable to resolve the name via the DNS
>> servers defined in /etc/hosts and /etc/resolv.conf ?
>> Basically I want it to return the address of the localhost if it's
>> unable to resolve the name. For my application this would be the
>> case when the box running dnsmasq is unable to get to the internet,
>> but I'd like to redirect them to a local web page where I can explain
>> why the Internet link might be down and offer some troubleshooting tips.
>> Any hints or alternative suggestions would be greatly appreciated.
> Doing this via the DNS is not a good idea, IMHO. Firstly, DNS is used
> for more than the web: your mailer, NTP client etc etc may start to
> behave in strange ways if the DNS system lies to them. Secondly
> there's a chance that some systems will cache DNS results, so that
> even when you go back on line, they will fail to work.
> As an alternative, the proxy suggestion is good, or iptables rule
> which just redirect connections to port 80.
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
More information about the Dnsmasq-discuss