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 173.194.65.103 80

time: Instantly

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

link|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
Lol thanks :) :D – Dbugger Dec 10 '11 at 19:48
feedback

2 Answers

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

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

;; ANSWER SECTION:
google.com.     211 IN  A   209.85.147.147
google.com.     211 IN  A   209.85.147.99
google.com.     211 IN  A   209.85.147.103
google.com.     211 IN  A   209.85.147.104
google.com.     211 IN  A   209.85.147.105
google.com.     211 IN  A   209.85.147.106

;; 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
link|improve this answer
feedback

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

this lines:

nameserver 208.67.222.222
nameserver 208.67.220.220

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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