Install the bind package:
# yum install -y bind
Edit the /etc/named.conf file and change the ‘listen-on’ option from 127.0.0.1 to any:
listen-on port 53 { any; };
In the same file, change the ‘allow-query’ option from localhost to any:
allow-query { any; };
In the same file, disable the ‘dnssec-validation‘ option:
dnssec-validation no;
Check the configuration file:
# named-checkconf
Add two new rules to the firewall:
# iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 53 -j ACCEPT # iptables -I INPUT -m state --state NEW -m udp -p udp --dport 53 -j ACCEPT
Save the firewall configuration:
# service iptables save
Activate the DNS service:
# chkconfig named on
Start the DNS service:
# service named start
Check the configuration:
# nslookup cnn.com 127.0.0.1 # dig @127.0.0.1 cnn.com
Leave a Reply
You must be logged in to post a comment.