Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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;);
};
...
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.
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
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:
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
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
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; };
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
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
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.