Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Samba HowTo Guide
Prev Home Next

Dynamic DNS

The example DNS configuration is for a private network in the IP address space for network 192.168.1.0/24. The private class network address space is set forth in RFC1918.

It is assumed that this network will be situated behind a secure firewall. The files that follow work with ISC BIND version 9. BIND is the Berkeley Internet Name Daemon.

The master configuration file /etc/named.conf determines the location of all further configuration files used. The location and name of this file is specified in the startup script that is part of the operating system.

# Quenya.Org configuration file

acl mynet {
	192.168.1.0/24;
	127.0.0.1;
};

options {

	directory "/var/named";
	listen-on-v6 { any; };
	notify no;
	forward first;
	forwarders {
		192.168.1.1;
		};
	auth-nxdomain yes;
	multiple-cnames yes;
	listen-on {
		mynet;
		};
};

# The following three zone definitions do not need any modification.
# The first one defines localhost while the second defines the
# reverse lookup for localhost. The last zone "." is the
# definition of the root name servers.

zone "localhost" in {
	type master;
	file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" in {
	type master;
	file "127.0.0.zone";
};

zone "." in {
	type hint;
	file "root.hint";
};

# You can insert further zone records for your own domains below.

zone "quenya.org" {
	type master;
	file "/var/named/quenya.org.hosts";
	allow-query {
		mynet;
		};
	allow-transfer {
		mynet;
		};
	allow-update {
		mynet;
		};
	};

zone "1.168.192.in-addr.arpa" {
	type master;
	file "/var/named/192.168.1.0.rev";
	allow-query {
		mynet;
	};
	allow-transfer {
		mynet;
	};
	allow-update {
		mynet;
	};
};

The following files are all located in the directory /var/named. This is the /var/named/localhost.zone file:

$TTL 1W
@               IN SOA  @   root (
				42              ; serial (d. adams)
				2D              ; refresh
				4H              ; retry
				6W              ; expiry
				1W )            ; minimum

		IN NS           @
		IN A            127.0.0.1
	

The /var/named/127.0.0.zone file:

$TTL 1W
@               IN SOA          localhost.  root.localhost. (
				42              ; serial (d. adams)
				2D              ; refresh
				4H              ; retry
				6W              ; expiry
				1W )            ; minimum

				IN NS           localhost.
1               IN PTR          localhost.

The /var/named/quenya.org.host file:

$ORIGIN .
$TTL 38400      ; 10 hours 40 minutes
quenya.org      IN SOA  marvel.quenya.org. root.quenya.org. (
				2003021832 ; serial
				10800      ; refresh (3 hours)
				3600       ; retry (1 hour)
				604800     ; expire (1 week)
				38400      ; minimum (10 hours 40 minutes)
				)
			NS      marvel.quenya.org.
			MX      10 mail.quenya.org.
$ORIGIN quenya.org.
frodo                   A       192.168.1.1
marvel                  A       192.168.1.2
;
mail                    CNAME   marvel
www                     CNAME   marvel

The /var/named/192.168.1.0.rev file:

$ORIGIN .
$TTL 38400      ; 10 hours 40 minutes
1.168.192.in-addr.arpa  IN SOA  marvel.quenya.org. root.quenya.org. (
				2003021824 ; serial
				10800      ; refresh (3 hours)
				3600       ; retry (1 hour)
				604800     ; expire (1 week)
				38400      ; minimum (10 hours 40 minutes)
				)
			NS      marvel.quenya.org.
$ORIGIN 1.168.192.in-addr.arpa.
1                       PTR     frodo.quenya.org.
2                       PTR     marvel.quenya.org.

The configuration files shown here were copied from a fully working system. All dynamically registered entries have been removed. In addition to these files, BIND version 9 will create for each of the dynamic registration files a file that has a .jnl extension. Do not edit or tamper with the configuration files or with the .jnl files that are created.

Samba HowTo Guide
Prev Home Next

 
 
  Published under the terms fo the GNU General Public License Design by Interspire