LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2011, 01:12 AM   #16
sameone
LQ Newbie
 
Registered: Jul 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled

Something more. This server is not really in domain and I don't have domain server in DMZ.


RNDC key is configured.

include "/etc/rndc.key";

// We are the master server for server.example.com
zone "zimbra.si" {
type master;
file "/etc/bind/db.mail4.zimbra.si";
};


dig -t axfr zimbra.si
global opitions: printcmd
Transfer failed
 
Old 08-02-2011, 01:59 AM   #17
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Something more. This server is not really in domain and I don't have domain server in DMZ.
I don't get what you mean, but any client that uses this box as a dns server should be able to resolve the domain.

Quote:
dig -t axfr zimbra.si
global opitions: printcmd
Transfer failed
I guess you're running it from the box that runs bind, so it should work. Anyway you can add a "allow-transfer" directive, just to be sure you're allowed to do zone transfers:
Code:
...
zone "zimbra.si" {
type master;
file "/etc/bind/db.mail4.zimbra.si";
allow-transfer (127.0.0.1; 192.168.2.22;);
};
...
Restart bind and run any of the following:
Code:
dig -t axfr zimbra.si
dig -t axfr zimbra.si @192.168.2.22
 
Old 08-02-2011, 03:07 AM   #18
sameone
LQ Newbie
 
Registered: Jul 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
Still the same

dig -t axfr zimbra.si

; <<>> DiG 9.5.0-P2 <<>> -t axfr zimbra.si
;; global options: printcmd
; Transfer failed.


Bind and rndc are working, ...

mail4:~ # /etc/init.d/named restart
..dead
Shutting down name server BIND - Warning: named not running! done
Starting name server BIND

mail4:~ # rndc reload
server reload successful

I also tray allow-transfer {any;}; But stil does not work

I also change file "/etc/bind/db.mail4.zimbra.si"; to file "/etc/db.mail4.zimbra.si";


Where is my problem ??

Last edited by sameone; 08-02-2011 at 03:27 AM.
 
Old 08-02-2011, 03:24 AM   #19
sameone
LQ Newbie
 
Registered: Jul 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
One more time, if I didn't understand exactly what you say


Server Linux suse 11

IP 192.168.2.22 /24 mail4.zimbra.si - in DMZ - gateway 192.168.2.1

hostname: mail4
domain name: zimbra.si

resolved in the world
IP (external): 84.255.0.0 - mail.zimbra.si
DNS (external): 84.0.0.1 and 84.0.0.2



named.conf

# Copyright (c) 2001-2004 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# Author: Frank Bodammer, Lars Mueller <lmuelle@suse.de>
#
# /etc/named.conf
#
# This is a sample configuration file for the name server BIND 9. It works as
# a caching only name server without modification.
#
# A sample configuration for setting up your own domain can be found in
# /usr/share/doc/packages/bind/sample-config.
#
# A description of all available options can be found in
# /usr/share/doc/packages/bind/misc/options.

options {

directory "/var/lib/named";

dump-file "/var/log/named_dump.db";
statistics-file "/var/log/named.stats";


forwarders { 84.255.209.79; 84.255.210.79; };


};



zone "." in {
type hint;
file "root.hint";
};

zone "localhost" in {
type master;
file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};



include "/etc/rndc.key";
// We are the master server for server.example.com
zone "zimbra.si" in { I add in , is this OK ??
type master;
file "/etc/db.mail4.zimbra.si";
allow-transfer {any;};
};

include "/etc/named.conf.include";



db.mail4.zimbra.si

;
; Addresses and other host information.
;
@ IN SOA mail4.zimbra.si. root.mail4.zimbra.si. (
10659 ; Serial
43200 ; Refresh
3600 ; Retry
3600000 ; Expire
2592000 ) ; Minimum
; Define the nameservers and the mail servers
IN NS mail4.zimbra.si.
IN MX 10 mail.zimbra.si.
@ IN A 192.168.2.22
mail4 IN A 192.168.2.22
mail IN A 192.168.2.22


cat /etc/hosts

127.0.0.1 localhost.localdomain localhost
192.168.2.22 mail4.zimbra.si mail4

# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback

fe00::0 nil

ff00::0 nil
ff02::1 nil
ff02::2 nil
ff02::3 nil



cat /etc/resolv.conf
search zimbra.si
nameserver 192.168.2.22


nslookup zimbra.si

Server: 192.168.2.22
Address: 192.168.2.22#53

Non-authoritative answer:
*** Can't find zimbra.si: No answer


dig zimbra.si mx

