LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-22-2009, 09:34 AM   #16
matsyuf
Member
 
Registered: Mar 2007
Posts: 97

Original Poster
Rep: Reputation: 15

Mats:/home/ssu# named-checkzone -D 1.168.192.in-addr.arpa db.1.168.192.in-addr.arpa
zone 1.168.192.in-addr.arpa/IN: loading from master file db.1.168.192.in-addr.arpa failed: file not found
Mats:/home/ssu#
 
Old 05-22-2009, 09:39 AM   #17
matsyuf
Member
 
Registered: Mar 2007
Posts: 97

Original Poster
Rep: Reputation: 15
Maybe am missing something in the Options file
 
Old 05-22-2009, 09:41 AM   #18
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,168
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
You have to use the whole path to db.1.168.192.in-addr.arpa if you are not in the /var/chroot/bind9/etc/bind directory
 
Old 05-22-2009, 09:43 AM   #19
matsyuf
Member
 
Registered: Mar 2007
Posts: 97

Original Poster
Rep: Reputation: 15
Sorry I think i excuted the command from wrong part, here is the result again

Mats:/var/chroot/bind9/etc/bind# named-checkzone -D 1.168.192.in-addr.arpa db.1.168.192.in-addr.arpa
zone 1.168.192.in-addr.arpa/IN: loaded serial 20090522
1.168.192.in-addr.arpa. 86400 IN SOA Mats.vun.lan. info.vun.lan. 20090522 36000 18000 518400 172800
1.168.192.in-addr.arpa. 86400 IN NS Mats.vun.lan.
43.1.168.192.in-addr.arpa. 86400 IN PTR vun.lan.
OK
Mats:/var/chroot/bind9/etc/bind#
 
Old 05-22-2009, 11:07 AM   #20
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,168
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
So it works. Check /etc/resolv.conf to make sure that your nameserver is listed first.
Also you can do your tests using your dns:
Code:
dig ns.vun.lan @192.168.1.43
dig -x 192.168.1.43 @192.168.1.43

Last edited by bathory; 05-22-2009 at 11:10 AM.
 
Old 05-23-2009, 07:44 AM   #21
matsyuf
Member
 
Registered: Mar 2007
Posts: 97

Original Poster
Rep: Reputation: 15
Hello I still have aproblem, something isnt right when i check zone configs as below

Mats:/var/chroot/bind9/etc/bind# named-checkconf db.vun.lan
db.vun.lan:1: unknown option '$TTL'
db.vun.lan:3: unknown option 'serial-no'
db.vun.lan:4: unknown option 'refresh,'
db.vun.lan:5: unknown option 'retry,'
db.vun.lan:6: unknown option 'expiry,'
db.vun.lan:7: unknown option 'minimum-TTL,'
db.vun.lan:10: unknown option '@'
db.vun.lan:12: unknown option '@'
db.vun.lan:14: unknown option '@'
db.vun.lan:18: unexpected token near end of file
Mats:/var/chroot/bind9/etc/bind# named-checkconf db.1.168.192.in-addr.arpa
db.1.168.192.in-addr.arpa:1: unknown option '$TTL'
db.1.168.192.in-addr.arpa:4: unknown option 'serial-no'
db.1.168.192.in-addr.arpa:5: unknown option 'refresh,'
db.1.168.192.in-addr.arpa:6: unknown option 'retry,'
db.1.168.192.in-addr.arpa:7: unknown option 'expiry,'
db.1.168.192.in-addr.arpa:8: unknown option 'minimum-TTL,'
db.1.168.192.in-addr.arpa:13: unexpected token near end of file
Mats:/var/chroot/bind9/etc/bind#
 
Old 05-23-2009, 07:59 AM   #22
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,168
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
You use named-checkzone to check the zone files and named-checkconf to check named.conf.
 
Old 05-23-2009, 11:40 AM   #23
matsyuf
Member
 
Registered: Mar 2007
Posts: 97

