Hi earlpage,
First of all, it will be a bit confusing to handle red-hat and windows-2K3 servers at a time. But, anyways here is a brief description of how I configured DNS foe myself :
In DNS in RHEL, there are two zones :
a) forward lookup zone (resolves host names to IP addresses)
b) backward lookup zone (resolves IP address to host names)
DNS will only resolve FQDNs(Full Qualified Domain Names)only.
This resolving can also be done in two ways, :
i) local resolving (on a particular machine only)
ii) through DNS (gloabal impact)
So, first of all for DNS , you need to install the required package, start the daemon service 'named' , i.e:
# chkconfig named on
Next step is to set the hostname, and decide on the domain name that you need to configure.
Now, open /etc/hosts and hostname in that file. Later open /etc/resolve.conf file and put hostname & domain name in this file. Make sure don't delete any files, untill unles veru sure of.
This will finish the basic configuration of DNS. Now we need to get involved in more complex and detailed configuration of DNS. We will start with configuration of default port-53 for DNS :
# cd /var/named/chroot/etc
# cp named.caching-nameserver.conf named.conf
# chown root:named named.conf
# chmod 640 named.conf
Above statements will backup named.conf file, change the ownership for the file and set maximun secure permission for it.
# vi named.conf
i) line no 15 : change lookup IP to actual IP. make sure of dots and colons (if any)
ii) line no 23 : allow query(localhost; <actual IP/subnet>
;
iii) add another line just after this line :
# allow-transfer (localhost; <actual IP/subnet>
;
# forwarders ( actual IP
;
iv) line no 34 : match clients (localhost; <actual IP/subnet>
;
v) line no 35 : match destinations (localhost;<actual IP>
;
After this we need to edit /var/named/chroot/etc/named.rfc1912.zones file :
i) line no 21: remove 'localhost' and give your domain name
ii)line no 23: remove localhost again , and put 'your domain name.zone'
reverse lookup :
iii) line no 27: give IP address appropriately and rest will remain same
iv) line no 29 : file "actual IP.zone"
# service named restart
This will show that files are not avaialable, which is obvious because till now we have not created the files as well as didn't place them properly and configure them appropritely. if some other error comes, then check something must be wrong.
# cd /var/named/chroot/var/named
# cp localhost.zone your-domin-name.zone
# cp named.local reverse IP.zone
e.g : if IP is 10.2.5.1 then: cp named.local 5.2.10.zone
# restorecon 5.2.10.zone
# restorecon yourdomainname.zone
This will create the required files.
I am quite sure that this will be confusing enough for you till now. But believe me that DNS configuration is confusing only for the first time.Finally, you need to add hostnames, aliases and hostname in these files in the similar format that has been there in these files(yourdomainname.zone and 5.2.10.zone) as samples.
# service named configtest
# named-checkzone yourdomainname.zone /var/named/chroot/var/named/yourdomainname.zone
# named-checkzone 5.2.10.zone /var/named/chroot/var/named/5.2.10.zone
All of the above three statements should show OK after their execution.
# service named restart
Finally,
# dig yourdomainname
should show details like query, authority, answers, ...etc
Hope that will not confuse you even more...but if it does so then maybe you can wait for others more fruitful entries....
Regards,
Kapil