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.

Ive been playing aroudn with the twitter API in a webserver and in my local machine. Ive noticed that in my local machine it works MUCH slowlier, so I think I have some DNS problems. Doint this commands gave me:

time echo "" | nc google.com 80

time: 20 seconds

time echo "" | nc 80

time: Instantly

Im running Ubuntu 11.10. Do you guys know how could I solve this? Thanks

share|improve this question
Pedantic comment: DNS is not the same as resolving. They are two different functions. You had a resolver problem, not a DNS problem. –  anastrophe Dec 10 '11 at 17:53
Why is this question downvoted? –  Dbugger Mar 20 '14 at 20:27
Note me that downvoted it but your analysis of the problem is incomplete. –  symcbean Mar 20 '14 at 23:41
What do you mean with "incomplete"? What do you thing is missing? –  Dbugger Mar 20 '14 at 23:59

2 Answers 2

Try using dig to debug the DNS output. It will give you the response time of your nameserver:

$ dig google.com

; <<>> DiG 9.6-ESV-R4-P3 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7643
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0

;google.com.            IN  A

google.com.     211 IN  A
google.com.     211 IN  A
google.com.     211 IN  A
google.com.     211 IN  A
google.com.     211 IN  A
google.com.     211 IN  A

;; Query time: 14 msec
;; SERVER: x.x.x.x#53(x.x.x.x)
;; WHEN: Sat Dec 10 17:01:05 2011
;; MSG SIZE  rcvd: 124
share|improve this answer
up vote 0 down vote accepted

I solved it by changing in /etc/resolv.conf

this lines:


This is openDNS. Apparently my router DNS sucks. Thanks!

share|improve this answer
You can use code.google.com/p/namebench to check out which are the fastest DNS servers for your location. –  LinuxDevOps Mar 20 '14 at 20:23
I never use my home router's DNS for this reason - I usually set them as Google's Anycast DNS ( or or Level3's Anycast DNS ( or to 6). –  Mat Carlson Mar 20 '14 at 20:43
It's HIGHLY unlikely that your router is doing anything other than using the DNS providers supplied to it by DHCP - i.e. it's more likely the fault of your service provider. Either that or you've misconfigured the router. –  symcbean Mar 20 '14 at 23:40

Your Answer


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.