[Dnsmasq-discuss] dnsmasq not answering other LAN computers
gypsy
gypsy at iswest.com
Thu Jul 3 03:07:18 BST 2008
Tyler Dunn wrote:
>
> I set up dnsmasq on a Ubuntu server and it appears to be working
> locally (will resolve hostnames, using dig I see that the machine is
> caching properly). However, I'm not getting the response that I
> expected from other machines on the LAN. From another Linux box
> (Centos), I put the dnsmasq IP address in the /etc/resolv.conf file,
> but a ping command returns an error and a host command works
> properly. (gerbil is a local machine listed in the dnsmasq server's
> /etc/hosts file.) The host command didn't work either until I
> commented out the listen-address=127.0.0.1 line in /etc/dnsmasq.conf.
>
> root at pbx:~ $ ping gerbil
> ping: unknown host gerbil
> root at pbx:~ $ host gerbil
> gerbil has address 192.168.1.112
> root at pbx:~ $
>
> Also, when I set the DNS server on gerbil to the dnsmasq server's IP
> address (192.168.1.121), it wouldn't return anything when I pinged
> gerbil (or www.yahoo.com for that matter). It also wouldn't resolve
> the names when I put them into a Firefox browser on gerbil. gerbil is
> a win XP machine and I set the DNS server in the Network control
> panel.
>
> My dnsmasq.conf file only has two lines uncommented:
> server=/localnet/192.168.0.1
Is this a typo? That is surely NOT your local network.
Why not try this on the DNSMasq machine?:
resolv.conf
search YOURDOMAIN.TLD
nameserver 127.0.0.1
dnsmasq.conf
(remark the two lines above)
domain-needed
log-queries
no-resolv
server=UPSTREAM.DNS.SERVER.IP
Make sure that works on the DNSMasq machine and then ping yahoo from
gerbil.
> I would like to get it fixed so that I don't have to type the IP
> address when I access local machines on the LAN. I don't want to update
> all the hosts file anytime the network changes.
There is no easy way that I know to be able to use DHCP and still
resolve local machines, but I can't use DNSMasq where I need that
(Windows) so I've never dug into that part. Perhaps a search of this
mailing list will provide you an answer.
More information about the Dnsmasq-discuss
mailing list