Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem using bind with views

Posted on 2014-12-23
2
Medium Priority
?
197 Views
Last Modified: 2014-12-24
Hi.

I'm running a debian linux where I installed bind for using it as a DNS server.

I created some zones and it's working fine. Here is the named.conf.local

//
// Do any local configuration here
//

	zone "interna" {
		type master;
		file "/etc/bind/db.interna";
	};
	zone "7.16.172.in-addr.arpa" {
		type master;
		file "/etc/bind/db.172.16.7";
		notify no;
	};


	zone "serveis.interna" {
		type master;
		file "/etc/bind/db.serveis.interna";
		notify no;
	};

	zone "grup7.gsx" {
		type master;
		file "/etc/bind/db.dmz";
	};


	zone "70.168.192.in-addr.arpa" {
		type master;
		file "/etc/bind/db.192.168.70";
		notify no;
	};

	zone "71.168.192.in-addr.arpa" {
		type master;
		file "/etc/bind/db.192.168.71";
		notify no;
	};

	zone "192.168.254.in-addr.arpa" {
		type master;
		file "/etc/bind/db.192.168.254";
		notify no;	
	};

	zone "192.168.255.in-addr.arpa" {
		type master;
		file "/etc/bind/db.192.168.255";
		notify no;
	};

Open in new window


Then I changed this file to use views:

//
// Do any local configuration here
//

view "intranet" {
//	recursion yes;
//	match-clients { 172.16.7.0/24; localhost;};
	zone "interna" {
		type master;
		file "/etc/bind/db.interna";
	};
	zone "70.168.192.in-addr.arpa" {
		type master;
		file "/etc/bind/db.192.168.70";
	};

	zone "71.168.192.in-addr.arpa" {
		type master;
		file "/etc/bind/db.192.168.71";
	};
//	include "/etc/bind/named.conf.default-zones";
};

view "public" {
//	match-clients { any; };
//	recursion no;

	zone "serveis.interna" {
		type master;
		file "/etc/bind/db.serveis.interna";
	};

	zone "grup7.gsx" {
		type master;
		file "/etc/bind/db.dmz";
	};

	zone "7.16.172.in-addr.arpa" {
		type master;
		file "/etc/bind/db.172.16.7";
		notify no;
	};

	zone "192.168.254.in-addr.arpa" {
		type master;
		file "/etc/bind/db.192.168.254";
	};

	zone "192.168.255.in-addr.arpa" {
		type master;
		file "/etc/bind/db.192.168.255";
		notify no;
	};
};

Open in new window


After this change, DNS seems to stop working (ping and dig fails when they worked before).  What is the problem on this version of the file?
0
Comment
Question by:gplana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Accepted Solution

by:
Daniel McAllister earned 2000 total points
ID: 40516432
OK, so first things first -- a ping test on the server failing means far more than DNS is stopping, which means far more is going on.

On the other hand, if you're using ping to test name resolution, and it's coming back unresolved, that's not a ping failure, that's a DNS failure.

The next thing I see is that you have totally different zones in the "intranet" and "public" views -- which means people on the 172.16.7.0/24 network -- and your localhost -- will NOT be able to resolve any of the "public" domains.

This is a common error -- an assumption that you'll see zones in any area you "match" -- but that is not at all true. Instead, you see the zones in the first "view" you match... and no others!

Why you might ask? For many sites, they have different "internal" views of the same domain that is also accessible from the Internet. For example:
  from the LAN: each server has a LAN IP and each desktop registers its DNS name when it gets a DHCP setup
  from the WAN: the same domain name resolves server addresses to WAN IPs, and there are no entries for desktops

SO -- redo the views with this in mind (meaning that everything in the "public" view should also be in the "intranet" view.

FWIW: I usually list these domains in an INCLUDE file so that my "intranet" view has an include for the public domains and the public view has the same include.

I hope this helps to solve your issue!

Dan
IT4SOHO
0
 
LVL 15

Author Closing Comment

by:gplana
ID: 40516489
Excellent. This was exactly the problem: my initial view should include all the zones, not just its exclusive zones.

Thank you so much.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
I wrote this article to explain some important DNS concepts that should be known to avoid some typical configuration errors I often see in forums. I assume that what is described here is the typical behavior of Microsoft DNS client. I don't know …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question