This how to is meant to assist anyone who is interested in running their own DNS. The tutorial was written using F7 and the GUI tool for DNS configuration (system-config-bind)but should be okay for those using FC6 as well. It covers making a single forward and reverse zone, records for hosts on the network, MX records and CNames.
To start the DNS configuration program, make sure you have the NAMED service running and that system-conf-g-bind is installed. If they are not installed, as root run
Code:
yum install system-config-bind bind
chkconfig --levels 235 named on
To start the BIND configuration program, locate and click on the icon for Domain Name System or as root run
You may see a message "No BIND configuration was found. Installing the initial default configuration." Click OK
CREATE FORWARD ZONE
Ensure the entry for DNS Server is selected and click New icon and choose Zone from the pop up list.
The New Zone window appears.
1. Inside of the Origin option group:
-For class IN Internet and click OK
-For Origin Type choose Forward and click OK
-Enter the name of your domain (example.com.). Remember the trailing period. If you don't a window will appear letting you know that the period has been appended for you.
2. Inside of Zone Type
-Choose Master and click OK
3. Zone Authority Information for the zone that was just created is now displayed
-Check to make the Authoritative Name Server and the Responsible Person E-Mail Address information is correct.
-The default settings for the other items are fine. Click OK.
CREATE REVERSE ZONE
Ensure the entry for DNS Server is selected and click New icon and choose Zone from the pop up list.
The New Zone windows appears.
1. Inside of the Origin option group select:
-For Class IN Internet and click OK
-For Origin Type choose IPV4 Reverse
-Enter the first octet of your network range (i.e. the 192 in 192.168.0.x) and click Add
-Repeat the above steps for the second and third octets
2. Inside of Zone Type
-Choose Master and click OK
3. Zone Authority Information for the zone that was just created is now displayed
-Check to make the Authoritative Name Server and the Responsible Person E-Mail Address information is correct.
-The default settings for the other items are fine. Click OK.
CREATE RECORDS
Click on the arrow to expand the forward look up zone (example.com). The information contained inside of your zone is displayed below the zone name.
HOST RECORDS
The section covers how to create the most common type of record - the host record.
-Click on the New icon and choose "A IPV4"
-Enter the hostname of the systems that you are creating the record for in the Domain Name box. You do not need to include the fully qualified domain name as the domain name will be automatically appended to the hostname.
note: I always create record for the domain name itself and point it toward my web server. This allows users to view my website by just typing in the domain name. No "www" is needed. To do this, do not enter a hostname as described above just enter the domain name followed by a period.
-From the "Select IPv4 Prefix", select the IPv4 reverse zone that the host is going to belong to. For example, a host with IP address 192.168.0.10 would belong to the 192.168.0 prefix group. Enter the final octet in the fourth box under IPv4 Address.
-It is recommended that you generate a reverse mapping for this record. To do that, ensure that the "Create Reverse Mapping Record" box is checked.
-Click OK. Do the above steps for each host on your network that your other systems on your network will need to communicate with. Examples would be print severs, SMTP, IMAP, POP, web servers and file servers.
MX RECORDS
MX or Mail Exchange records are needed for most mail systems to function properly. The following steps will guide you through the process of setting up this record.
-Ensure the SMTP servers forward record has been entered into the DNS as described in the section HOST RECORDS
-Click on the New icon and choose "MX Mail Exchange"
-The MXMail Exchange will appear. Ensure that the domain that the mail server will be a part of is in the Domain Name box.
-Choose a priority for the mail server. This is important if you have more than one SMTP server on your network. Other mail servers will attempt to deliver mail to the mail server with the lowest priority first. If that fails, it will attempt the mail server with the next higher priority and so on.
-Enter the hostname of the SMTP server for the domain in the Mail Server Name box. You do not need to include the fully qualified domain name as the domain name will be automatically appended to the hostname.
CNAME RECORDS
CName or Canonical Names are aliases for other systems on your network. For example, you may want mail.example.com to resolve to smtp01.example.com on your network. The below steps will help you create a canonical name.
-Click on the New icon and choose "CNAME Alias"
-Enter the alias name in the Domain Name box (i.e. mail). You do not need to include the fully qualified domain name as the domain name will be automatically appended to the hostname.
-In the Canonical Name box, enter the hostname of the system you want alias to point to (i.e. smtp01)
That concludes this tutorial on how to setup and configure a basic DNS for your network. There are a lot of other options in the DNS such as zone replication to slave servers. As time permits, I include sections in this tutorial for setting other options up in the DNS.
Enjoy!
GrapeShot