Alexandre Takacs
asked on
How to setup dns resolver in Ubunut 12 server ?
My first Precise Pangolin deployment.
I'm having issues with dns resolution not working - turns out /etc/resolv.conf is not anymore the place to manage this.
I tried to add “dns-nameservers”, “dns-search” and “dns-domain” entries in /etc/network/interfaces but they don't seem to work either (no server could be reached error, although I can ping those listed with dns-nameservers.
My interfaces files reads
auto eth0
iface eth0 inet static
address 172.16.200.50
netmask 255.255.255.0
gateway 172.16.200.1
dns-nameservers 172.16.200.25 172.16.100.5
dns-search mydomain.local
If I do a host xxx.domain.com 172.16.200.25 it works - it's just that there is a config problem with default resolvers.
What am I missing ?
I'm having issues with dns resolution not working - turns out /etc/resolv.conf is not anymore the place to manage this.
I tried to add “dns-nameservers”, “dns-search” and “dns-domain” entries in /etc/network/interfaces but they don't seem to work either (no server could be reached error, although I can ping those listed with dns-nameservers.
My interfaces files reads
auto eth0
iface eth0 inet static
address 172.16.200.50
netmask 255.255.255.0
gateway 172.16.200.1
dns-nameservers 172.16.200.25 172.16.100.5
dns-search mydomain.local
If I do a host xxx.domain.com 172.16.200.25 it works - it's just that there is a config problem with default resolvers.
What am I missing ?
ASKER
The /etc/resolv.conf reads "#DO NOT EDIT THIS FILE" and has one entry "dns-search mydomain.local" (presumably carried over from the interfaces directives).
As for "dig" it times out with an error "no servers could be reached".
As for "dig" it times out with an error "no servers could be reached".
Wow - They changed the location of the resolvers on Ubuntu?
According to this file, you are right on the money on making changes to /etc/network/interfaces according to this link
http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/
Is your DNS server up?
Can you try putting 8.8.8.8 on this file and see if DNS works first
According to this file, you are right on the money on making changes to /etc/network/interfaces according to this link
http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/
Is your DNS server up?
Can you try putting 8.8.8.8 on this file and see if DNS works first
ASKER
Yes my DNS are working ok if I specify them in a "host" lookup. Just that somehow - despite my settings above - the system does not seem to know how to resolve by itself. Although a server it does not have BIND installed and don't really plan to.
As an aside what was the rationale behind removing support for /etc/resolv.conf ? I'm sure it's not just to annoy long time users... [Edited: ok I have followed some of the links above and better understand the change although not 100% convinced].
As an aside what was the rationale behind removing support for /etc/resolv.conf ? I'm sure it's not just to annoy long time users... [Edited: ok I have followed some of the links above and better understand the change although not 100% convinced].
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Self solved
should be something like
Open in new window
can you also post the output of the command 'dig'?
should be something like:
Open in new window