; <<>> DiG 9.5.0-P2 <<>> zimbra.si mx
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17531
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;zimbra.si. IN MX

;; ANSWER SECTION:
zimbra.si. 78532 IN MX 30 fw.datalab.si.
zimbra.si. 78532 IN MX 10 mail.zimbra.si.
zimbra.si. 78532 IN MX 20 mx2.t-2.net.

;; AUTHORITY SECTION:
zimbra.si. 78532 IN NS fwimp.alcad.si.
zimbra.si. 78532 IN NS drava.pronet.si.

;; ADDITIONAL SECTION:
mail.zimbra.si. 78532 IN A 84.255.195.106

;; Query time: 25 msec
;; SERVER: 192.168.2.22#53(192.168.2.22)
;; WHEN: Tue Aug 2 10:17:29 2011
;; MSG SIZE rcvd: 171



dig zimbra.si any
; <<>> DiG 9.5.0-P2 <<>> zimbra.si any
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63889
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;zimbra.si. IN ANY

;; ANSWER SECTION:
zimbra.si. 78407 IN NS fwimp.alcad.si.
zimbra.si. 78407 IN NS drava.pronet.si.
zimbra.si. 78407 IN MX 20 mx2.t-2.net.
zimbra.si. 78407 IN MX 30 fw.datalab.si.
zimbra.si. 78407 IN MX 10 mail.zimbra.si.

;; AUTHORITY SECTION:
zimbra.si. 78407 IN NS drava.pronet.si.
zimbra.si. 78407 IN NS fwimp.alcad.si.

;; ADDITIONAL SECTION:
mail.zimbra.si. 78407 IN A 84.255.195.106

;; Query time: 1 msec
;; SERVER: 192.168.2.22#53(192.168.2.22)
;; WHEN: Tue Aug 2 10:19:34 2011
;; MSG SIZE rcvd: 199
 
Old 08-02-2011, 03:55 AM   #20
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Bind and rndc are working, ...

mail4:~ # /etc/init.d/named restart
..dead
Shutting down name server BIND - Warning: named not running! done
Starting name server BIND
Are you sure named is running? I don't know how you've installed bind, but from the above looks like it wasn't and maybe it's still not running for some reason. So any query you're trying to do, goes to the real external dns server for the zone in question and the answers you get are not those expected.
Better run:
Code:
ps -ef|grep named
to see if named is actually running and if not check the logs to find out why it fails
You may also run the following to see the zones that your dns is authoritative for and any potential config errors:
Code:
named-checkconf -z /etc/named.conf
 
Old 08-02-2011, 05:05 AM   #21
sameone
LQ Newbie
 
Registered: Jul 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
mail4:~ # ps -ef|grep named
root 2334 1 0 10:28 ? 00:00:00 /sbin/syslog-ng -a /var/lib/named/dev/log
named 3718 1 0 10:28 ? 00:00:00 /usr/sbin/named -t /var/lib/named -u named
root 8908 8875 0 12:00 pts/1 00:00:00 grep named


mail4:~ # named-checkconf -z /etc/named.conf
zone localhost/IN: loaded serial 42
zone 0.0.127.in-addr.arpa/IN: loaded serial 42
/etc/db.mail4.zimbra.si:4: no TTL specified; using SOA MINTTL instead
zone zimbra.si/IN: loaded serial 10659


It's this OK
 
Old 08-02-2011, 06:43 AM   #22
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
named 3718 1 0 10:28 ? 00:00:00 /usr/sbin/named -t /var/lib/named -u named
Although it is correct, the above line says that you're running named chrooted under /var/lib/named, so paths to named.conf, zone files etc, are relative to that directory.
Do you get the same with:
Code:
named-checkconf -z t /var/lib/named  /etc/named.conf
Also run the following commands and post the output:
Code:
netstat -tanpl|grep named
dig ns zimbra.si 
dig ns zimbra.si @localhost
 
Old 08-02-2011, 07:03 AM   #23
sameone
LQ Newbie
 
Registered: Jul 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
mail4:~ # named-checkconf -z t /var/lib/named /etc/named.conf
usage: named-checkconf [-h] [-j] [-v] [-z] [-t directory] [named.conf]



mail4:~ # netstat -tanpl|grep named

tcp 0 0 192.168.2.22:53 0.0.0.0:* LISTEN 3718/named
tcp 0 0 127.0.0.2:53 0.0.0.0:* LISTEN 3718/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 3718/named
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 3718/named
tcp 0 0 ::1:953 :::* LISTEN 3718/named



mail4:~ # dig ns zimbra.si