Original Poster
Rep: Reputation: 15
Thanks Bathory, I have sorted out my zone files but I think i now have a problem with my name.config.options, Am almost sure its reason I am failing to dig coz my server isn't listening to the network and when i put listen to the network 192.168.1.43, server fails to start on /etc/init.d/bind9 restart

below is my current options file

Mats:/var/chroot/bind9/etc/bind# cat named.conf.options
options {
directory "/var/cache/bind";
listen-on port 53 {192.168.1.0;}
allow-query {192.168.1.0/24;127.0.0.1;};

// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113

// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.

forwarders {
196.0.3.70;
};

auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};

Mats:/var/chroot/bind9/etc/bind#

Mats:/var# /etc/init.d/bind9 restart
Stopping domain name service...: bind9rndc: connect failed: 127.0.0.1#953: connection refused
.
Starting domain name service...: bind9 failed!
Mats:/var#

I think when i dig I have to get results below

Mats:/# vun.lan

; <<>> DiG 9.3.4 <<>> vun.lan
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54950
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;vun.lan. IN A

;; ANSWER SECTION:
vun.lan. 64800 IN A 192.168.100.43

;; AUTHORITY SECTION:
vun.lan. 64800 IN NS Mats.vun.lan.

;; ADDITIONAL SECTION:
Mats.vun.lan. 64800 IN A 192.168.100.1

;; Query time: 1 msec
;; SERVER: 192.168.1.53#53(192.168.1.53)
;; WHEN: Tue may 23 09:33:40 2008
;; MSG SIZE rcvd: 79

