Jump to content

Split DNS Implementation for RDM by Gopal Krishan

From TetraWiki
Revision as of 03:58, 16 June 2014 by Biswajit (talk | contribs) (Created page with "= 9. Implementation of Split DNS = Edit the file /etc/named.conf as follows and make sure internal and external view are created which I have marded in red. vi /etc/named.co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

9. Implementation of Split DNS

Edit the file /etc/named.conf as follows and make sure internal and external view are created which I have marded in red.


vi /etc/named.conf

###################################################################


// named.conf for Red Hat caching-nameserver


//


acl loc {127.0.0.1/8; 10.10.1.0/21; 10.10.2.0/21; 10.10.3.0/21; };


options {


directory "/var/named";


dump-file "/var/named/data/cache_dump.db";


statistics-file "/var/named/data/named_stats.txt";


allow-query { loc;};


allow-recursion { loc;};


forwarders {202.56.240.5; 202.56.250.5; 4.2.2.2; };


/*


* If there is a firewall between you and nameservers you want


* to talk to, you might need to uncomment the query-source


* directive below. Previous versions of BIND always asked


* questions using port 53, but BIND 8.1 uses an unprivileged


* port by default.


*/


// query-source address * port 53;


};


//


// a caching only nameserver config


//


controls {


inet 127.0.0.1 allow { localhost; } keys { rndckey; };


};


view "inside" {


match-clients { loc; };


recursion yes;


zone "." IN {


type hint;


file "named.root";


};


zone "0.0.127.in-addr.arpa" IN {


type master;


file "named.local";


allow-update { none; };


};


zone "rdm.co.in" IN {


type master;


file "rdm.co.in.int.zone";


allow-update { none; };


allow-query { any; };


};


zone "rdmindia.com" IN {


type master;


file "rdmindia.com.int.zone";


allow-update { none; };


allow-query { any; };


};


zone "rdmfamily.in" IN {


type master;


file "rdmfamily.in.zone";


allow-update { none; };


allow-query { loc; };


};


zone "1.10.10.in-addr.arpa" IN {


type master;


file "rdmfamily.in.local";


allow-update { none; };


allow-query { loc; };


};


zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {


type master;


file "named.ip6.local";


allow-update { none; };


};


zone "255.in-addr.arpa" IN {


type master;


file "named.broadcast";


allow-update { none; };


};


zone "0.in-addr.arpa" IN {


type master;


file "named.zero";


allow-update { none; };


};


};


view "outside" {


match-clients { !loc; any; };


recursion no;


zone "rdm.co.in" IN {


type master;


file "rdm.co.in.ext.zone";


allow-update { none; };


allow-query { any; };


};


zone "rdmindia.com" IN {


type master;


file "rdmindia.com.ext.zone";


allow-update { none; };


allow-query { any; };


};


zone "188.21.125.in-addr.arpa" IN {


type master;


file "rdm.co.in.local";


allow-update { none; };


allow-query { any; };


};


};


include "/etc/rndc.key";


Make entries in /var/named/chroot/var/named/.


Internal Views


vi rdm.co.in.int.zone


###########################################################

$TTL 86400


@ IN SOA dellc1.rdm.co.in. admin.rdm.co.in. (


2008070201 ; Serial


28800 ; Refresh


14400 ; Retry


3600000 ; Expire


86400 ) ; Minimum


IN NS dellc.rdm.co.in. 


IN NS dellc1.rdm.co.in. 


rdm.co.in. IN A 10.10.1.9


rdm.co.in. IN A 10.10.1.10


mailserver.rdm.co.in.INA10.10.1.2


sambaPDC.rdm.co.in.INA10.10.1.15


sambaBDC.rdm.co.in.INA10.10.1.16


dellcINA10.10.1.1


dellc1INA 10.10.1.8


wwwINA10.10.1.8


wwwINA10.10.1.1


ftpINCNAMEdellc.rdm.co.in.


#######################################################################


vi rdmindia.com.int.zone

######################################################################

$TTL 86400


@ IN SOA dellc1.rdm.co.in. admin.rdm.co.in. (


2008060501 ; Serial


28800 ; Refresh


14400 ; Retry


3600000 ; Expire


86400 ) ; Minimum


IN NS dellc.rdm.co.in.


IN NS dellc1.rdm.co.in.


rdmindia.com. IN A 10.10.1.9


rdmindia.com. IN A 10.10.1.10


ns.rdmindia.com.INA 10.10.1.8


rdmindia.com.INNSns.rdmindia.com.


ftpINCNAMEns.rdmindia.com.


hrINA203.190.134.85


dellc.rdm.co.in.INA10.10.1.8


dellc1.rdm.co.in.INA10.10.1.1


#####################################################################


vi rdmfamily.in.zone


###################################################################


$TTL 86400


@ IN SOA dns1.rdm.co.in. admin.rdm.co.in. (


2008060501 ; Serial


28800 ; Refresh


14400 ; Retry


3600000 ; Expire


86400 ) ; Minimum


IN NS dns1.rdm.co.in.


IN NS dns2.rdm.co.in.


rdmfamily.in. IN A 10.10.1.1


rdmfamily.in. IN A 10.10.1.8


ib.rdmfamily.in. IN A 10.10.2.250


dns1.rdm.co.in. INA 10.10.1.1


dns2.rdm.co.in. INA 10.10.1.8


###########################################################################


vi rdmfamily.in.local


#########################################################################

$TTL 86400


@ IN SOA dns1.rdm.co.in. admin.rdm.co.in. (


2008051701 ; Serial


28800 ; Refresh


14400 ; Retry


3600000 ; Expire


86400 ) ; Minimum


IN NS dns1.rdm.co.in.


IN NS dns2.rdm.co.in.


1 IN PTR rdmfamily.in.


8 IN PTR rdmfamily.in.


250 IN PTR ib.rdmfamily.in.


2 IN PTR mailserver.rdm.co.in.


##########################################################################


External views


vi rdm.co.in.ext.zone


##########################################################################


$TTL 86400


@ IN SOA dellc1.rdm.co.in. admin.rdm.co.in. (


2008070201 ; Serial


28800 ; Refresh


14400 ; Retry


3600000 ; Expire


86400 ) ; Minimum


IN NS dellc.rdm.co.in.


IN NS dellc1.rdm.co.in.


rdm.co.in. IN A 203.190.134.82


rdm.co.in. IN A 125.21.188.210


mail1.rdm.co.in.INA203.190.134.89


mail2.rdm.co.in.INA125.21.188.210


rdm.co.in. IN MX 1mail1.rdm.co.in.


rdm.co.in. IN MX 10mail2.rdm.co.in.


mailserver.rdm.co.in.INA203.190.134.83


dellcINA203.190.134.82


wwwINA203.190.134.82


wwwINA125.21.188.210


ftpINCNAMEdellc.rdm.co.in.


www.rdm.co.in.INA203.190.134.82


www.rdm.co.in.INA125.21.188.210


dellc.rdm.co.in.INA203.190.134.82


dellc1.rdm.co.in.IN A125.21.188.210


###########################################################################


vi rdminida.com.ext.zone


$TTL 86400


@ IN SOA dellc1.rdm.co.in. admin.rdm.co.in. (


2008060501 ; Serial


28800 ; Refresh


14400 ; Retry


3600000 ; Expire


86400 ) ; Minimum


IN NS dellc.rdm.co.in.


IN NS dellc1.rdm.co.in.


rdmindia.com. IN A 203.190.134.82


rdmindia.com. IN A 125.21.188.210


rdmindia.com.INMX1203.190.134.89.


rdmindia.com.INMX10125.21.188.210.


mailserver.rdm.co.in.INA203.190.134.83


nsINA203.190.134.82


ns.rdmindia.com.INA203.190.134.82


rdmindia.com.INNSns.rdmindia.com.


dellcINA203.190.134.82


ftpINCNAMEns.rdmindia.com.


hrINA203.190.134.85


intranetINA203.190.134.82


projectsINA220.227.149.66


wapINA203.190.134.85


dellc.rdm.co.in.INA203.190.134.82


dellc1.rdm.co.in.INA125.21.188.210


######################################################################


vi rdm.co.in.local


###########################################################################


$TTL 86400


@ IN SOA dellc1.rdm.co.in. admin.rdm.co.in. (


2008051701 ; Serial


28800 ; Refresh


14400 ; Retry


3600000 ; Expire


86400 ) ; Minimum


IN NS dellc.rdm.co.in.


IN NS dellc1.rdm.co.in.


210 IN PTR rdmindia.com.


210 IN PTR dellc1.rdmindia.com.


210 IN PTR www.rdmindia.co.in.


210 IN PTR ns.rdmindia.com.


210 IN PTR rdm.co.in.


210 IN PTR dellc1.rdm.co.in.


210 IN PTR rdm.co.in.


########################################################################