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.

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 [somedomain.com] 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

Thanks

share|improve this question
1  
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

1 Answer 1

up vote 0 down vote accepted

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

dig @127.0.0.1 somedomain.com

This should produce output like:

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_5.3 <<>> @localhost somedomain.com
; (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

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

;; ANSWER SECTION:
somedomain.com.    14400     IN      A       1.2.3.4

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
1  
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

 
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.