BIND problem

Hi, I'm trying to test BIND.
/etc/named.conf:
Code:
zone "doctor.org" { type master; file "/etc/namedb/dynamic/doctor.org"; };
zone "88.168.192.in-addr.arpa" { type master; file "/etc/namedb/master/88.168.192.in-addr.arpa"; };

/etc/namedb/dynamic/doctor.org
Code:
$TTL 3h
doctor.org. IN SOA doctor.org. doctor.doctor.org. 42 1d 12h 1w 3h
NS doctor.org.
A 192.168.88.4 ;addres where on which is server
AAAA ::1

/etc/namedb/master/88.168.192.in-addr.arpa
Code:
$TTL 3h
@ SOA @ doctor.doctor.lv 42 1d 12h 1w 3h
@ NS @
@ A 192.168.88.4

And at startup I get:
Code:
server named[564]: zone doctor.lv/IN: loading from master file /etc/namedb/dynamic/doctor.lv failed: unknown class/type
server named[564]: zone doctor.lv/IN: not loaded due to errors.

I don't get where is the problem.
 
Ohh sorry,
/etc/namedb/master/88.168.192.in-addr.arpa
Code:
$TTL 3h
@ SOA @ doctor.doctor.org 42 1d 12h 1w 3h
@ NS @
@ A 192.168.88.4

Code:
server named[564]: zone doctor.org/IN: loading from master file /etc/namedb/dynamic/doctor.org failed: unknown class/type
server named[564]: zone doctor.org/IN: not loaded due to errors.
 
You cannot omit class field in /etc/namedb/dynamic/doctor.org:

Code:
$TTL 3h
doctor.org. IN SOA doctor.org. doctor.doctor.org. 43 1d 12h 1w 3h
     [B]IN[/B]    NS doctor.org.
     [B]IN[/B]    A 192.168.88.4 ;addres where on which is server
     [B]IN[/B]    AAAA ::1

/etc/namedb/master/88.168.192.in-addr.arpa:
Code:
$TTL 3h
@ [B]IN[/B] SOA [B]doctor.org.[/B] doctor.doctor.org 43 1d 12h 1w 3h
@ [B]IN[/B] NS [B]doctor.org.[/B]
[B]4 IN PTR doctor.org.[/B]
 
What's the output of this commands?

% dig @ip.of.dns.server doctor.org
% dig @ip.of.dns.server -x 192.168.88.4

Also please make sure 192.168.88.4 is really exist on your server. After editing that files, you must update serial number and reload your bind.

# service named reload
 
It says for both commands:

192.168.88.4 is the IP of my machine, where I try to configure server.
 
For both commands, I get the same message:
Code:
;<<>> DiG 9.6-ESV-R5-P1<<>> @192.168.88.4 doctor.org
;(1 server found)
;; global options: +cmd
;; connection timed out; no server could be reached
 
Huh?
Are you sure named is running? Something is preventing your access to named. (like a firewall)

You can check if named is running by this command:

sockstat -l | grep named

If you are using a firewall, check it's ruleset and allow traffic on port 53 (both UDP and TCP)

