Monday, February 7, 2011

Bind DNS on CentOS 5

Here is my quick and dirty cheatsheet on how to get bind working on CentOS5.
1. Make sure that iptables is not blocking your DNS queries ("service iptables stop" will disable the firewall)
2. Install Bind "yum install bind*"
3. Copy example configs to working directories:
a. "cp /usr/share/doc/bind-x.x.x/sample/etc /var/named/chroot/etc"
b. "cp /usr/share/doc/bind-x.x.x/sample/var /var/named/chroot/var/named"
4. Modify the named.conf in /var/named/chroot/etc and remove the un-needed views (I only need the internal view)
5. Modify the named.conf to have the correct zone information
6. Run /usr/sbin/dns-keygen and copy the generated key to the named.conf file under the ddns_key section.
7. Copy your my.internal.zone.db from /var/named/chroot/var/named or rename it to your correct zone name
8. Add your A records to the new zone.db file
9. Automatically start bind on boot
a. chkconfig named --add
b. chkconfig on level 2,3,4,5

No comments:

Post a Comment