Primary DNS (PDNS) Setup:
# rpm –qa|grep bind [to check package]
# rpm –qa|grep caching [to check package]
# cd /var/named [contains 3 setup files (cd /var/named/chroot/var/named for fedora core) ]
1. localhost.zone [Forword lookup zone, converts domain into IP]
2. named.ca [cash memory]
3. named.local [Backword lookup zone, converts IP into domain ]
Example:
To make a PDNS, domain_name: example.com & IP-192.168.1.205, host_name: linux205
# cd /var/named
# cp localhost.zone example.com
# cp named.local 192.168.1.205
# vi example.com
Line 2: ORIGIN example.com
3: linux205.example.com. root.example.com.
10: linux205.example.com
11: 192.168.1.205
12: linux205 IN A 192.168.1.205
# vi 192.168.1.205
Line 2: @ linux205.example.com root.example.com.
8: linux205.example.com.
9: IN A 192.168.1.205
10: 205 IN PTR linux205.example.com.
# vi /etc/named.conf [at first copy the portion localhost.zone & named.local then make change to this]
# vi /etc/resolv.conf [to setup domain IP]
Line 1: nameserver 192.168.1.205
2: search example.com
# service named restart
# rndc reload
Verify Command:
# dig -x 192.168.1.205
# host example.com
No comments:
Post a Comment