LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   As a newbie, I want to set up a DNS on Centos 7 running on VMware with local host machine as windows 10 (https://www.linuxquestions.org/questions/linux-newbie-8/as-a-newbie-i-want-to-set-up-a-dns-on-centos-7-running-on-vmware-with-local-host-machine-as-windows-10-a-4175613318/)

olabode 09-06-2017 02:59 AM

As a newbie, I want to set up a DNS on Centos 7 running on VMware with local host machine as windows 10
 
My academic task was to set up a DNS in a private network with network address 172.16.115.0/24 and the IP that i chose for the interface on the machine to run DNS is 172.16.115.20. I have been asked to use olabode_agboola.local as my DNS name.

I have installed Bind with yum install bind command. After installing bind;
* service named start command came with [OK]
* service named status command came 'ACTIVE RUNNING'
* But after editing named.conf file,
* The command 'service named restart' threw this error below;

Redirecting to /bin/systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; disabled; vendor preset: disabled)
Active: inactive (dead)
[root@olabode_agboola ~]#

i took down the interface with ifdown eno16777736
i turned up with ifup eno16777736
i restarted the network with /etc/init.d/network restart and it came back with [OK]. But yet the error wont go

CONTENT OF THE INTERFACE /etc/sysconfig/network-scripts/ifcfg-eno16777736 is;
TYPE=Ethernet
BOOTPROTO=none
NM_CONTROLLED=no
DEFROUTE=yes
IPADDR=172.16.115.20
NETMASK=255.255.255.0
GATEWAY=172.16.115.1
DOMAIN=olabode_agboola.local
DNS1=127.0.0.1
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=eno16777736
UUID=4e39081c-8cb7-4aa8-842b-f9bcb3bbf05e
DEVICE=eno16777736
ONBOOT=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes

I HAVE EDITED THE CONTENT OF NETWORK FILE. So when i typed nano /etc/sysconfig/network, i got;
NETWORKING=yes
HOSTNAME=olabode_agboola.local


CONTENT OF NAMED.CONF
options {
listen-on port 53 { 127.0.0.1; 172.16.115.0/24; 0.0.0.0/0; };
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; 172.16.115.0/24; 0.0.0.0/0; };
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";
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 "olabode_agboola.local" IN {
};

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

zone "olabode_agboola.local" IN {
type master;
file "olabode_agboola.local.zone";
allow-update { none; };
};

# zone "115.16.172.in.addr.arpa" IN {
# type master;
# file "olabode_agboola.local.rr.zone";
# allow-update { none; };
# };
file "olabode_agboola.local.zone";
allow-update { none; };
};

# zone "115.16.172.in.addr.arpa" IN {
# type master;
# file "olabode_agboola.local.rr.zone";
# allow-update { none; };
# };

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

# zone "olabode_agboola.local" IN {
# type master;
# file "/var/named/olabode_agboola.local";
# };

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


SO PLEASE I NEED HELP FROM HERE AS THE ERROR WONT STOP

smallpond 09-06-2017 12:31 PM

Have you looked at /var/log/messages?

andros705 09-06-2017 02:33 PM

Weird, systemctl should've at least give you the log.

Do
Code:

#systemctl start named && systemctl status named

scasey 09-06-2017 04:04 PM

Quote:

Originally Posted by olabode (Post 5756078)
CONTENT OF NAMED.CONF
Code:

options {
        listen-on port 53 { 127.0.0.1; 172.16.115.0/24; 0.0.0.0/0; };


I'm pretty sure that listen-on should only contain the IP of the NIC; that is, 172.16.115.20, although the 0.0.0.0 should also work, meaning "any IP" -- shouldn't need the /0 there.

BIND can't listen on IP's it doesn't control or have [172.16.115.0/24], and if you configure it to, I'd expect it to choke.

Also, my named.conf has
Code:

options {
        query-source    port 53;
        listen-on { xxx.xx.xx.xx; };
        ...

rather than port on the listen-on line, but that may be a version related difference.

use named-checkconf to validate named.conf before restarting/running bind.

I'm also not clear why you're looking at your network config when the error is that bind won't run.

John VV 09-06-2017 04:07 PM

you are on a VM so did you set up a virtual network connection ?

if not set up a "bridge" on win 10


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