LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2017, 02:59 AM   #1
olabode
LQ Newbie
 
Registered: Sep 2017
Location: Bedford, UK
Distribution: centos 7
Posts: 1

Rep: Reputation: Disabled
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
 
Old 09-06-2017, 12:31 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Have you looked at /var/log/messages?
 
1 members found this post helpful.
Old 09-06-2017, 02:33 PM   #3
andros705
LQ Newbie
 
Registered: Feb 2016
Posts: 11

Rep: Reputation: Disabled
Weird, systemctl should've at least give you the log.

Do
Code:
#systemctl start named && systemctl status named
 
Old 09-06-2017, 04:04 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by olabode View Post
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.

Last edited by scasey; 09-06-2017 at 04:20 PM.
 
Old 09-06-2017, 04:07 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you are on a VM so did you set up a virtual network connection ?

if not set up a "bridge" on win 10
 
  


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
Virtual VMware CenTOS on a Windows 8.1 Machine eyecleanitall Linux - Newbie 3 07-31-2015 07:49 PM
Set up communication on VMWare between Host (Windows 7) & Guest (Fedora or Mandriva)? cgcamal Linux - Virtualization and Cloud 1 01-27-2011 01:08 AM
Local Host Name & DNS Resolution Problem (Works on Windows but not on Linux) sheps126 Linux - Networking 7 01-03-2009 10:11 AM
LXer: Running Solaris 10 (11/06) Virtual Machine on CentOS 5.0 (VMWare Server 1.0.3) LXer Syndicated Linux News 0 05-25-2007 12:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:31 PM.

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