SlideShare a Scribd company logo
1 of 6
Download to read offline
Magnum
                                                                                                          9850332133


                                  How To Configure DNS Server (RHEL-5)
Scenario 1 :

Create DNS Server on your machine based upon following information.

Information :

         1.       It should be resolve to localhost with recusrsion
         2.       Open Port No. 53 for you machine’s Lan Card
         3.       Disable IPV6 for Port No. 53
         4.       Create a zone file for your domain example.com as
                            station8.example.com                  as       A         192.168.100.8
                            station8.example.com                  as       MX        192.168.100.254
         5.       Also write zone file for abc.com to meet following requirements
         6.       Verify all the configuration with red hat tools provided in distribution of RHEL 5.


                                                                                                     Web : abc.com
                                                                                                     192.168.100.5
               Primary DNS           Secondary DNS                                                     Web : abc.com
              (Your Machine)         (Other Machine)                                                   192.168.100.6
               192.168.100.8         192.168.100.254
                  station8              station254                                                     MX-1 : abc.com
                                                                                                       172.16.0.5

                                                                       Infrastrcture of                MX-2 : abc.com
                                                                           abc.com                     apps.gmail.com

                                                                                                       chat.abc.com
                                                                                                       10.0.0.7
               You will be
              creating DNS
               Server Here


Solution :

Step 1 : Installation
         Install following packages in your machine using rpm or yum tool
                  #         rpm -ivh bind-9.3.3-7.el5.i386.rpm
                  #         rpm -ivh caching-nameserver-9.3.3-7.el5.i386.rpm
                  #         rpm -ivh bind-chroot-9.3.3-7.el5.i386.rpm


Magnum Net Solutions Pvt. Ltd.
25, Saikrupa Apt., Central Excise Colony, Ring Road, Chhatrapati Square, Nagpur 440015
Web Site : http://ax100.net Email : info@ax100.net Call : 9850332133 SMS : 9922000898
Magnum
                                                                                         9850332133


Step 2 : Start the DNS Server, verify it is working and setup your machine as client
         Start tne DNS server using service command and using chkconfig make it to run on
         runlevels 2 3 4 5 as below.
                  #         service named restart
                  #         chkconfig --level 2345 bind on
         Verify activity on Port No. 53
                  #         lsof -i :53




1.       It should be resolve to localhost with recusrsion

         By default reursion is set on for localhost. You can verify it from

         /var/named/chroot/etc/named.caching-nameserver.conf

         This file contains following block where recursion for localhost is set on.

         view localhost_resolver {
                match-clients { localhost; };
                match-destinations { localhost; };
                recursion yes;
             include "/etc/named.rfc1912.zones";
         };

2.       Open Port No. 53 for you machine’s Lan Card
         To do this you need to comment following lines in

         /var/named/chroot/etc/named.caching-nameserver.conf

         //    listen-on port 53 { 127.0.0.1; };

         //       view localhost_resolver {
         //              match-clients { localhost; };
         //              match-destinations { localhost; };

Magnum Net Solutions Pvt. Ltd.
25, Saikrupa Apt., Central Excise Colony, Ring Road, Chhatrapati Square, Nagpur 440015
Web Site : http://ax100.net Email : info@ax100.net Call : 9850332133 SMS : 9922000898
Magnum
                                                                                         9850332133


         //                        recursion yes;
         //              include "/etc/named.rfc1912.zones";
         //                 };

        By commenting       listen-on port 53 { 127.0.0.1; }; we are making the posrt 53 open to all
interfaces. If you want specific the you can do like this

                  listen-on port 53 { 127.0.0.1; 192.168.100.8;};

        We are also commenting the view localhost_resolver { } Block so that query can made from
interfaces other than localhost.

3.       Disable IPV6 for Port No. 53 :
         You can disable IPV6 query by commenting following lines in options block.
         //    listen-on-v6 port 53 { ::1; };
         //    query-source-v6 port 53;
         After making the changes, restart the named service and check using lsof command. It should
display following output.




         Also make sure comment and few more things to make this DNS server public.
         a]    Comment      allow-query { localhost; }; in options block
         b]    Add          recursion yes;        in options block
         c]    Also add     include "/etc/named.rfc1912.zones";        at the end of file.

Your final conf file (/var/named/chroot/etc/named.caching-nameserver.conf) should look like as
below.

options {
     directory       "/var/named";
     dump-file       "/var/named/data/cache_dump.db";
     statistics-file "/var/named/data/named_stats.txt";
     memstatistics-file "/var/named/data/named_mem_stats.txt";
     query-source    port 53;
     recursion yes;
};


Magnum Net Solutions Pvt. Ltd.
25, Saikrupa Apt., Central Excise Colony, Ring Road, Chhatrapati Square, Nagpur 440015
Web Site : http://ax100.net Email : info@ax100.net Call : 9850332133 SMS : 9922000898
Magnum
                                                                                                       9850332133



logging {
     channel default_debug {
           file "data/named.run";
           severity dynamic;
        };
};
include "/etc/named.rfc1912.zones";

4.       Create a zone file for your domain example.com as
                            station8.example.com                  as       A         192.168.100.8
                            station8.example.com                  as       MX        192.168.100.254
         For this purpose you need to edit              /var/named/chroot/etc/named.rfc1912.zones
         Add following block at the end of file and save it.


         zone "example.com" IN {
                  type master;
                  file "example.com.zone" ;
         };


         Now create /var/named/chroot/var/named/example.com.zone file and write as below.




         Now verify the syntax of /var/named/chroot/etc/named.rfc1912.zones by using following
command.
                  #         named-checkconf /var/named/chroot/etc/named.rfc1912.zones
         This should not produce any errors.

Magnum Net Solutions Pvt. Ltd.
25, Saikrupa Apt., Central Excise Colony, Ring Road, Chhatrapati Square, Nagpur 440015
Web Site : http://ax100.net Email : info@ax100.net Call : 9850332133 SMS : 9922000898
Magnum
                                                                                         9850332133


         Now verify the syntax of /var/named/chroot/var/named/example.com.zone by using follow-
ing command.
         #        named-checkzone example.com /var/named/chroot/var/named/example.com.zone
         This command will come up with following output, if there are no errors.
                  zone example.com/IN: loaded serial 2009012901
                  OK
         Now modify /etc/resolv.conf as below and point your DNS Client to your machine.




         Now check the DNS of example.com




         You can also use dig command to get complete answers.




Magnum Net Solutions Pvt. Ltd.
25, Saikrupa Apt., Central Excise Colony, Ring Road, Chhatrapati Square, Nagpur 440015
Web Site : http://ax100.net Email : info@ax100.net Call : 9850332133 SMS : 9922000898
Magnum
                                                                                              9850332133


5.       Also write zone file for abc.com to meet following requirements
         For this purpose you need to edit              /var/named/chroot/etc/named.rfc1912.zones
         Add following block at the end of file and save it.

         zone "abc.com" IN {
                  type master;
                  file "abc.com.zone" ;
         };

         Now create /var/named/chroot/var/named/abc.com.zone file and write as below.




         Now verify the syntax of /var/named/chroot/etc/named.rfc1912.zones
         #        named-checkconf /var/named/chroot/etc/named.rfc1912.zones
         Now verify the syntax of /var/named/chroot/var/named/example.com.zone
         #        named-checkzone example.com /var/named/chroot/var/named/example.com.zone

         Run following command to verify the DNS of abc.com




Magnum Net Solutions Pvt. Ltd.
25, Saikrupa Apt., Central Excise Colony, Ring Road, Chhatrapati Square, Nagpur 440015
Web Site : http://ax100.net Email : info@ax100.net Call : 9850332133 SMS : 9922000898

More Related Content

What's hot

Linux networking commands short
Linux networking commands shortLinux networking commands short
Linux networking commands shortSayed Ahmed
 
2. reverse primarydns using bind for ptr and cname record ipv4
2. reverse primarydns using bind for ptr and cname record ipv42. reverse primarydns using bind for ptr and cname record ipv4
2. reverse primarydns using bind for ptr and cname record ipv4Piyush Kumar
 
6. reverse primarydns using bind for ptr and cname record ipv6 with forwarder
6. reverse primarydns using bind for ptr and cname record ipv6 with forwarder6. reverse primarydns using bind for ptr and cname record ipv6 with forwarder
6. reverse primarydns using bind for ptr and cname record ipv6 with forwarderPiyush Kumar
 
Unable to access the net app cluster mode 9.2 san through gui after power mai...
Unable to access the net app cluster mode 9.2 san through gui after power mai...Unable to access the net app cluster mode 9.2 san through gui after power mai...
Unable to access the net app cluster mode 9.2 san through gui after power mai...Saroj Sahu
 
linux networking commands short
linux networking commands shortlinux networking commands short
linux networking commands shortSayed Ahmed
 
[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure[MathWorks] Versioning Infrastructure
[MathWorks] Versioning InfrastructurePerforce
 
How to use mmdvm host wif main board
How to use mmdvm host wif main boardHow to use mmdvm host wif main board
How to use mmdvm host wif main boardAURELIO PY5BK
 
Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise
Configure Webserver & SSL secure & redirect in SuSE Linux EnterpriseConfigure Webserver & SSL secure & redirect in SuSE Linux Enterprise
Configure Webserver & SSL secure & redirect in SuSE Linux EnterpriseTola LENG
 
How to shutdown the Netapp SAN 8.3 and 9.2 version
How to shutdown the Netapp SAN 8.3 and 9.2 versionHow to shutdown the Netapp SAN 8.3 and 9.2 version
How to shutdown the Netapp SAN 8.3 and 9.2 versionSaroj Sahu
 
Saad baig practical file
Saad baig practical fileSaad baig practical file
Saad baig practical fileSaadBaig33
 
managing your network environment
managing your network environmentmanaging your network environment
managing your network environmentscooby_doo
 
Linux networking commands
Linux networking commandsLinux networking commands
Linux networking commandsSayed Ahmed
 
Kickstat File_Draft_ESXI5.1_Template
Kickstat File_Draft_ESXI5.1_TemplateKickstat File_Draft_ESXI5.1_Template
Kickstat File_Draft_ESXI5.1_TemplateLuca Viscomi
 
How to shut down Netapp san 9.2 cluster mode version1
How to shut down Netapp san 9.2 cluster mode version1How to shut down Netapp san 9.2 cluster mode version1
How to shut down Netapp san 9.2 cluster mode version1Saroj Sahu
 
Tola.leng mail server (sq_mail & rcmail)_q5_
Tola.leng mail server (sq_mail & rcmail)_q5_Tola.leng mail server (sq_mail & rcmail)_q5_
Tola.leng mail server (sq_mail & rcmail)_q5_Tola LENG
 
NFS is an excellent way of sharing files between linux and other unix systems
NFS is an excellent way of sharing files between linux and other unix systemsNFS is an excellent way of sharing files between linux and other unix systems
NFS is an excellent way of sharing files between linux and other unix systemsAshish Mamgain
 

What's hot (20)

Linux networking commands short
Linux networking commands shortLinux networking commands short
Linux networking commands short
 
2. reverse primarydns using bind for ptr and cname record ipv4
2. reverse primarydns using bind for ptr and cname record ipv42. reverse primarydns using bind for ptr and cname record ipv4
2. reverse primarydns using bind for ptr and cname record ipv4
 
DNS SERVER
DNS SERVERDNS SERVER
DNS SERVER
 
6. reverse primarydns using bind for ptr and cname record ipv6 with forwarder
6. reverse primarydns using bind for ptr and cname record ipv6 with forwarder6. reverse primarydns using bind for ptr and cname record ipv6 with forwarder
6. reverse primarydns using bind for ptr and cname record ipv6 with forwarder
 
Unable to access the net app cluster mode 9.2 san through gui after power mai...
Unable to access the net app cluster mode 9.2 san through gui after power mai...Unable to access the net app cluster mode 9.2 san through gui after power mai...
Unable to access the net app cluster mode 9.2 san through gui after power mai...
 
linux networking commands short
linux networking commands shortlinux networking commands short
linux networking commands short
 
[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure
 
Dns explained
Dns explainedDns explained
Dns explained
 
How to use mmdvm host wif main board
How to use mmdvm host wif main boardHow to use mmdvm host wif main board
How to use mmdvm host wif main board
 
Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise
Configure Webserver & SSL secure & redirect in SuSE Linux EnterpriseConfigure Webserver & SSL secure & redirect in SuSE Linux Enterprise
Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise
 
How to shutdown the Netapp SAN 8.3 and 9.2 version
How to shutdown the Netapp SAN 8.3 and 9.2 versionHow to shutdown the Netapp SAN 8.3 and 9.2 version
How to shutdown the Netapp SAN 8.3 and 9.2 version
 
Saad baig practical file
Saad baig practical fileSaad baig practical file
Saad baig practical file
 
managing your network environment
managing your network environmentmanaging your network environment
managing your network environment
 
Linux networking commands
Linux networking commandsLinux networking commands
Linux networking commands
 
Kickstat File_Draft_ESXI5.1_Template
Kickstat File_Draft_ESXI5.1_TemplateKickstat File_Draft_ESXI5.1_Template
Kickstat File_Draft_ESXI5.1_Template
 
How to shut down Netapp san 9.2 cluster mode version1
How to shut down Netapp san 9.2 cluster mode version1How to shut down Netapp san 9.2 cluster mode version1
How to shut down Netapp san 9.2 cluster mode version1
 
Server readme
Server readmeServer readme
Server readme
 
Tola.leng mail server (sq_mail & rcmail)_q5_
Tola.leng mail server (sq_mail & rcmail)_q5_Tola.leng mail server (sq_mail & rcmail)_q5_
Tola.leng mail server (sq_mail & rcmail)_q5_
 
Useful Linux commands
Useful Linux commandsUseful Linux commands
Useful Linux commands
 
NFS is an excellent way of sharing files between linux and other unix systems
NFS is an excellent way of sharing files between linux and other unix systemsNFS is an excellent way of sharing files between linux and other unix systems
NFS is an excellent way of sharing files between linux and other unix systems
 

Similar to Dns configuration on rhel 5

26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rulesFreddy Buenaño
 
Oracle cluster installation with grid and nfs
Oracle cluster  installation with grid and nfsOracle cluster  installation with grid and nfs
Oracle cluster installation with grid and nfsChanaka Lasantha
 
Oracle cluster installation with grid and iscsi
Oracle cluster  installation with grid and iscsiOracle cluster  installation with grid and iscsi
Oracle cluster installation with grid and iscsiChanaka Lasantha
 
Step by step_linux_guide
Step by step_linux_guideStep by step_linux_guide
Step by step_linux_guidevinod31dec
 
What's New in Docker 1.12 by Mike Goelzer and Andrea Luzzardi
What's New in Docker 1.12 by Mike Goelzer and Andrea LuzzardiWhat's New in Docker 1.12 by Mike Goelzer and Andrea Luzzardi
What's New in Docker 1.12 by Mike Goelzer and Andrea LuzzardiDocker, Inc.
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiMike Goelzer
 
Varnish Configuration Step by Step
Varnish Configuration Step by StepVarnish Configuration Step by Step
Varnish Configuration Step by StepKim Stefan Lindholm
 
Managing Large-scale Networks with Trigger
Managing Large-scale Networks with TriggerManaging Large-scale Networks with Trigger
Managing Large-scale Networks with Triggerjathanism
 
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...addame
 
New Flash Builder 4 WSDL and HTTP Connectors
New Flash Builder 4 WSDL and HTTP ConnectorsNew Flash Builder 4 WSDL and HTTP Connectors
New Flash Builder 4 WSDL and HTTP Connectorsrtretola
 
Citrix XenServer 5.5 Troubleshooting
Citrix XenServer 5.5 TroubleshootingCitrix XenServer 5.5 Troubleshooting
Citrix XenServer 5.5 TroubleshootingThomas Krampe
 
A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...
A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...
A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...DataStax
 
Cent os 5.1 - configuring samba 3.0 to use the ads security mode
Cent os 5.1  - configuring samba 3.0 to use the ads security modeCent os 5.1  - configuring samba 3.0 to use the ads security mode
Cent os 5.1 - configuring samba 3.0 to use the ads security modeB Sasi Kumar
 
BIND 9 logging best practices
BIND 9 logging best practicesBIND 9 logging best practices
BIND 9 logging best practicesMen and Mice
 
Com 135 final project user manual
Com 135 final project user manualCom 135 final project user manual
Com 135 final project user manualbiasimistfur1984
 
Cracking CTFs The Sysbypass CTF
Cracking CTFs The Sysbypass CTFCracking CTFs The Sysbypass CTF
Cracking CTFs The Sysbypass CTFRiyaz Walikar
 

Similar to Dns configuration on rhel 5 (20)

Network Manual
Network ManualNetwork Manual
Network Manual
 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
 
Oracle cluster installation with grid and nfs
Oracle cluster  installation with grid and nfsOracle cluster  installation with grid and nfs
Oracle cluster installation with grid and nfs
 
Ex200
Ex200Ex200
Ex200
 
Rac on NFS
Rac on NFSRac on NFS
Rac on NFS
 
Oracle cluster installation with grid and iscsi
Oracle cluster  installation with grid and iscsiOracle cluster  installation with grid and iscsi
Oracle cluster installation with grid and iscsi
 
Step by step_linux_guide
Step by step_linux_guideStep by step_linux_guide
Step by step_linux_guide
 
What's New in Docker 1.12 by Mike Goelzer and Andrea Luzzardi
What's New in Docker 1.12 by Mike Goelzer and Andrea LuzzardiWhat's New in Docker 1.12 by Mike Goelzer and Andrea Luzzardi
What's New in Docker 1.12 by Mike Goelzer and Andrea Luzzardi
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
 
Varnish Configuration Step by Step
Varnish Configuration Step by StepVarnish Configuration Step by Step
Varnish Configuration Step by Step
 
Managing Large-scale Networks with Trigger
Managing Large-scale Networks with TriggerManaging Large-scale Networks with Trigger
Managing Large-scale Networks with Trigger
 
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
 
New Flash Builder 4 WSDL and HTTP Connectors
New Flash Builder 4 WSDL and HTTP ConnectorsNew Flash Builder 4 WSDL and HTTP Connectors
New Flash Builder 4 WSDL and HTTP Connectors
 
Citrix XenServer 5.5 Troubleshooting
Citrix XenServer 5.5 TroubleshootingCitrix XenServer 5.5 Troubleshooting
Citrix XenServer 5.5 Troubleshooting
 
A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...
A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...
A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...
 
Cent os 5.1 - configuring samba 3.0 to use the ads security mode
Cent os 5.1  - configuring samba 3.0 to use the ads security modeCent os 5.1  - configuring samba 3.0 to use the ads security mode
Cent os 5.1 - configuring samba 3.0 to use the ads security mode
 
BIND 9 logging best practices
BIND 9 logging best practicesBIND 9 logging best practices
BIND 9 logging best practices
 
Quad9 and DNS Privacy
Quad9 and DNS PrivacyQuad9 and DNS Privacy
Quad9 and DNS Privacy
 
Com 135 final project user manual
Com 135 final project user manualCom 135 final project user manual
Com 135 final project user manual
 
Cracking CTFs The Sysbypass CTF
Cracking CTFs The Sysbypass CTFCracking CTFs The Sysbypass CTF
Cracking CTFs The Sysbypass CTF
 

Dns configuration on rhel 5

  • 1. Magnum 9850332133 How To Configure DNS Server (RHEL-5) Scenario 1 : Create DNS Server on your machine based upon following information. Information : 1. It should be resolve to localhost with recusrsion 2. Open Port No. 53 for you machine’s Lan Card 3. Disable IPV6 for Port No. 53 4. Create a zone file for your domain example.com as station8.example.com as A 192.168.100.8 station8.example.com as MX 192.168.100.254 5. Also write zone file for abc.com to meet following requirements 6. Verify all the configuration with red hat tools provided in distribution of RHEL 5. Web : abc.com 192.168.100.5 Primary DNS Secondary DNS Web : abc.com (Your Machine) (Other Machine) 192.168.100.6 192.168.100.8 192.168.100.254 station8 station254 MX-1 : abc.com 172.16.0.5 Infrastrcture of MX-2 : abc.com abc.com apps.gmail.com chat.abc.com 10.0.0.7 You will be creating DNS Server Here Solution : Step 1 : Installation Install following packages in your machine using rpm or yum tool # rpm -ivh bind-9.3.3-7.el5.i386.rpm # rpm -ivh caching-nameserver-9.3.3-7.el5.i386.rpm # rpm -ivh bind-chroot-9.3.3-7.el5.i386.rpm Magnum Net Solutions Pvt. Ltd. 25, Saikrupa Apt., Central Excise Colony, Ring Road, Chhatrapati Square, Nagpur 440015 Web Site : http://ax100.net Email : info@ax100.net Call : 9850332133 SMS : 9922000898
  • 2. Magnum 9850332133 Step 2 : Start the DNS Server, verify it is working and setup your machine as client Start tne DNS server using service command and using chkconfig make it to run on runlevels 2 3 4 5 as below. # service named restart # chkconfig --level 2345 bind on Verify activity on Port No. 53 # lsof -i :53 1. It should be resolve to localhost with recusrsion By default reursion is set on for localhost. You can verify it from /var/named/chroot/etc/named.caching-nameserver.conf This file contains following block where recursion for localhost is set on. view localhost_resolver { match-clients { localhost; }; match-destinations { localhost; }; recursion yes; include "/etc/named.rfc1912.zones"; }; 2. Open Port No. 53 for you machine’s Lan Card To do this you need to comment following lines in /var/named/chroot/etc/named.caching-nameserver.conf // listen-on port 53 { 127.0.0.1; }; // view localhost_resolver { // match-clients { localhost; }; // match-destinations { localhost; }; Magnum Net Solutions Pvt. Ltd. 25, Saikrupa Apt., Central Excise Colony, Ring Road, Chhatrapati Square, Nagpur 440015 Web Site : http://ax100.net Email : info@ax100.net Call : 9850332133 SMS : 9922000898
  • 3. Magnum 9850332133 // recursion yes; // include "/etc/named.rfc1912.zones"; // }; By commenting listen-on port 53 { 127.0.0.1; }; we are making the posrt 53 open to all interfaces. If you want specific the you can do like this listen-on port 53 { 127.0.0.1; 192.168.100.8;}; We are also commenting the view localhost_resolver { } Block so that query can made from interfaces other than localhost. 3. Disable IPV6 for Port No. 53 : You can disable IPV6 query by commenting following lines in options block. // listen-on-v6 port 53 { ::1; }; // query-source-v6 port 53; After making the changes, restart the named service and check using lsof command. It should display following output. Also make sure comment and few more things to make this DNS server public. a] Comment allow-query { localhost; }; in options block b] Add recursion yes; in options block c] Also add include "/etc/named.rfc1912.zones"; at the end of file. Your final conf file (/var/named/chroot/etc/named.caching-nameserver.conf) should look like as below. options { directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; query-source port 53; recursion yes; }; Magnum Net Solutions Pvt. Ltd. 25, Saikrupa Apt., Central Excise Colony, Ring Road, Chhatrapati Square, Nagpur 440015 Web Site : http://ax100.net Email : info@ax100.net Call : 9850332133 SMS : 9922000898
  • 4. Magnum 9850332133 logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; include "/etc/named.rfc1912.zones"; 4. Create a zone file for your domain example.com as station8.example.com as A 192.168.100.8 station8.example.com as MX 192.168.100.254 For this purpose you need to edit /var/named/chroot/etc/named.rfc1912.zones Add following block at the end of file and save it. zone "example.com" IN { type master; file "example.com.zone" ; }; Now create /var/named/chroot/var/named/example.com.zone file and write as below. Now verify the syntax of /var/named/chroot/etc/named.rfc1912.zones by using following command. # named-checkconf /var/named/chroot/etc/named.rfc1912.zones This should not produce any errors. Magnum Net Solutions Pvt. Ltd. 25, Saikrupa Apt., Central Excise Colony, Ring Road, Chhatrapati Square, Nagpur 440015 Web Site : http://ax100.net Email : info@ax100.net Call : 9850332133 SMS : 9922000898
  • 5. Magnum 9850332133 Now verify the syntax of /var/named/chroot/var/named/example.com.zone by using follow- ing command. # named-checkzone example.com /var/named/chroot/var/named/example.com.zone This command will come up with following output, if there are no errors. zone example.com/IN: loaded serial 2009012901 OK Now modify /etc/resolv.conf as below and point your DNS Client to your machine. Now check the DNS of example.com You can also use dig command to get complete answers. Magnum Net Solutions Pvt. Ltd. 25, Saikrupa Apt., Central Excise Colony, Ring Road, Chhatrapati Square, Nagpur 440015 Web Site : http://ax100.net Email : info@ax100.net Call : 9850332133 SMS : 9922000898
  • 6. Magnum 9850332133 5. Also write zone file for abc.com to meet following requirements For this purpose you need to edit /var/named/chroot/etc/named.rfc1912.zones Add following block at the end of file and save it. zone "abc.com" IN { type master; file "abc.com.zone" ; }; Now create /var/named/chroot/var/named/abc.com.zone file and write as below. Now verify the syntax of /var/named/chroot/etc/named.rfc1912.zones # named-checkconf /var/named/chroot/etc/named.rfc1912.zones Now verify the syntax of /var/named/chroot/var/named/example.com.zone # named-checkzone example.com /var/named/chroot/var/named/example.com.zone Run following command to verify the DNS of abc.com Magnum Net Solutions Pvt. Ltd. 25, Saikrupa Apt., Central Excise Colony, Ring Road, Chhatrapati Square, Nagpur 440015 Web Site : http://ax100.net Email : info@ax100.net Call : 9850332133 SMS : 9922000898