Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to troubleshoot a problem with a new VPS i'm setting up.

The VPS is running Plesk 9 on a CentOS 5 system.

Everything works fine, except it doesn't serve dns requests.

If I try something like

nslookup [] the.ser.ver.ip

to test a DNS query, i get the following error

;; connection timed out; no servers could be reached

I can't telnet to it on port 42 either..

I'm guessing something is blocking the requests..

firewall maybe? the plesk firewall module is installed and the nameservers entry is green.

Any other way I can check what's blocking it on the server?

Any help/tip greatly appreciated.

Note: http works, i can telnet to the server on port 80 and i can also ping the server


share|improve this question
What's the output of lsof -i udp:53 ? – Niall Donegan Jan 12 '11 at 12:25
@Niall. Thanks for the command.. didn't know that one. See my comment below Josh's answer – Ben Jan 12 '11 at 22:14
up vote 0 down vote accepted

First try a lookup on the server itself. via SSH, execute:

dig @

This should produce output like:

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_5.3 <<>> @localhost
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59457
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 6

;           IN      A

;; ANSWER SECTION:    14400     IN      A

If it doesn't, check that the nameserver is actually running. You didn't specify which nameserver, but for BIND you can restart it with:

/etc/init.d/named restart

If you do get an answer, it means the name server is running. Most likely the issue is a firewall. Examine the output of iptables --list, looking for lines like:

ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain state NEW

Remember you'll need both UDP and TCP ports 53. If you have lines like that, make sure that the chain is actually being used also.

share|improve this answer
Wooa, noob supreme.. I had not 'activated' the firewall rules in Plesk panel. Worked fine after that.. But I did learn something with your response so thanks anyway.. :) – Ben Jan 12 '11 at 22:13
Glad I could help! – Josh Jan 12 '11 at 22: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.