BIND DNS Server is a widely used DNS Server. Because domain names are alphabetic, they are easier to remember. So if we will browse the Internet we don’t need to remember IP addresses. For example, the domain name www.yourdomain.com might translate to 192.168.0.1.
This video tutorial will show you how to setup and configure Primary (Master) BIND DNS Server on RHEL 6.x or CentOS 6.x:
- Install BIND
- Configure BIND
- Create primary DNS zone for linuxlab.local domain
- Add NS, A, MX records to zone
Steps:
1. Install BIND
yum install bind
2. Enable named service
chkconfig named on
3. Edit /etc/named.conf
4. Start named ( BIND) service
service named start
5.Edit /etc/named.conf
6. Copy /var/named/named.localhost
cp named.localhost linuxlab.local
7. Edit /var/named/linuxlab.local
$TTL 1D
@ IN SOA ns1.linuxlab.local. hostmaster.linuxlab.local. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS ns1.linuxlab.local.
@ IN MX 10 mail.linuxlab.local.
ns1 IN A 192.168.0.20
webserver IN A 192.168.0.25
www IN CNAME webserver.linuxlab.local.
mail IN A 192.168.0.30
8. Modify file’s ownership
chown root:named linuxlab.local
9. service named reload
10. Run dns queries against this DNS server
dig @localhost ns1.linuxlab.local
dig @localhost webserver.linuxlab.local
dig @localhost linuxlab.local MX
dig @localhost linuxlab.local NS
Hope you found it informative and useful. Any questions or comments are welcomed.