Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

On my centos I have a problem.

I cannot:

[root@server]# telnet www.google.com 80
telnet: www.google.com: Name or service not known
www.google.com: Unknown server error
[root@server]# 

However I can dig google.com

[root@server]# dig www.google.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.3 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 42872
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;www.google.com.            IN  A

;; Query time: 0 msec
;; SERVER: 180.188.196.76#53(180.188.196.76)
;; WHEN: Mon Oct 15 20:15:21 2012
;; MSG SIZE  rcvd: 32

[root@server] # 

My resolv.conf is

# Automatically generated by OnApp (2.3.2)
domain com
nameserver 180.188.196.76
nameserver 8.8.4.4
nameserver 8.8.8.8
share|improve this question
    
You put resolv.conf in your tags. Now take a look at it. –  Michael Hampton Oct 15 '12 at 12:19
2  
QUERY, status: REFUSED: no, your dig does not work, check nameservers in resolv.conf –  Gryphius Oct 15 '12 at 12:20

2 Answers 2

At first, it looks like server is refusing your requests:

status: REFUSED

But, if we take closer look, 0 (zero) msec is a very short time (if server isn't in your local network).

Query time: 0 msec

;; SERVER: 180.188.196.76#53(180.188.196.76)

Very hard to say what is the problem...

Do you use some local caching for DNS?

  • Use your local or ISP's DNS, avoid using worldwide-free DNS servers - you might get some problems accessing CDN files.
  • Run BIND
share|improve this answer

Test other domain server (8.8.8.8 or 8.8.4.4 for example):

dig @8.8.4.4 www.google.com

If it could resolve the name, put it in the first place in your /etc/resolv.conf file, then try again the connection against port 80

telnet www.google.com 80

If this is still not working, then the problem is in your internet connection or network configuration, not in the DNS.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.