If you can see this check that

next section prev section up prev page next page

DNS and Named


DNS named

User:
Password:

This tutorial in concerned with the setting up of your own DNS server using "named". It is for FEDORA CORE 15. Other distributions may need a different setup.

Question 1: Basic Setup

Each DNS server needs its own particular setup when working in each particular environment. In LinuxZoo, all DNS traffic is intercepted for security reasons by the gateway server and handled via a proxy. You must update the named configuration to take this into account.

Configure the /etc/named.conf file with the new options (so put this in the "options {...} area of the file) of

        forwarders { 10.200.0.1; };
        forward only;

Tests - not attempted
FORWARDERS seems to be in /etc/named.conf UNTESTED
FORWARD ONLY seems to be in /etc/named.conf UNTESTED

Question 2: See it working

Start up the NAMED service and check that it works. If you have been playing with the firewall configuration you will need to reset the firewall settings to the defaults. do that with:

service iptables restart

To start NAMED run "service named start". You have to reload or restart this service when you make a configuration change remember. The easiest way to check that the service and config files work is:

dig localhost @localhost

If it responds then your server is up. It should indicate that the SERVER was 127.0.0.1 (or perhaps ::1 if localhost is considered an IPv6 address) and that localhost an A record of 127.0.0.1.

Tests - not attempted
Service Running UNTESTED

Question 3: New Zone

Create a brand new forward zone for domain "sillynet.net" in the named configuration directory /var/named/. For this you should create a new zone file called "sillynet.zone" (copying named.localhost to sillynet.zone might be a good starting point). Add this file, along with its zone information, to the configuration file /etc/named.conf.

This zone should give:

sillynet.net -> IP address 12.0.0.20
www.sillynet.net -> IP address 12.0.0.30
Hints. It is a master type. The zone file must be readable by the user "named". Remember to use "service named reload" when you change the config file.

Tests - not attempted
sillynet.zone has A record for .20 UNTESTED
sillynet.zone has A record for .30 UNTESTED
sillynet.zone has ZONE record in named.conf UNTESTED
Check sillynet.net resolves UNTESTED
Check www.sillynet.net resolves UNTESTED

Question 4: New Zone

Now build a reverse zone for sillynet.zone, mapping the 12.0.0.0/24 range to these 2 new names created in the previous question. Put their definitions into a file called "sillynet.rev". You may want to copy from "named.loopback" to help build this file.

The zone should produce:

12.0.0.20 -> sillynet.net
12.0.0.30 -> www.sillynet.net
A nameserver definition for the zone of sillynet.net.

Hints. Remember to have a zone in named.conf. Dots are important. Can the named user read the new file? Any errors in /var/log/messages?

Tests - not attempted
sillynet.rev has PTR record for .20 UNTESTED
sillynet.zone has PTR record for .30 UNTESTED
sillynet.rev has ZONE record in named.conf UNTESTED
Check reverse sillynet.net resolves UNTESTED
Check reverse www.sillynet.net resolves UNTESTED

Question 5: Advanced Zone

Create a brand new forward zone for domain "advanced.com". For this create a new forward zone file "advanced.zone" (copy named.localhost as a starting point), and a new reverse zone file "advanced.rev" (copy "named.loopback" as a starting point). Add both forward and reverse zones, along with the zone information, to the configuration file /etc/named.conf. The zone will use the 172.16.1.0/24 network, so in the named.conf file the reverse zone will be "1.16.172.in-addr.arpa".

This zone should give:

advanced.com     -> IP address 172.16.1.1
                 -> MX record mail.advanced.com, priority 10
                 -> MX record mail.offsite.com, priority 20
www.advanced.com -> IP address 172.16.1.10,
                               172.16.1.11,
                               172.16.1.12 using a round-robin selection.
172.16.1.1 -> advanced.com
172.16.1.10 -> www.advanced.com
172.16.1.11 -> www.advanced.com
172.16.1.12 -> www.advanced.com
A nameserver definition for the reverse zone of advanced.com.

Tests - not attempted
forward zone record in named.conf UNTESTED
reverse zone record in named.conf UNTESTED
forward zone file has A record for advanced.com UNTESTED
forward zone file mentions .10, .11, and .12 UNTESTED
reverse zone file mentions .1, .10, .11, and .12 UNTESTED
MX records in file are present UNTESTED
Check advanced.com resolves UNTESTED
Check www.advanced.com has all A records UNTESTED
Check reverse advanced.com resolves UNTESTED
Check reverse www.advanced.com resolves UNTESTED
Check MX for advanced.com UNTESTED


Linux tutorials: intro1 intro2 wildcard permission pipe vi essential admin net fwall DNS diag Apache1 Apache2 MySQL1 MySQL2
Caine 3.0: Essentials | Basic | Search | SysIntro | 5a | 5b | 5c | 6 | 7 | 8a | 8b | WebBrowserA | WebBrowserB | Registry
Useful: Quiz | Forums | Privacy Policy | Terms and Conditions
Site Links:XMLZoo ActiveSQL ProgZoo SQLZoo

Copyright @ 2004-2012 Gordon Russell. All rights reserved.