
DNS (Introduction):
- Used to resolve (translate) domain name to IP address and IP address to domain name.
- Port no. 53
Daemon : named
Port no. 53
Packages : bind, bind-utils, bind-chroot, caching-nameserver
Related Helps:Basic commands vim editoryum |
DNS SERVER (Configuration):
In this scenario:
IP address of server = 192.168.1.111
Hostname = srv
Domain Name = wtuto.com
Full Computer name (FQDN) = srv.wtuto.com
Install the required packages:
# yum install *bind*
# yum install *caching-nameserver*
Related Topic:DNS (in RHEL6) |
Add entry of IP Address, Full Computer Name & Hostname in hosts file:
# vim /etc/hosts
192.168.1.111 srv.wtuto.com srv
Add entry of domain name to search and IP address of DNS Server:
# vim /etc/resolv.conf
search wtuto.com
nameserver 192.168.1.111
Make sure you have an entry of full computer name in network file:
# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=srv.wtuto.com
If you have iptables enabled, allow UDP and TCP traffic for port no. 53:
# vim /etc/sysconfig/iptables
Note: There are 4 configuration file of DNS,
2 files located in /var/named/chroot/etc, other 2 files in /var/named/chroot/named
# cd /var/named/chroot/etc
# cp named.caching-nameserver.conf named.conf
# vim named.conf
# chown root:named named.conf
# vim named.rfc*
# chown root:named named.rfc*
# cd /var/named/chroot/var/named
# cp localdomain.zone forward.zone
# cp named.local reverse.zone
# vim forward.zone
# vim reverse.zone
# chown root:named forward.zone
# chown root:named reverse.zone
Start named service:
# service named start
To test forward lookup zone:
# dig srv.wtuto.com (to test forward lookup zone)
To test reverse lookup zone:
# dig x 192.168.1.111
Complete Configuration Video RHEL 5:
Complete Configuration Video RHEL 6:





