Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-15-2008, 08:33 PM   #1
LQ Newbie
Registered: Sep 2003
Location: Fernley, NV
Posts: 18

Rep: Reputation: 0
Local name resolution with BIND


Ubuntu 7.04
BIND 9.3.4
DHCPD 3.0.4
hostname = nile
local ip =

Machine is functioning as the authoritative dhcp server, name server and gateway for my local network.

DHCP is working fine issuing leases etc.
BIND is working fine as a caching name server.

I would like to have BIND perform local name resolution but am unsure exactly how to implement it.

Config files are below:

// This is the primary configuration file for the BIND DNS server named.
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the 
// structure of BIND configuration files in Debian, *BEFORE* you customize 
// this configuration file.
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";

// prime the server with knowledge of the root servers
zone "." {
	type hint;
	file "/etc/bind/db.root";

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
	type master;
	file "/etc/bind/db.local";

zone "" {
	type master;
	file "/etc/bind/db.127";

zone "" {
	type master;
	file "/etc/bind/db.0";

zone "" {
	type master;
	file "/etc/bind/db.255";

// zone "com" { type delegation-only; };
// zone "net" { type delegation-only; };

// From the release notes:
//  Because many of our users are uncomfortable receiving undelegated answers
//  from root or top level domains, other than a few for whom that behaviour
//  has been trusted and expected for quite some length of time, we have now
//  introduced the "root-delegations-only" feature which applies delegation-only
//  logic to all top level domains, and to the root domain.  An exception list
//  should be specified, including "MUSEUM" and "DE", and any other top level
//  domains from whom undelegated responses are expected and trusted.
// root-delegation-only exclude { "DE"; "MUSEUM"; };

include "/etc/bind/named.conf.local";

options {
	directory "/var/cache/bind";

	// If there is a firewall between you and nameservers you want
	// to talk to, you might need to uncomment the query-source
	// directive below.  Previous versions of BIND always asked
	// questions using port 53, but BIND 8.1 and later use an unprivileged
	// port by default.

	// query-source address * port 53;

	// If your ISP provided one or more IP addresses for stable 
	// nameservers, you probably want to use them as forwarders.  
	// Uncomment the following block, and insert the addresses replacing 
	// the all-0's placeholder.

acl "ourdomain-subnet" {; };

view "internal" {
        match-clients { "ourdomain-subnet"; };

        forwarders {;


	// # auth-nxdomain no;    # conform to RFC1035
	// # listen-on-v6 { any; };

	// By default, name servers should only perform recursive domain
	// lookups for their direct clients.  If recursion is left open
	// to the entire Internet, your name server could be used to
	// perform distributed denial of service attacks against other
	// innocent computers.  For more information on DDoS recursion:

	allow-recursion { "ourdomain-subnet"; };

	// If you have DNS clients on other subnets outside of your
	// server's "localnets", you can explicitly add their networks
	// without opening up your server to the Internet at large:
	// allow-recursion { localnets;; };

	// If your name server is only listening on, consider:
	allow-recursion {; };

// Do any local configuration here

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "homenetwork" {
	type master;
	file "/etc/bind/homenetwork.hosts";
$ttl 38400
homenetwork.	IN	SOA	nile. (
			38400 )
homenetwork.	IN	NS	nile.
amazon.homenetwork.	IN	A
nile.homenetwork.	IN	A
basic-server.homenetwork.	IN	A

# DHCP configuration file
ddns-update-style interim;
ignore client-updates;

# Home network
subnet netmask {
	option routers;
	option subnet-mask;
	option domain-name-servers;
	option ip-forwarding off;
	range dynamic-bootp;
	default-lease-time 21600;
	max-lease-time 43200;
I would like the client machines on the network to be able to access any of the servers by simply using the hostname instead of the ip. Please let me know if there are any other files that you need to see.

Thank you in advance,
Old 02-16-2008, 09:06 AM   #2
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 97
Put lines like this in your named.conf.local file in
the internal view section:

zone "mydomain.tld" {
type master;
file "/etc/bind/db.mydomain.tld";

Next copy /etc/bind/db.local to /etc/bind/db.mydomain.tld
and use this as a template to create your own zone file.

Of course, replace "mydomain.tld" with the domain name
you plan to use.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
bind/named local search lost sir-lancealot Linux - Server 1 12-27-2007 03:49 PM
BIND - want to give local IP to internal users quackyo Linux - Networking 5 04-21-2006 06:22 PM
bind & resolve local hosts jingo_man Linux - Networking 7 07-08-2004 03:56 PM
BIND: local TLD work, but not outside TLDs remi Linux - Networking 4 07-06-2004 08:25 AM
bind named and samba to local interfaces kif Linux - Networking 4 02-07-2003 07:34 AM > Forums > Linux Forums > Linux - Software

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration