[Solved] Configuring DNS resolver / Configurer le DNS interne


EN :
I have a problem concerning DNS, I set up a GLUE record at OVH and set up the DNS config as specified in the docs.

However, when I ping google.com on my server, I get this output (let’s say my domain is mydomain.tld and my public ip is

$ ping google.com
PING google.com.mydomain.tld ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=0.033 ms

As I’m a total noob about DNS configuration (I mean, I never set up a local DNS server), any help would be greatly appreciated.

FR :
J’ai un problème à propos de la configuration DNS, j’ai mis en place un GLUE record chez OVH et modifié la config DHCP comme expliqué dans la doc.

Maintenant, quand je ping google.com sur mon serveur, j’ai cette sortie (disons que mon domaine est mydomain.tld et mon ip public

$ ping google.com
PING google.com.mydomain.tld ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=0.033 ms

Comme je suis un gros noob en ce qui concerne la config des DNS (je comprend le bousin, par contre je n’ai jamais déployé de DNS en local), toute aide serait la bienvenue…

Hi @n00dl3,

I’m also quite noob with DNS, but I would naively think you configured some other service on your server which is messing up the dns resolution (maybe Bind ?) ?

Be careful that there is a difference between a) Having a DNS record somewhere so that your domain name points to your ip address (which I guess is what you want), and b) Running your own DNS server/resolver (which I guess you ain’t interested in ?). For a) to work, you should only have to configure your glue record on OVH and that should do it. You can check that it’s working by trying host domain.tld on a linux machine, or a ping does the job also.

Hope that helps

Thanks for your response,
I understand all theses concepts, I’m a local-DNS-configuration-and-deployment noob, not just-a-noob :grinning: .

No, Bind is not installed on my server, only dnsmasq.

Actually, you guessed wrong, I am totally interested in running my own resolver to avoid using public/ISP DNS server .

For a) you don’t have to set a glue record, just change DNS zone at your registrar.

OK, I finally found the problem, dnsmasq wasn’t reading /etc/resolv.conf as it was supposed to.
Adding following line to /etc/dnsmasq.conf solved the problem


For people experiencing same issue, here are an excerpt from my /etc/dnsmasq.conf and from /etc/dhcp/dhclient (I just removed commented lines, you should keep them). These edits saved my life.

/etc/dnsmasq.conf :

interface=tun0 #also listen for openvpn connections
listen-address= #also listen for openvpn connections
log-facility=/var/log/dnsmasq.log #for debuging purpose only

/etc/dhcp/dhclient important lines are marked with ###important!!! :

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
prepend domain-name-servers; ###important!!!
request subnet-mask, broadcast-address, domain-name-servers ,time-offset, routers,
	domain-name, domain-search, host-name,
	dhcp6.name-servers, dhcp6.domain-search,
	netbios-name-servers, netbios-scope, interface-mtu,
	rfc3442-classless-static-routes, ntp-servers;