LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-04-2015, 04:33 AM   #1
linuxbeez
LQ Newbie
 
Registered: Apr 2014
Posts: 12

Rep: Reputation: Disabled
Internal DNS not resolving


I have configured a DNS server in cent os 7 with IP 10.30.1.5 and allowed 10.0.0.0/24 full network. But my clients are having different ip addresses like 10.20.x.x, 10.29.x.x, 10.24.x.x, 10.22.x.x all with /24 subnet.But when I configured a client to use 10.20.x.x it is not able to communicate with server and says request timed out
/etc/named.conf
options {
# listen-on port 53 { 127.0.0.1; 10.30.1.5; };
# 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; 10.0.0.0/24;};
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";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
view "internal" {
match-clients {localhost; 10.0.0.0/24;};
zone "." IN {
type hint;
file "named.ca";
};
zone "old.samp.com" IN {
type master;
file "for.samp.com";
allow-update { none; };
};
zone "1.30.10.in-addr.arpa" IN {
type master;
file "rev.samp.com";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
};

/var/named/for.samp.com
$TTL 86400
@ IN SOA old.samp.com. root.old.samp.com. (
2014071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
IN NS old.samp.com.
IN A 10.30.1.5
IN A 10.29.1.1
IN A 10.20.1.10
IN A 10.22.10.3
old IN A 10.30.1.5
cl1 IN A 10.29.1.1
cl2 IN A 10.20.1.10
cl3 IN A 10.22.10.3

/var/named/rev.samp.com
$TTL 86400
@ IN SOA old.samp.com. root.samp.com. (
2014071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
IN NS old.samp.com.
IN PTR samp.com.
IN A 255.255.255.0
5 IN PTR old.samp.com.
1 IN PTR cl1.samp.com.
10 IN PTR cl2.samp.com.
3 IN PTR cl3.samp.com.

when dig from server
; <<>> DiG 9.9.4-RedHat-9.9.4-14.el7 <<>> -x 10.20.1.10
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 40938
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;10.1.20.10.in-addr.arpa. IN PTR
;; AUTHORITY SECTION:
10.in-addr.arpa. 86400 IN SOA 10.in-addr.arpa. . 0 28800 7200 604800 86400
;; Query time: 0 msec
;; SERVER: 10.30.1.5#53(10.30.1.5)
;; WHEN: Wed Mar 04 10:52:22 EST 2015
;; MSG SIZE rcvd: 89

dig cl2.samp.com
; <<>> DiG 9.9.4-RedHat-9.9.4-14.el7 <<>> cl2.samp.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 6125
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;cl2.samp.com. IN A
;; Query time: 3000 msec
;; SERVER: 10.30.1.5#53(10.30.1.5)
;; WHEN: Wed Mar 04 10:55:08 EST 2015
;; MSG SIZE rcvd: 45

No response when dig from client. I am new to DNS, How to proceed in this. Any mistakes in the config please point out.
 
Old 03-04-2015, 05:19 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,591

Rep: Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689
My

10.0.0.0/24 means it will allow only clients from 10.0.0.0 to 10.0.0.255. You really should be using 10.0.0.0/8 which will allow 10.0.0.0 to 10.255.255.255 as clients.

Also, why support IPV6 if you only allow the box to resolve for itself in IPV6? I would allow it to listen on all ports IPv4 and IPv6 were I you.

There may be more, this is just what caught my eye on the first glance.
I hope it helps.
 
Old 03-04-2015, 11:05 AM   #3
linuxbeez
LQ Newbie
 
Registered: Apr 2014
Posts: 12

Original Poster
Rep: Reputation: Disabled
Even after making the change as 10.0.0.0/8,the server is not able to output the answer. from client it says request timed out.
 
Old 03-04-2015, 02:39 PM   #4
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 319

Rep: Reputation: 112Reputation: 112
Quote:
Originally Posted by linuxbeez View Post
Even after making the change as 10.0.0.0/8,the server is not able to output the answer. from client it says request timed out.
You did restart bind9 right? (just making sure)

Can you ping the server? do your clients and server have away to get to each other?
since your server is on 10.30.x.x and your clients aren't I am assuming the server and clients can talk to each other via gateway?
 
Old 03-04-2015, 10:17 PM   #5
linuxbeez
LQ Newbie
 
Registered: Apr 2014
Posts: 12

Original Poster
Rep: Reputation: Disabled
Yes, restarted the service and I can ping from server to client and viceversa. When I dig from the server the answer is not proper, the server only answers in the zone 10.30.1.x and not for other IP segments. When ping from client I get request timed out.
 
Old 03-05-2015, 07:08 AM   #6
linuxbeez
LQ Newbie
 
Registered: Apr 2014
Posts: 12

Original Poster
Rep: Reputation: Disabled
I found out the mistake I committed, went through the DNS manual; zone and zone file was not created for every different subnets. 10.30.1.x series clients were resolving as I have zone file but for 10.29.x.x, 10.20.x.x zone was not there so it was not able to resolve it. so my final config looks as below.

zone "old.samp.com" IN {
type master;
file "for.samp.com";
allow-update { none; };
};
zone "1.30.10.in-addr.arpa" IN {
type master;
file "rev.samp.com";
allow-update { none; };
};
zone "1.29.10.in-addr.arpa" IN {
type master;
file "29.samp.com";
allow-update { none; };
};
zone "1.20.10.in-addr.arpa" IN {
type master;
file "20.samp.com";
allow-update { none; };
};

created zone files for every subnet for reverse lookup. thanks for the support.
 
  


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
Internal.network is not resolving hosts and ping redirected to 198.105.244.228 rlj4214 Linux - Networking 12 01-07-2018 02:06 AM
Internal host names resolving through external DNS?!? dschuett Linux - Networking 2 02-06-2011 03:14 PM
DNS doesn't resolv hosts that are on internal DNS Tux-Slack Linux - Networking 8 06-03-2008 06:42 AM
Win2k3 DNS + PFsense DNS Forwarder = No internal DNS resolution Panopticon Linux - Networking 1 11-19-2007 09:59 PM
/etc/hosts resolving before DNS resolving ? markraem Linux - Networking 4 11-02-2003 04:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:07 AM.

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