BIND is an open-source software that implements the Domain Name System (DNS) protocols for the Internet. The name BIND stands for “Berkeley Internet Name Domain”. This article describes how to install and configure BIND in Red Hat Enterprise Linux 5 or CentOS 5.

Installing BIND

The steps below will install the chrooted BIND and the GUI configuration tool.

Install Bind1. Type in the command below to install BIND.
yum install bind-chroot system-config-bind
Security Level Configuration2. Start the named service. Learn how to start and stop services.
Security Level Configuration3. Open the TCP port 53 and UDP port 53. Learn how to configure the firewall.

Configuring BIND

The steps shows how to configure BIND using the GUI configuration tool.

Bind Shortcut1. Click System, select Administration and click Domain Name System. This will launch the BIND Configuration GUI window.
BIND Configuration GUI2. Click Ok to initialize BIND with default values.
Bind Configuration GUI3. BIND has now been initialized. We can now create a DNS zone and add DNS records.

Creating a DNS Zone

The steps below will show you how to create a DNS zone named “acme.local”.

BIND add zone1. To create a DNS zone, right click DNS Server, select Add and click Zone.
BIND new zone2. In the New Zone window, click the Ok button under Class.
BIND new zone3. Next, click the Ok button under Origin Type.
BIND new zone4. Provide the name of the zone and click Ok.
BIND new zone5. Review the various settings and click Ok.
BIND save6. Click Save and click Yes.
BIND configuration GUI7. You now have a new DNS zone.

Creating DNS Records

The steps below describes how to create some of the most common DNS records.

Creating an A record

An A record maps a hostname to its IPv4 address.

BIND add A1. Right click the zone you where you want to add an A record, select Add and click A IPv4 Address.
BIND add A2. Specify the Domain Name and IPv4 Address and click Ok.
BIND save3. Click Save and click Yes.

Creating a CNAME record

A CNAME record specifies that a domain name is an alias of another domain name.

BIND add CNAME1. Right click the zone you where you want to add a CNAME record, select Add and click CNAME Alias.
BIND add CNAME2. Specify the Domain Name and Canonical Name (target domain name) and click Ok.
BIND save3. Click Save and click Yes.

Creating an MX record

An MX record specifies how Internet e-mail should be routed using SMTP.

BIND add MX1. Right click the zone you where you want to add an MX record, select Add and click MX Mail Exchange.
BIND add MX2. Specify the Mail Server Name and click Ok.
BIND save3. Click Save and click Yes.

Testing BIND

To test your BIND setup, you can use the nslookup and dig utility.

BIND add MX1. Type the command below in a terminal window to use nslookup
nslookup mail.acme.local localhost
Replace mail.acme.local with the domain you want to check. If your DNS server is not on localhost then change it.
BIND add MX2. Type in the command below to query any records using dig.
dig @localhost acme.local ANY
Replace acme.local with your own domain. If your DNS server is not on localhost then change it.

Recommended Book

Pro DNS and BIND

Pro DNS and BIND

A working DNS is required to operate a mail server. Actually, almost every server requires it. But learning how to get it to work is just too difficult.

Red Hat provides tools to simplify working with BIND. But actually using BIND in a live production environment requires a really deep understanding of how DNS and BIND works.

A deep understanding of DNS and BIND will enable you to deploy a secure, stable and reliable DNS service which can operate without too much maintenance for a long, long time.

This book does a great job of explaining DNS in general and installing, configuring, and maintaining a BIND server in particular.

Get this book if you intend to deploy and administer a DNS server using BIND.

Visit the forum to ask for help or to give a comment.

***
Posted on 10/24/2009 and last updated on 10/10/2010
Filed under Uncategorized