I have checked that configuration (#3 post) in my system. it works very well. So the problem is not related to named configuration.
 
In /etc.rc.conf it is enabled, I don't know if I am using firewall, I just installed FreeBSD, configured NFS and Samba, and BIND gives me this problem.

Code:
bind named 562 20 tcp4 127.0.0.1:53 *:*
bind named 562 21 tcp4 127.0.0.1:953 *:*
bind named 562 22 tcp6 ::1:953 *:*
bind named 562 512 udp4 127.0.0.1:53 *:*
root syslogd 478 7 dgram /var/named/var/run/log
 
NFS works perfectly, no problems, I have problem only with BIND. FreeBSD is a 'nix system, Linux also is a 'nix system, therefore no problem with both.
 
makxx91 said:
In /etc.rc.conf it is enabled, I don't know if I am using firewall, I just installed FreeBSD, configured NFS and Samba, and BIND gives me this problem.

Code:
bind named 562 20 tcp4 127.0.0.1:53 *:*
bind named 562 21 tcp4 127.0.0.1:953 *:*
bind named 562 22 tcp6 ::1:953 *:*
bind named 562 512 udp4 127.0.0.1:53 *:*
root syslogd 478 7 dgram /var/named/var/run/log

I don't see that named is listening on 192.168.88.4.

Add this line in your named.conf (~ line 22):

Code:
listen-on       { 127.0.0.1; 192.168.88.4; };

Then:
service named stop
service named start

It should work.
 
Please show us your whole named.conf and also the exact error message:

grep -v '^//' /etc/namedb/named.conf |grep -v '^$'

You can use named-checkzone(8)() and named-checkconf(8)() to debug your zone files and named.conf respectively:

Code:
[CMD="%"]cat /etc/namedb/dynamic/doctor.org [/CMD]
$TTL 3h
doctor.org. IN SOA doctor.org. doctor.doctor.org. 44 1d 12h 1w 3h
     IN    NS doctor.org.
     IN    A 192.168.1.5 ;addres where on which is server
     IN    AAAA ::1
[CMD="%"]named-checkzone doctor.org /etc/namedb/dynamic/doctor.org [/CMD]
zone doctor.org/IN: loaded serial 44
OK
[CMD="%"]cat /etc/namedb/master/1.168.192.in-addr.arpa [/CMD]
$TTL 3h
@ IN SOA doctor.org. doctor.doctor.org 43 1d 12h 1w 3h
@ IN NS doctor.org.
5 IN PTR doctor.org.
[CMD="%"]named-checkzone 1.168.192.in-addr.arpa /etc/namedb/master/1.168.192.in-addr.arpa[/CMD]
zone 1.168.192.in-addr.arpa/IN: loaded serial 43
OK
[CMD="%"]tail -2 /etc/namedb/named.conf[/CMD]
zone "doctor.org" { type master; file "/etc/namedb/dynamic/doctor.org"; };
zone "1.168.192.in-addr.arpa" { type master; file "/etc/namedb/master/1.168.192.in-addr.arpa"; };
[CMD="%"]named-checkconf[/CMD]
[CMD="%"]echo $?[/CMD]
0
[CMD="%"]host doctor.org[/CMD]
doctor.org has address 192.168.1.5
doctor.org has IPv6 address ::1
[CMD="%"]host 192.168.1.5[/CMD]
5.1.168.192.in-addr.arpa domain name pointer doctor.org.

That files are same as yours, except the IP address.

Also add this line into /etc/resolv.conf:
Code:
nameserver 127.0.0.1
 
/etc/namedb/named.conf I modified just a little, added ~22 line, and in the end, where is exmaple section added.
Code:
[CMD="#"]cat /etc/namedb/dynamic/doctor.org[/CMD]
$TTL 3h
doctor.org. IN SOA doctor.org. doctor.doctor.org 42 1d 12h 1w 3h
IN NS doctor.org
IN A 192.168.88.4
AAAA ::1
[CMD="#"]cat /etc/namedb/master/88.168.192.in-addr.arpa[/CMD]
$TTL 3h
@ IN SOA doctor.org. doctor.doctor.org. 42 1d 12h 1w 3h
@ IN NS doctor.org.
4 IN PTR doctor.org.
[CMD="#"]named-checkzone 88.168.192.in-addr.arpa /etc/namedb/master/88.168.192.in-addr.arpa[/CMD]
zone 88.168.192.in-addr.arpa/IN: loaded serial 42
OK
[CMD="#"]named-checkzone doctor.org /etc/namedb/dynamic/doctor.org[/CMD]
/etc/namedb/dynamic/doctor.org:5: unknown RR type '::1"
zone doctor.org/IN: loading from master file /etc/namedb/dynamic/doctor.org failed: unknown class/type
zone doctor.org/IN: not loaded due to errors.
[CMD="#"]tail -2 /etc/namedb/named.conf[/CMD]
zone "doctor.org" { type master; file "/etc/namedb/dynamic/doctor.org"; };
zone "88.168.192.in-addr.arpa" { type master; file "/etc/namedb/master/88.168.192.in-addr.arpa"; };
[CMD="#"]named-checkconf[/CMD]
[CMD="#"]echo $?[/CMD]
0
[CMD="#"]host doctor.org[/CMD]
Host doctor.org not found: 2(SERVFAIL)
[CMD="#"]host 192.168.88.4[/CMD]
4.88.168.192.in-addr.arpa domain name pointer doctor.org

/etc/resolv.conf have the line.
Still have the same error.
 
I see your /etc/namedb/master/88.168.192.in-addr.arpa has some errors:

Make some space before IN. Spaces are important.
Place IN field in AAAA record.

Copy and paste this lines:

Code:
$TTL 3h
doctor.org. IN SOA doctor.org. doctor.doctor.org. 44 1d 12h 1w 3h
     IN    NS doctor.org.
     IN    A 192.168.88.4 ;addres where on which is server
     IN    AAAA ::1

service named restart
 
Back
Top