; <<>> DiG 9.5.0-P2 <<>> ns zimbra.si
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14628
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;zimbra.si. IN NS

;; ANSWER SECTION:
zimbra.si. 65307 IN NS drava.pronet.si.
zimbra.si. 65307 IN NS fwimp.alcad.si.

;; Query time: 13 msec
;; SERVER: 192.168.2.22#53(192.168.2.22)
;; WHEN: Tue Aug 2 13:57:54 2011
;; MSG SIZE rcvd: 80




mail4:~ # dig ns zimbra.si @localhost

; <<>> DiG 9.5.0-P2 <<>> ns zimbra.si @localhost
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8955
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;zimbra.si. IN NS

;; ANSWER SECTION:
zimbra.si. 65277 IN NS fwimp.alcad.si.
zimbra.si. 65277 IN NS drava.pronet.si.

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Aug 2 13:58:24 2011
;; MSG SIZE rcvd: 80
 
Old 08-02-2011, 07:36 AM   #24
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
mail4:~ # named-checkconf -z t /var/lib/named /etc/named.conf
usage: named-checkconf [-h] [-j] [-v] [-z] [-t directory] [named.conf]
Oops I missed the dash before the "t" option
Code:
named-checkconf -z -t /var/lib/named /etc/named.conf
Quote:
;; ANSWER SECTION:
zimbra.si. 65307 IN NS drava.pronet.si.
zimbra.si. 65307 IN NS fwimp.alcad.si.
So it stills uses external dns to resolve the domain it is supposed to be authoritative for. Comment out the line
Quote:
forwarders { 84.255.209.79; 84.255.210.79; };
stop, then start bind, and try again with
Code:
dig ns zimbra.si 
rndc flush  <- do this to clear the dns cache
dig ns zimbra.si @localhost

Last edited by bathory; 08-02-2011 at 07:41 AM. Reason: typos
 
Old 08-03-2011, 12:48 AM   #25
sameone
LQ Newbie
 
Registered: Jul 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
I follow the steps, below.


mail4:~ # named-checkconf -z -t /var/lib/named /etc/named.conf
zone localhost/IN: loaded serial 42
zone 0.0.127.in-addr.arpa/IN: loaded serial 42
zone zimbra.si/IN: loading from master file /etc/db.mail4.zimbra.si failed: file not found
_default/zimbra.si/in: file not found

Then I commend forwarders { 84.255.209.79; 84.255.210.79; };

Then I stop, then start bind


mail4:~ # dig ns zimbra.si

; <<>> DiG 9.5.0-P2 <<>> ns zimbra.si
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46047
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;zimbra.si. IN NS

;; ANSWER SECTION:
zimbra.si. 86400 IN NS fwimp.alcad.si.
zimbra.si. 86400 IN NS drava.pronet.si.

;; Query time: 33 msec
;; SERVER: 192.168.2.22#53(192.168.2.22)
;; WHEN: Wed Aug 3 07:38:57 2011
;; MSG SIZE rcvd: 80



Then I rndc flush


mail4:~ # dig ns zimbra.si @localhost

; <<>> DiG 9.5.0-P2 <<>> ns zimbra.si @localhost
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56984
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;zimbra.si. IN NS

;; ANSWER SECTION:
zimbra.si. 86400 IN NS fwimp.alcad.si.
zimbra.si. 86400 IN NS drava.pronet.si.

;; Query time: 337 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Aug 3 07:39:53 2011
;; MSG SIZE rcvd: 80
 
Old 08-03-2011, 02:26 AM   #26
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
zone zimbra.si/IN: loading from master file /etc/db.mail4.zimbra.si failed: file not found
What gives:
Code:
ls -l /etc/db.mail4.zimbra.si
ls -l /etc/named.conf
I guess named.conf is a symlink to /var/lib/named/etc/named.conf.
So copy the zone file into the jail directory
Code:
cp /etc/db.mail4.zimbra.si /var/lib/named/etc/db.mail4.zimbra.si
Run again the named-checkconf and if you get no errors, restart named and try resolving your domain
 
Old 08-03-2011, 02:57 AM   #27
sameone
LQ Newbie
 
Registered: Jul 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
One time thanks for your help


mail4:~ # ls -l /etc/db.mail4.zimbra.si

-rw-r--r-- 1 root root 614 2011-08-01 11:12 /etc/db.mail4.zimbra.si


mail4:~ # ls -l /etc/named.conf
-rw-r--r-- 1 root named 4043 2011-08-03 07:38 /etc/named.conf

Quote:
I guess named.conf is a symlink to /var/lib/named/etc/named.conf.
Yes there are the same


