PDA

View Full Version : How to check if DNS is functioning


new_bee05
30th November 2005, 07:38
How do I check if my Debian DNS Server is functioning correctly.

Ovidiu
30th November 2005, 08:20
well I sugest testing the domains that your DNS server is hosting, go here (http://www.dnsreport.com) and test your domain. just enter yourdomain.com on the lefthand, press enter and you`re done

falko
30th November 2005, 11:53
How do I check if my Debian DNS Server is functioning correctly.
You can use dig to test it, e.g.

dig @localhost example.com
dig@localhost MX example.com
dig @localhost ANY example.com

new_bee05
30th November 2005, 15:14
OK I get this when typing: dig @localhost mydomain.com

SERVFAIL, id:30662

which means?

Also nslookup gives me:
Server: 192.168.1.100
Address: 192.168.1.100#53

is this correct?

falko
30th November 2005, 17:11
Your DNS server isn't running. Try to restart it, and have a look at the logs in /var/log to see if any errors occur.

new_bee05
1st December 2005, 00:39
I have restarted bind 9 same result. how do i open the log files so i can view them.

falko
1st December 2005, 01:07
I have restarted bind 9 same result. how do i open the log files so i can view them.

Run
tail -n100 /var/log/syslog
or
tail -n100 /var/log/messages

This will sshow the last 100 lines of these files.

new_bee05
1st December 2005, 01:57
Only error messages I can see are:

myhost named[1872]: zone mydomain.com/IN: loading master file zones/master/master.mydomain.com: not at top of zone

myhost named[1518]: zone 1.168.192.IN-ADDR.ARPA/IN: loading master file zones/192.168.1.rev: unexpected end of input

myhost named[1518]:dns_rdata_fromtext: zones/192.168.1.rev:3: near eol: unexpected end of input

falko
1st December 2005, 10:10
myhost named[1872]: zone mydomain.com/IN: loading master file zones/master/master.mydomain.com: not at top of zone

myhost named[1518]: zone 1.168.192.IN-ADDR.ARPA/IN: loading master file zones/192.168.1.rev: unexpected end of input

myhost named[1518]:dns_rdata_fromtext: zones/192.168.1.rev:3: near eol: unexpected end of input
That's the reason why Bind doesn't start. Try to have a look into these files and try to fix the problems.

till
1st December 2005, 10:44
Only error messages I can see are:

myhost named[1872]: zone mydomain.com/IN: loading master file zones/master/master.mydomain.com: not at top of zone

myhost named[1518]: zone 1.168.192.IN-ADDR.ARPA/IN: loading master file zones/192.168.1.rev: unexpected end of input

myhost named[1518]:dns_rdata_fromtext: zones/192.168.1.rev:3: near eol: unexpected end of input

I guess you are not the owner of the domain mydomain.com and your server is connected to the internet?

joe
1st December 2005, 20:07
Actually, it looks more like a syntax error in the 192.168.1.rev file. Even if he didn't own mydomain.com, he could still publically advertise it -- then the people who listened to his DNS server would be given poisoned records.

new_bee05
2nd December 2005, 01:46
my.domain is only the example. My domain is www.ecompos-kicks-ass.net. I think it has something to do with zones not functioning properly. Also when I browse to this address I get the login screen for my DSL modem. I have forwarded the ports (80) to 192.168.1.100 and still no luck.

joe
2nd December 2005, 03:54
Try the named-checkconf utility

new_bee05
2nd December 2005, 04:17
tried that Joe still no luck. If I opened port 80 on my router why is it still displaying the router login page?

falko
2nd December 2005, 10:08
First, I'd try to check if you have Windows line breaks instead of Unix line breaks in your zone files.

Secondly, when I try to access http://www.ecompos-kicks-ass.net/, I don't even get your modem login screen. I get some DNS error message. A dig shows this:

; <<>> DiG 9.2.1 <<>> ANY www.ecompos-kicks-ass.net
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 60865
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;www.ecompos-kicks-ass.net. IN ANY

;; AUTHORITY SECTION:
net. 10800 IN SOA a.gtld-servers.net. nstld.verisign-grs.com. 1133514333 1800 900 604800 900

;; Query time: 29 msec
;; SERVER: 81.169.163.104#53(81.169.163.104)
;; WHEN: Fri Dec 2 10:06:16 2005
;; MSG SIZE rcvd: 116 which means there aren't any records defined yet, and the authoritative name server for the domain is a.gtld-servers.net.

new_bee05
2nd December 2005, 12:49
Falco, I have been told that it is working. Can you check it again.

Are these DNS records that you are talking about? Do I have to setup forward and reverse zones. Is there anything else?

Also can I have more than one email address with this domain. I have admin@ecompos.kicks-ass.net but I would like to set up a couple more is this possible using the debian console.

Thanks for all your patience Falco.

falko
2nd December 2005, 20:45
Falco, I have been told that it is working. Can you check it again.
No, it's not working.

Are these DNS records that you are talking about? Do I have to setup forward and reverse zones. Is there anything else?

The responsible name server for your domain is a.gtld-servers.net which is not a server you run, I guess. So you have to contact the owner/administrator/... and tell him to create all needed DNS records. Maybe there's also a web interface where you can create these records yourself.

However, you needn't create DNS records on your own server - it doesn't make sense because your server isn't authoritative for your domain.

Also can I have more than one email address with this domain. I have admin@ecompos.kicks-ass.net but I would like to set up a couple more is this possible using the debian console.

You can have as many email addresses as you like. http://www.howtoforge.com/forums/showthread.php?t=2

new_bee05
12th December 2005, 02:48
falco,
I obvously have not set up my zone files correctly. Are there any how to's or examples on how to do this?

till
12th December 2005, 09:39
Have you thought about using a config tool like ISPConfig that enables easy DNS record creation trogh an web interface?

falko
12th December 2005, 10:04
falco,
I obvously have not set up my zone files correctly. Are there any how to's or examples on how to do this?
http://langfeldt.net/DNS-HOWTO/BIND-9/

new_bee05
13th December 2005, 05:16
falco,
i have been reading up on DNS from the link you gave me. Would you be so kind as to test my DNS server again please.

ecompos.kicks-ass.net

Thank u

falko
13th December 2005, 10:03
Do you mean ecompos.kicks-ass.net or ecompos-kicks-ass.net (previously you were talking about the latter, but it's a difference...)?

~# dig any ecompos.kicks-ass.net

; <<>> DiG 9.2.1 <<>> any ecompos.kicks-ass.net
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10389
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 5

;; QUESTION SECTION:
;ecompos.kicks-ass.net. IN ANY

;; ANSWER SECTION:
ecompos.kicks-ass.net. 60 IN A 60.241.29.183

;; AUTHORITY SECTION:
kicks-ass.net. 83764 IN NS ns2.dyndns.org.
kicks-ass.net. 83764 IN NS ns3.dyndns.org.
kicks-ass.net. 83764 IN NS ns4.dyndns.org.
kicks-ass.net. 83764 IN NS ns5.dyndns.org.
kicks-ass.net. 83764 IN NS ns1.dyndns.org.

;; ADDITIONAL SECTION:
ns1.dyndns.org. 86138 IN A 63.208.196.90
ns2.dyndns.org. 85889 IN A 204.13.249.81
ns3.dyndns.org. 86138 IN A 204.13.250.81
ns4.dyndns.org. 85238 IN A 213.155.150.205
ns5.dyndns.org. 85889 IN A 63.208.196.91

;; Query time: 46 msec
;; SERVER: 81.169.163.104#53(81.169.163.104)
;; WHEN: Tue Dec 13 10:01:03 2005
;; MSG SIZE rcvd: 235

new_bee05
13th December 2005, 10:17
Falco,
I am talking about ecompos.kicks-ass.net. Is it still not working?

falko
13th December 2005, 12:46
ecompos.kicks-ass.net is now pointing to 60.241.29.183, as I've posted above. If this is your public IP address, then it's ok.