[Dnsmasq-discuss] Bad Host Request error when using dnsmaq to resolve hostnames on a browser

Rune Kock rune.kock at gmail.com
Fri Apr 10 23:19:13 BST 2009


I think that it's Thorin that decides to send a "bad host request".

As you may know, a http-request passes along the host/domain name, so
that if you run a number of domains on one computer with one
IP-address, it is still possible to destinguish the requests for the
different domains.  (An aside: this is not possible with e.g. ftp:
that protocol just connects to the server on the ip, and doesn't tell
the server the domain.  Thus, you cannot run more than one anonymous
ftp-service on a single ip-address).

My guess is that Thorin looks at the domain name passed, and doesn't
recognize itself.  And the sends that "bad host request" message.  If
my theory is right, dnsmasq is doing its job perfectly, and Thorin
just insists on getting accessed by IP-address, not by that host name.

Maybe, you can tell whether you're seeing a Firefox error message, or
a webpage showing an error from Thorin?


Rune


On Fri, Apr 10, 2009 at 22:38, Grant D. Vallance <abapere at googlemail.com> wrote:
> Hello,
>
> I am sorry to bother the list, but I am having trouble sorting out an issue
> using dnsmasq to resolve hostnames via a browser on my LAN. (The error "Bad
> Host Request" comes up when using IE and Firefox on an XP box and on Firefox
> on a Fedora box.)
>
> What I want to do is either type in a FQDN or alias into my browser to bring
> up various hosts -- servers and routers etc. So rather than type in
> 192.168.0.100 to access one of my routers I want to type in either: thorin
> or thorin.home.abapere.com However, when I do this I get "Bad Host Request"
>
> I am a relatively new to networking so I do apologise if I have missed out
> something obvious ... And I have looked through the documentation, the list,
> and googled extensively, but to no avail.
>
> dnsmasq is set up on a CentOS 5.2 box. It is on Gandalf (192.168.0.20). I am
> running version 2.47.
>
> The service is running fine.
>
> The /etc/hosts looks like this:
>
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 127.0.0.1 localhost.localdomain localhost
> ::1 localhost6.localdomain6 localhost6
> 192.168.0.20 argonath.home.abapere.com
> 192.168.0.10 gandalf.home.abapere.com gandalf
> 192.168.0.100 thorin.home.abapere.com thorin
> [plus the other remaining boxes on the network filled out as above with
> different names and IP addresses]
>
> /etc/dnsmasq.conf is what ships with dnsmasq with the following uncomments,
> alterations:
>
> bogus-priv
> expand-hosts
> domain=home.abapere.com
> dhcp-range=192.168.0.200,192.168.0.205,12h
>
> The DHCP server works well.
>
> I can use nslookup both under Linux and Windows XP and get the correct
> results.
>
> I can also use ping in both Linux and Windows (although in Windows I have to
> add a full-stop at the end of the alias). E.g. in Linux ping thorin OR/ ping
> thorin.home.abapere.com works beautifully.
>
> For example, on a Fedora 9 box (Bilbo), if I type in:
> $ nslookup gandalf
>
> I get:
> Server:        192.168.0.20
> Address:      192.168.0.20#53
>
> Name:         gandalf
> Address:      192.168.20
>
> Which is correct.
>
> Or if I type in:
> nslookup frodo
>
> I get:
> Server:        192.168.0.20
> Address:      192.168.0.20#53
>
> Name:         frodo
> Address:      192.168.111
>
> Which is also correct. And so on ...
>
> Is there anything obvious I have missed?
>
> Why would everything work using command line tools like nslookup and ping
> but not with the browser?
>
> Thank you very much for your help.
>
> Regards,
>
> Grant D. Vallance
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>



-- 
What matters is the fun on the road, not whether we reach our
destination.  Still it is the goal that motivates us to begin the
journey.



More information about the Dnsmasq-discuss mailing list