Can't Resolve Domains

ztschutt

New Member
Messages
13
Reaction score
0
Points
0
I just installed Debain, although I've had the same problem with every other OS I've installed. The only ones that I have not had trouble with are the CentOS varients that already have something installed on them. So the only OS's I've installed that work correctly are the CentOS with VNC GUI and CentOS with LXadmin/Kloxo. I have tried to read into it and some people say it has something with my name servers not being correctly setup or something. Does anyone know how to get everything working? I can ping IP addresses fine, but anytime I try to do anything with a domain name it says something similar to this:
Code:
root@ns1:~# ping google.com
ping: unknown host google.com

root@ns1:~# ping www.google.com
ping: unknown host www.google.com
Everything works fine if I use an IP Address. (I pinged Google's IP address)
Code:
root@ns1:~# ping 74.125.224.72
PING 74.125.224.72 (74.125.224.72) 56(84) bytes of data.
64 bytes from 74.125.224.72: icmp_req=1 ttl=54 time=50.1 ms
64 bytes from 74.125.224.72: icmp_req=2 ttl=54 time=49.9 ms
64 bytes from 74.125.224.72: icmp_req=3 ttl=54 time=50.0 ms
64 bytes from 74.125.224.72: icmp_req=4 ttl=54 time=50.1 ms
64 bytes from 74.125.224.72: icmp_req=5 ttl=54 time=50.0 ms


--- 74.125.224.72 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 49.975/50.090/50.173/0.073 ms

I can't use the Package Manager because it can't resolve any of the URL's for the mirrors. :(

---------- Post added at 01:58 PM ---------- Previous post was at 01:02 PM ----------

Okay, so as it turns out since I had a blank /etc/resolv.conf file the OS was unable to resolve domains. I just added two name servers and everything works correctly now!

For future reference, I found the nameservers in the resolv.conf file of one of the working installations.
 

Mr. DOS

Member
Messages
230
Reaction score
5
Points
18
I don't know what the default CentOS resolv.conf contains, but I use 8.8.8.8 and 8.8.4.4 They're fast, they're correct, and as they're provided by Google, they have good uptime (as good or better than that of the VPS).

I also have 127.0.0.1 at the end of the file so that I don't have to wait for global propagation to locally access domains I host DNS for.
 
Last edited:
Top