mail4:~ # named-checkconf -z -t /var/lib/named /etc/named.conf
zone localhost/IN: loaded serial 42
zone 0.0.127.in-addr.arpa/IN: loaded serial 42
/etc/db.mail4.zimbra.si:4: no TTL specified; using SOA MINTTL instead
zone amont.si/IN: loaded serial 10659

(I tried with #forwarders { 84.255.209.79; 84.255.210.79; }; and forwarders { 84.255.209.79; 84.255.210.79; }; ) and the same

nslookup zimbra.si

Server: 192.168.2.22
Address: 192.168.2.22#53

Non-authoritative answer:
*** Can't find zimbra.si: No answer
 
Old 08-03-2011, 03:29 AM   #28
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
I guess you did restart named?
Quote:
/etc/db.mail4.zimbra.si:4: no TTL specified; using SOA MINTTL instead
zone amont.si/IN: loaded serial 10659
You still mixing the zones, or what?
Anyway run:
Code:
named-checkzone -D -t /var/lib/named zimbra.si /etc/db.mail4.zimbra.si
FYI I've added your zone and its zone file in my dns and it works just fine:
Quote:
zone zimbra.si/IN: loaded serial 10659
zimbra.si. 2592000 IN SOA mail4.zimbra.si. root.mail4.zimbra.si. 10659 43200 3600 3600000 2592000
zimbra.si. 2592000 IN NS mail4.zimbra.si.
zimbra.si. 2592000 IN A 192.168.2.22
zimbra.si. 2592000 IN MX 10 mail.zimbra.si.
mail.zimbra.si. 2592000 IN A 192.168.2.22
mail4.zimbra.si. 2592000 IN A 192.168.2.22
OK
 
Old 08-03-2011, 04:26 AM   #29
sameone
LQ Newbie
 
Registered: Jul 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
I guess you did restart named?
Yes I restarted named

/etc/init.d/named restart

rndc flush

And also restarted the server


Quote:
You still mixing the zones, or what?
I think not.



mail4:~ # named-checkzone -D -t /var/lib/named zimbra.si /etc/db.mail4.zimbra.si
/etc/db.mail4.zimbra.si:4: no TTL specified; using SOA MINTTL instead
zone zimbra.si/IN: loaded serial 10659
zimbra.si. 2592000 IN SOA mail4.zimbra.si. root.mail4.zimbra.si. 10659 43200 3600 3600000 2592000
zimbra.si. 2592000 IN NS mail4.zimbra.si.
zimbra.si. 2592000 IN A 192.168.2.22
zimbra.si. 2592000 IN MX 10 mail.zimbra.si.
mail.zimbra.si. 2592000 IN A 192.168.2.22
mail4.zimbra.si. 2592000 IN A 192.168.2.22
OK
 
Old 08-03-2011, 05:01 AM   #30
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
mail4:~ # named-checkzone -D -t /var/lib/named zimbra.si /etc/db.mail4.zimbra.si
/etc/db.mail4.zimbra.si:4: no TTL specified; using SOA MINTTL instead
zone zimbra.si/IN: loaded serial 10659
zimbra.si. 2592000 IN SOA mail4.zimbra.si. root.mail4.zimbra.si. 10659 43200 3600 3600000 2592000
zimbra.si. 2592000 IN NS mail4.zimbra.si.
zimbra.si. 2592000 IN A 192.168.2.22
zimbra.si. 2592000 IN MX 10 mail.zimbra.si.
mail.zimbra.si. 2592000 IN A 192.168.2.22
mail4.zimbra.si. 2592000 IN A 192.168.2.22
OK
This is intersting! Your zone file is correct and the zone zimbra.si has an A record (in red), but then it cannot be resolved!!!!!!
Can you try to resolve another host?
Code:
dig mail4.zimbra.si
I still think that you are not using this zone file when named runs (or you have mixed the 2 zone files). Check the logs and see what zones are loading and from where.
 
  


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
No TCP connection to host if the DNS resolved IP same as gateway IP rbhuksin Linux - Networking 6 07-24-2009 01:42 PM
dns is resolved but the site shows default page sunethj Linux - Server 2 01-08-2008 03:04 AM
weird dns problem, all names resolved except one rogerdv Linux - Networking 4 06-14-2007 07:46 AM
SUSE 10.0 (eval dvd) DNS's not resolved after starting X 1kyle SUSE / openSUSE 3 03-23-2006 05:08 AM
SUSE 10.0 (eval dvd) DNS's not resolved 1kyle SUSE / openSUSE 0 03-23-2006 03:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:26 AM.

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