(I have just edited sample from link to fit mine - http://www.cahilig.org/how-setup-a-l...d-ubuntu-linux)

Mine when i dig

Mats:/# dig vun.lan

; <<>> DiG 9.5.1-P1 <<>> vun.lan
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 35113
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;vun.lan. IN A

;; AUTHORITY SECTION:
. 10799 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2009052300 1800 900 604800 86400

;; Query time: 517 msec
;; SERVER: 196.0.3.70#53(196.0.3.70)
;; WHEN: Sat May 23 19:39:23 2009
;; MSG SIZE rcvd: 100

Mats:/#

What can I do - if you take not, I instead see my isp server
 
Old 05-23-2009, 12:05 PM   #24
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,168
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
listen-on port 53 {192.168.1.0;}
The above is wrong because according to your settings your dns ip is 192.168.1.43
You don't need at all this statement, so that named listens on all available interfaces (localhost and 192.168.1.43) and you don't get the following error:
Quote:
Stopping domain name service...: bind9rndc: connect failed: 127.0.0.1#953: connection refused
.
Starting domain name service...: bind9 failed!
Check the log files to see if there is another reason because named fails to start.
Since named is not running you get a response from the internet and of course the query fails.

Last edited by bathory; 05-23-2009 at 01:16 PM. Reason: typos
 
Old 05-23-2009, 01:11 PM   #25
matsyuf
Member
 
Registered: Mar 2007
Posts: 97

Original Poster
Rep: Reputation: 15
Alright I have commented this satement and now bind restarts ,however i still dont resolv when i dig. Below is all the info I guess you may need or ask me about.

Cheers

Mats:/# dig vun.lan

; <<>> DiG 9.5.1-P1 <<>> vun.lan
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 11781
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;vun.lan. IN A

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat May 23 21:09:03 2009
;; MSG SIZE rcvd: 25

Mats:/#

Mats:/# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
Mats:/#

Mats:/# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.43
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.43, 196.0.3.70
search vun.lan
Mats:/#

Mats:/# cat /etc/hostname
Mats.vun.lan
Mats:/#

Mats:/# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain
#192.168.1.43 Mats.vun.lan Mats
127.0.1.1 Mats.vun.lan Mats
#127.0.1.1 Mats.WORKGROUP Mats

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Mats:/#
 
Old 05-23-2009, 01:23 PM   #26
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,168
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Going back to your 1st post I saw that you don't have an entry for vun.lan in the zone file db.vun.lan. Add the entry:
Code:
vun.lan. IN A 192.168.1.43
increase the serial, restart bind and try again. Also try to resolve www.vun.lan

BTW could you please edit your 1st post and change the fonts size cause it's difficult to read.
 
Old 05-23-2009, 02:34 PM   #27
matsyuf
Member
 
Registered: Mar 2007
Posts: 97

Original Poster
Rep: Reputation: 15
MY 1st POST

I have configure a LAN dns server but I get an error when i check configurations as below

No Error

Mats:/var/chroot/bind9/etc/bind# named-checkzone vun.lan. db.vun.lan
zone vun.lan/IN: loaded serial 20090521
OK
Mats:/var/chroot/bind9/etc/bind#

Error

Mats:/var/chroot/bind9/etc/bind# named-checkzone vun.lan. db.1.168.192.in-addr.arpa
zone vun.lan/IN: NS 'Mats.vun.lan' has no address records (A or AAAA)
zone vun.lan/IN: loaded serial 20090521
OK
Mats:/var/chroot/bind9/etc/bind#


How can I get ride of that error, below are my zone files

zone.vun.lan

Mats:/var/chroot/bind9/etc/bind# cat db.vun.lan
$TTL 172800
@ IN SOA Mats.vun.lan. info.vun.lan. (
20090521; serial-no
36000; refresh, seconds
18000; retry, seconds
518400; expiry, seconds
172800; minimum-TTL, seconds
)
@ IN NS Mats.vun.lan.
@ IN MX 10 Mats.vun.lan.

Mats.vun.lan. IN A 192.168.1.43

www IN A 192.168.1.43

Mats:/var/chroot/bind9/etc/bind#

REVERSE ZONE

Mats:/var/chroot/bind9/etc/bind# cat db.1.168.192.in-addr.arpa
$TTL 172800
@ IN SOA Mats.vun.lan. info.vun.lan. (
20090521; serial-no
36000; refresh, seconds
18000; retry, seconds
518400; expiry, seconds
172800; minimum-TTL, seconds
)
@ IN NS Mats.vun.lan.

192.168.1.43 IN PTR Mats.vun.lan.
Mats:/var/chroot/bind9/etc/bind#


Below r my Zone Files

Mats:/var/chroot/bind9/etc/bind# cat db.vun.lan
;
; BIND data file for vun.lan
;
$TTL 604800
@ IN SOA Mats.vun.lan. admin.vun.lan. (
20090524 ; serial
7200 ; Refresh
120 ; Retry
2419200 ; Expiry
604800 ; Default TTL
)
@ IN NS Mats.vun.lan.
@ IN NS Mon.vun.lan.
@ IN A 192.168.1.15
@ IN A 192.168.1.43
@ IN MX 10 Mats.vun.lan.
Mats IN A 192.168.1.43
vun.lan.IN A 192.168.1.43
Mon IN A 192.168.1.15
www IN CNAME Mats
Mats:/var/chroot/bind9/etc/bind#


Mats:/var/chroot/bind9/etc/bind# cat db.1.168.192.rev
;
; BIND data file for 1.168.192
;
$TTL 604800
$ORIGIN 1.1.168.192.in-addr-arpa.
@ IN SOA Mats.vun.lan. admin.vun.lan. (
20090524 ; serial
604800 ; Refresh
120 ; Retry
2419200 ; Expiry
604800 ; Default TTL
)
IN NS Mats.vun.lan.
IN NS Mon.vun.lan.
43 IN PTR Mats.vun.lan.
43 IN PTR vun.lan.
15 IN PTR Mon.vun.lan.
Mats:/var/chroot/bind9/etc/bind#

Mats:/# dig vun.lan

; <<>> DiG 9.5.1-P1 <<>> vun.lan
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 50094
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;vun.lan. IN A

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat May 23 22:24:35 2009
;; MSG SIZE rcvd: 25

Mats:/# dig Mats.vun.lan

; <<>> DiG 9.5.1-P1 <<>> Mats.vun.lan
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 30389
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;Mats.vun.lan. IN A

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat May 23 22:28:19 2009
;; MSG SIZE rcvd: 30

Mats:/#

I still cant resolv.
 
Old 05-23-2009, 04:45 PM   #28
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,168
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Since you don't post the relevant part of your logs regarding named, could you at least post the output of:
Code:
ps -ef|grep named
I'm starting to think that:
1. You're running named chrooted
2. You're editing the wrong zone files
3. You're not increasing the serial no. Btw use a better syntax for the serial no. like the classic YYYYMMDDRR (Year, Month, Date, Revision), so you can have a better overview of the changes you have done.

Also explain this:
Quote:
Mats:/var/chroot/bind9/etc/bind# cat db.vun.lan
$TTL 172800
@ IN SOA Mats.vun.lan. info.vun.lan. (
20090521; serial-no
36000; refresh, seconds
18000; retry, seconds
518400; expiry, seconds
172800; minimum-TTL, seconds
)
@ IN NS Mats.vun.lan.
@ IN MX 10 Mats.vun.lan.

Mats.vun.lan. IN A 192.168.1.43

www IN A 192.168.1.43


Below r my Zone Files

Mats:/var/chroot/bind9/etc/bind# cat db.vun.lan
;
; BIND data file for vun.lan
;
$TTL 604800
@ IN SOA Mats.vun.lan. admin.vun.lan. (
20090524 ; serial
7200 ; Refresh
120 ; Retry
2419200 ; Expiry
604800 ; Default TTL
)
@ IN NS Mats.vun.lan.
@ IN NS Mon.vun.lan.
@ IN A 192.168.1.15
@ IN A 192.168.1.43
@ IN MX 10 Mats.vun.lan.
Mats IN A 192.168.1.43
vun.lan.IN A 192.168.1.43
Mon IN A 192.168.1.15
www IN CNAME Mats
How on earth catting the same file you get 2 different results?

So please answer to the above Qs and also post the part of /var/log/syslog, or /var/log/messages when named restarts to see where it loads the zone files.
 
Old 05-24-2009, 10:05 PM   #29
amplifire
LQ Newbie
 
Registered: May 2009
Posts: 11

Rep: Reputation: 0
matsyuf, my problem is solved. What i did is that i removed the bind rpms and caching-nameserver rpm and then reinstalled them. Then i again configured my named.conf and zone files. then restarted my named service. This time when i digged my dns it replied positively.
I think you also probably need to remove and then reinstall these rpms, then i think the DNS is gonna work properly!!
Regards
 
Old 05-25-2009, 04:13 AM   #30
matsyuf
Member
 
Registered: Mar 2007
Posts: 97

Original Poster
Rep: Reputation: 15
Hello , below are the ans

Mats:/home/ssu# ps -ef | grep named
root 3488 3081 0 12:10 pts/0 00:00:00 grep named
Mats:/home/ssu#

- Yes am running named chrooted
- I increase the serial

Am sorry i didn't explain b4, but I cat both the db.vun.lan and also the reverse file db.1.168.192.rev thats why I gave 2 different results.

Hello amplifire, I will try your solution too though i think rpm are for another distribution and am using Debian Lenny.

Thanks guys, waiting to hear from you
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error in dns yash singh Linux - Newbie 2 10-22-2008 06:48 PM
dns error rohit_67066 Linux - Networking 2 03-02-2008 07:25 AM
dns error rohit_67066 Linux - Server 5 01-29-2008 03:35 AM
Win2k3 DNS + PFsense DNS Forwarder = No internal DNS resolution Panopticon Linux - Networking 1 11-19-2007 09:59 PM
TEMP_FAILURE: DNS Error: Timeout while contacting DNS servers when receiving emails tonysutherland Linux - Networking 2 02-10-2006 09:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration