Resolving Domains Internally And Externally With Bind9 And Caching Nameserver - Page 2
5. Zone File Creation:Now there is an issue. :( Where is my shotgun? I.e. if you have installed bind-chroot, then you will be creating your domain zone file in /var/named/chroot/var/named/ directory, and then you will make a softlink to the /var/named/ directory, but if you didn't install this chroot package, then you are going to create the zone file directly in the /var/named/ directory. Now the following command works fine, if you have bind-chroot: $ vi /var/named/chroot/var/named/cbtcandy.org.zone OR (if bind-chroot is not installed) $ vi /var/named/cbtcandy.org.zone and type the following lines into your zone file: $TTL 86400 You can add as many records as you wish :) in this file. Note: Here I am assuming that our DNS machine name is nameserver and LAN subnet is on 192.168.1.0/24 , you can change this according to your situation. Now the following step is needed only if you have created the zone file in the /var/names/chroot/var/named/ directory. $ ln -s /var/named/chroot/var/named/cbtcandy.org.zone /var/named/cbtcandy.org.zone
6. Editing resolv.conf:Now to tell our nameserver machine about the order it will look for name resolution, we have to edit /etc/resolv.conf file, $ vi /etc/resolv.conf and write the following two lines, but keep them in same order, as we want to first resolve domain resolution query by caching-name server, so we will keep 127.0.0.1 line first, in this file. nameserver 127.0.0.1 Note: I assume that your ISP's nameserver machine IP is 212.96.24.1.
7. Setting Up Host Name:To set up your hostname according to your domain, we will edit /etc/sysconfig/network file, i.e. $ vi /etc/sysconfig/network Now type the following line: HOSTNAME=nameserver.cbtcandy.org
8. Restarting BIND Daemon:$ service named restart (Redhat,Fedora,Centos) OR $ /etc/rc.d/rc.bind restart (Suse,Debian)
9. Testing:Now to test whether your configuration is working fine or not, give the following command: $ nslookup nameserver.cbtcandy.org If you get the following result, this means your BIND 9 is working fine: Server: 127.0.0.1 Now to test your caching-nameserver, give the following command: $ nslookup www.howtoforge.org If you are getting the following result, this means the caching-nameserver is working fine. Server: 212.96.24.1 Note: If you find any problem durring configuration, please feel free to contact me.
|
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning
Learn benefits of Simpana software.
View the Gartner Video




print: 

Recent comments
11 hours 59 min ago
12 hours 53 min ago
16 hours 15 min ago
21 hours 35 min ago
21 hours 59 min ago
1 day 5 hours ago
1 day 5 hours ago
1 day 6 hours ago
1 day 7 hours ago
1 day 10 hours ago