My Client Machine does not dig my DNS server

Issues related to configuring your network
Post Reply
sklamsal
Posts: 1
Joined: 2017/12/18 05:34:43

My Client Machine does not dig my DNS server

Post by sklamsal » 2017/12/18 05:58:19

I am using CentOS 7 on vmware workstaion pro 10.

1. I have configured DNS server with BIND. I t has network adapter setting as host-only.
2. I have another CentOS 7 as client with network adapter as host-only.
3. dig ns1.ashoklamsal.com works fine in server
3. dig ns1.ashoklamsal.com doesnot resolve
4. named-checkconf /etc/named.conf doesnot give any error
5. named-checkconf /etc/named.rfc19212.zones also doesnot give any error
6.named-checkzone ashoklamsal.com /var/named/zone.for is fine
7. named-checkzone ashoklamsal.com /var/named/zone.rev is fine

Problem:
When I dig ns1.ashoklamsal.com, I donnot get any DNS information.

My Configurations:

CentOS 7: DNS Server
1. cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=ns1.ashoklamsal.com

2. cat /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
NAME=ens33
UUID=946d3197-a317-4caa-b51f-a2109385cab7
DEVICE=ens33
ONBOOT=yes
NM-CONTROLLED="yes"
BOOTPROTO="static"
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.1

3. cat /etc/resolv.conf
# Generated by NetworkManager
search ashoklamsal.com
nameserver 192.168.1.100

4. cat /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// See the BIND Administrator's Reference Manual (ARM) for details about the
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html

options {
listen-on port 53 { 127.0.0.1;192.168.1.100; };
#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 { any; };

/*
- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
- If you are building a RECURSIVE (caching) DNS server, you need to enable
recursion.
- If your recursive DNS server has a public IP address, you MUST enable access
control to limit queries to your legitimate users. Failing to do so will
cause your server to become part of large scale DNS amplification
attacks. Implementing BCP38 within your network would greatly
reduce such attack surface
*/
recursion no;

dnssec-enable yes;
dnssec-validation yes;

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

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

pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};

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

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

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

5. cat /etc/named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
// and http://www.ietf.org/internet-drafts/dra ... nes-02.txt
// (c)2007 R W Franks
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "ashoklamsal.com" IN {
type master;
file "/var/named/zone.for";
allow-update {none;};
};

zone "1.168.192.in-addr.arpa" IN {
type master;
file "/var/named/zone.rev";
allow-update { none; };
};

6. cat /var/named/zone.for
$TTL 1D
@ IN SOA ns1.ashoklamsal.com. root.ashoklamsal.com. (
42
3H
15M
1W
1D )
IN NS ns1.ashoklamsal.com.
ns1 IN A 192.168.1.100

7. cat /var/named/zone.rev
$TTL 1D
@ IN SOA ns1.ashoklamsal.com. root.ashoklamsal.com. (
43
3H
15M
1W
1D )
IN NS ns1.ashoklamsal.com.
ns1.ashoklamsal.com. IN A 192.168.1.100
100 IN PTR ns1.ashoklamsal.com.

On Client Side:
1. vi /etc/resolv.conf
search ashoklamsal.com
nameserver 192.168.1.100

2. Static IP assigned
192.168.1.101

User avatar
fdisk
Posts: 42
Joined: 2017/11/04 00:59:56

Re: My Client Machine does not dig my DNS server

Post by fdisk » 2017/12/19 13:10:41

Did you increased serial numbers in zone files after your changes?

Post Reply