LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   DNS configuration Problem (https://www.linuxquestions.org/questions/linux-newbie-8/dns-configuration-problem-4175429091/)

uk.engr 09-26-2012 07:08 AM

DNS configuration Problem
 
Assalam o Alaikum!

When I tried to start named service it failed.

My scenario is
192.168.1.91 DNS server
192.168.1.93 is its client


named.conf:

options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic";
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

zone "." IN {
type hint;
file "named.ca";
};

zone "1.168.192.in-addr.arpa" {
type master;
file "1.168.192.in-addr.arpa.zone";
allow-update { 192.168.1.0/24 ; };
};


zone "mydomain.com" {
type master;
file "mydomain.com.zone";
allow-update { 192.168.1.0/24; };
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";


Please help;

---------- Post added 09-26-12 at 07:09 AM ----------

I tried to read log /var/messages but no any info there

bathory 09-26-2012 08:14 AM

Hi,

If starting named fails, it should be loggwed in some logfile. If it isn't /var/log/messages, it could be /var/log/syslog, or perhaps the file named.run specified in the logging section of bind.
You can also use named-checkconf to test configuration.

Quote:

listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
If you're going to use this bind installation, as a resolver for your network, then you need to comment out (or delete the above 2 lines)

Cheers

uk.engr 09-26-2012 08:50 AM

I have commented above two lines, there is no existance /var/log/syslog also couldn't find named.run in /var/named/data/ or any other place. Still having same problem

uk.engr 09-26-2012 08:54 AM

One line I found in /var/log/messages
Sep 26 07:05:13 zohaibserver nm-dispatcher.action: nm_dispatcher_action: Invalid connection: '(null)' / 'connection setting not found' invalid: 1

Is it a problem?

bathory 09-26-2012 09:24 AM

Quote:

Originally Posted by uk.engr (Post 4789747)
One line I found in /var/log/messages
Sep 26 07:05:13 zohaibserver nm-dispatcher.action: nm_dispatcher_action: Invalid connection: '(null)' / 'connection setting not found' invalid: 1

Is it a problem?

This is not a bind problem. It has to do with Network Manager

Regarding bind, you can try to start it in debug mode in foreground and see if you find anything. You didn't mention your distro so in the command bellow replace "-u named" with the user that runs bind in your distro.
Code:

named -d3 -g -u named

Quote:

I have commented above two lines, there is no existance /var/log/syslog also couldn't find named.run in /var/named/data/ or any other place.
If you're not running named chrooted, the file is located under /var/named. If it runs chrooted under a directory/var/named/chroot for example, the file is located in /var/named/chroot/var/named/named.run

uk.engr 09-28-2012 03:32 AM

I have done some changes in named.conf. Now I am getting following errors:

Errors
Error in named configuration:
zone 1.168.192.in-addr.arpa/IN: loading from master file 1.168.192.in-addr.arpa.zone failed: file not found
zone 1.168.192.in-addr.arpa/IN: not loaded due to errors.
_default/1.168.192.in-addr.arpa/IN: file not found
zone mydomain.com/IN: loading from master file mydomain.com.zone failed: file not found
zone mydomain.com/IN: not loaded due to errors.
_default/mydomain.com/IN: file not found
zone localhost.localdomain/IN: loading from master file named.localhost failed: file not found
zone localhost.localdomain/IN: not loaded due to errors.
_default/localhost.localdomain/IN: file not found
zone localhost/IN: loading from master file named.localhost failed: file not found
zone localhost/IN: not loaded due to errors.
_default/localhost/IN: file not found
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loading from master file named.loopback failed: file not found
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: not loaded due to errors.
_default/1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: file not found
zone 1.0.0.127.in-addr.arpa/IN: loading from master file named.loopback failed: file not found
zone 1.0.0.127.in-addr.arpa/IN: not loaded due to errors.
_default/1.0.0.127.in-addr.arpa/IN: file not found
zone 0.in-addr.arpa/IN: loading from master file named.empty failed: file not found
zone 0.in-addr.arpa/IN: not loaded due to errors.
_default/0.in-addr.arpa/IN: file not found
[FAILED]


named.conf

options {
listen-on port 53 { any; };
};

logging {
channel default_debug {
file "/var/named/data/named.run";
severity dynamic;
};
};

zone "." IN {
type hint;
file "named.ca";
};

zone "1.168.192.in-addr.arpa" {
type master;
file "/var/named/1.168.192.in-addr.arpa.zone";
allow-update { 192.168.1.0/24 ; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

bathory 09-28-2012 04:14 AM

Hi,

You need to add a
Code:

directory "/var/named";
in named.conf (which you had it in your previous post)
And of course all these zone files should exist under /var/named

Regards

abhinav4 09-28-2012 04:26 AM

Quote:

Errors
Error in named configuration:
zone 1.168.192.in-addr.arpa/IN: loading from master file 1.168.192.in-addr.arpa.zone failed: file not found
zone 1.168.192.in-addr.arpa/IN: not loaded due to errors.
_default/1.168.192.in-addr.arpa/IN: file not found
zone mydomain.com/IN: loading from master file mydomain.com.zone failed: file not found
you need to create mydomain.com.zone and mydomain.com.rr.zone files in /var/named/

uk.engr 09-28-2012 05:58 AM

bathory. I have added your stated line but still have same problem

uk.engr 09-28-2012 06:16 AM

abhinav4 please:
[root@server named]# pwd
/var/named
[root@server named]# ls
1.168.192.in-addr.arpa.zone data named.ca named.localhost slaves
dynamic mydomain.com.zone named.empty named.loopback
[root@server named]#

what is this file mydomain.com.rr.zone? Is there any thing missing?

bathory 09-28-2012 08:17 AM

Quote:

Originally Posted by uk.engr (Post 4791415)
bathory. I have added your stated line but still have same problem

If you've added the "directory .." option and still bind does not find the zone files, I guess it's trying to start chrooted.
From the icon in your profile, looks like you're running fedora. In this case the jail directory is /var/named/chroot and the zone files should be located under /var/named/chroot/var/named
If not running fedora, read your distro's documentation about running bind chrooted

Regards

uk.engr 09-29-2012 04:12 AM

its fedora.


Bethroy, I have installed bind-chroot and then copied configuration files in /var/named/chroot/etc and zone files in /var/named/chroot/var/named.

Now that error eliminated but this occurs:
[root@server etc]# service named restart
Stopping named: [ OK ]
Starting named: [FAILED]
[root@server etc]# vim named.conf

again no log generates anywhere i couldn't find named.run in /var/named/chroot/var/named or in /var/named/ or in /var/named/data.

bathory 09-29-2012 04:43 AM

I guess it's some permissions problem, but cannot be sure without debugging.
Since you're running named chrooted, use:
Code:

/usr/sbin/named -g -d3 -u named -t /var/named/chroot
to start it in debug mode and see where it fails

Regards

uk.engr 10-01-2012 02:42 AM

I found following error

root@server ~]# /usr/sbin/named -g -d3 -u named -t /var/named/chroot
/usr/sbin/named: symbol lookup error: /usr/sbin/named: undefined symbol: dns_cache_create3
[root@server ~]#

bathory 10-01-2012 03:26 AM

According to this, you need to update the bind-libs package


All times are GMT -5. The time now is 03:14 PM.