[Dnsmasq-discuss] DNSmasq forwarding to DNS doesn't works
matthias.andree at gmx.de
Fri Aug 26 10:17:35 BST 2011
Am 26.08.2011 10:44, schrieb Jérémie SYLVAND:
> We are trying to move from dhcpd + bind to dnsmasq for our small company.
> On the test server, the dhcp provided by dnsmasq works properly, as the
> internal dns who works better than we want : it's possible to ping the
> machine's name given in the dnsmasq.conf, but also the machine's name
> written on the machine (who is different), very good !
> But I'm having an issue with the forwarding to external DNS. My DNS
> can't resolve a request like google.com <http://google.com> so it must
> send it to a DNS upstream, like the DNS of my Internet Servcie Provider/.
> /What I have understood is dnsmasq read the file resolv.conf (or the
> file we have provided) to know DNS upstream, but it doesn't work for me.
> Here is options I have provided in my dnmasq.conf file (without all
> domain=city.domain.com <http://city.domain.com>
> In the file resolv.conf:
> search city.domain.com <http://city.domain.com>
> nameserver 127.0.0.1
> nameserver <ISP 1 IP address1>
> nameserver <ISP 1 IP address2>
> nameserver <ISP 2 IP address1>
> nameserver <ISP 2 IP address2>
> I don't understand why it doesn't work, probably because I don't have
> understood the real functioning of dnsmasq...
> Can you help me ?
the "nameserver 127.0.0.1" is a problem here, because dnsmasq
effectively forwards to itself. I propose the following:
1. modify your dnsmasq.conf:
Add lines similar to these, replacing the IP addresses by the actual
ISPs' DNS resolver addresses:
Note that there must not be a server 127.0.0.1 line!
2. modify your /etc/resolv.conf to read only:
3. kill and restart dnsmasq
4. if it does not work, try if adding "bind-interfaces" and restarting
dnsmasq helps. It may make things better or worse for you.
If nothing works, please show dnsmasq logs -- you've already set
More information about the Dnsmasq-discuss