11.07.2015 Views

Implementing PTR Records In a Sphera Environment ... - KB Parallels

Implementing PTR Records In a Sphera Environment ... - KB Parallels

Implementing PTR Records In a Sphera Environment ... - KB Parallels

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Sphera</strong> Corporationwww.sphera.com29 Crafts St. Suite 360 Newton, MA 02458 Toll Free: (866) SPHERA-1<strong>Implementing</strong> <strong>PTR</strong> <strong>Records</strong> <strong>In</strong> a <strong>Sphera</strong> <strong>Environment</strong>1. PreviewThe following procedure provides a solution for implementing <strong>PTR</strong> records in a <strong>Sphera</strong>environment. Specifically, the solution is deployed on the DomainDirector server. Theprocedure relies on a 3 rd party script that processes the DNS zone files and updatesthe <strong>PTR</strong> records.2. ArchitectureThe solution relies on an open source PERL script called mkrdns-3_3 that scans thenamed.conf file for domains and creates <strong>PTR</strong> records for each domain in the <strong>PTR</strong> dbfile located in the var/named/ directory.Please note: The script creates only one <strong>PTR</strong> record for each shared IP (for the firstname-based domain in the named.conf file)The script can be retrieved from:http://www.gnu.org/directory/network/misc/mkrdns.htmlDomainDirector contains the following files:• /etc/named.conf - This file contains zone records for allthe accounts domains• /var/named/db. - These files containinformation about a specific domain and its records• /var/named/db. - These files contain <strong>PTR</strong>records for domains that belong to the same IP classFor the following IPs and domains:PrimaryVDS.com 172.16.2.107Domain1.com 172.16.92.1Domain2.com 172.16.92.2Domain3.com 172.16.98.1DomainS1.com172.16.97.94 (Shared IP)DomainS2.com172.16.97.94 (Shared IP)The following db. files should be created:db.172.16.2 (will have <strong>PTR</strong> record for the domain: PrimaryVDS.com)db.172.16.92 (will have <strong>PTR</strong> records for the domains: Domain1.com, Domain2.comdb.172.16.98 (will have <strong>PTR</strong> record for the domain: Domain3.com)db.172.16.97 (will have <strong>PTR</strong> record only for one domain: DomainS1.com orDomainS2.com, because these domains have the same IP)This document is the property of <strong>Sphera</strong> Corporation and is considered to be strictly confidential.


<strong>Sphera</strong> Corporationwww.sphera.com29 Crafts St. Suite 360 Newton, MA 02458 Toll Free: (866) SPHERA-1Before running the procedure the contents of the above files are as follows:<strong>In</strong> /etc/named.conf - list of domain records:options {directory "/dns55/var/named";pid-file "/dns55/etc/named.pid";listen-on { 172.16.1.212; };};controls {inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { "rndc-key"; };};zone "0.0.127.in-addr.arpa" in {type master;file "0.0.127.in-addr.arpa";};zone "." in {type hint;file "db.cache";};zone "1.16.172.in-addr.arpa" in {type master;file "db.172.16.1";};zone "42.16.172.in-addr.arpa" in {type master;file "db.172.16.42";};zone "36.16.172.in-addr.arpa" in {type master;file "db.172.16.36";};zone "coral1.qasphera.com" {type slave;file "db.coral1.qasphera.com" ;masters { 172.16.2.212; };};zone "coral2.qasphera.com" {type slave;file "db.coral2.qasphera.com" ;masters { 172.16.2.212; };};....<strong>In</strong> < DomainDirector base>/var/named/db.172.16.2 (db file)107 IN <strong>PTR</strong> PrimaryVDS.com. (Only one <strong>PTR</strong> record for the Primary VDS)This document is the property of <strong>Sphera</strong> Corporation and is considered to be strictly confidential.


<strong>Sphera</strong> Corporationwww.sphera.com29 Crafts St. Suite 360 Newton, MA 02458 Toll Free: (866) SPHERA-13. How to run the procedure3.1. PrerequisitesSeparate zone records should be defined for every IP class in/etc/named.conf.For example, <strong>In</strong> the case of the IPs specified above, the classes that shouldbe defined are:Zonedb.172.16.2 (Primary VDS)db.172.16.92 (Domain1, Domain2)db.172.16.98 (Domain3)db.172.16.97 (Shared IP – only the first shared IP is registered)Note: you can also define a single class (db.172.16) for the above IPs,but it is not recommended to use large IP classes because the <strong>PTR</strong> file maybe large and hard to manage.3.2. Running the procedure3.2.1. Place the script mkrdns-3_3 in any directory in theDomainDirector server.3.2.2. Run the command:./mkrdns /etc/named.conf3.2.3. mkrdns-3_3 has a problem that causes the domain records in the<strong>PTR</strong> zone files to be terminated with two dots instead of one. <strong>In</strong>order to fix that, the following command should be executed foreach db. file:sed 's/\.\.$/\./' db. > /tmp/db..temp ;cat /tmp/db..temp > db.3.2.4. Restart DomainDirector by running the following commands:/etc/rc.d/rc3.d/Snamed_dm stop/etc/rc.d/rc3.d/Snamed_dm start3.2.5. It is recommended to run step 3.2.2, 3.2.3 and 3.2.4 above in crononce every 24 hrs.3.3. Output resultsThe <strong>PTR</strong> records will be created in the /var/named/db. in the following manner:<strong>In</strong> db.172.16.2 file the following records will be created:107 IN <strong>PTR</strong> PrimaryVDS.com.<strong>In</strong> db.172.16.92 file the following records will be created:1 IN <strong>PTR</strong> domain1.com.2 IN <strong>PTR</strong> domain2.com.<strong>In</strong> db.172.16.98 file the following records will be created:1 IN <strong>PTR</strong> domain3.com.<strong>In</strong> db.172.16.97 file the following records will be created:94 IN <strong>PTR</strong> domainS1.com.This document is the property of <strong>Sphera</strong> Corporation and is considered to be strictly confidential.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!