How to build slave DNS without DirectAdmin on CentOS 6

Standard

Scenario, i want to use slave DNS from DirectAdmin is master DNS and i have found a topic  talk about solution for it. it name is DirectSlave (Link). This program use api for connect to DirectAdmin’s master DNS.
In this case, i use DirectSlave version 1.3.

Thank you roman_m so much.

Pre-installation
it explain from README file in folder DirectSlave

Download DirectSlave from (Link)

and move to this path:  /usr/local/ 

# yum install named -y

MODULES
=======
POSIX = system features package (bundled in perl distr)
FindBin = to find relative directories (lib etc)
CGI = CGI implementation
Crypt::PasswdMD5 = for password encryption
Digest::MD5 = for stronger password encryption
Config::Auto = to read and parse etc/directslave.conf
MIME::Base64 = authenticating incoming connections
Net::Server = main server & daemon realisation
Net::CIDR = for checking access hosts

**but i use yum to install that modules.

Configuration

# chown -R root:named /usr/local/directslave

(before edit directslave.conf you may be keep original file)

edit file /usr/local/directslave/etc/directslave.conf follow this:

%CODE1%

and prepare file and folder for it.

mkdir -p /etc/named/secondary
touch /etc/namedb/directslave.conf   #not same with before directslave.conf

add this line into /etc/named.conf :
include “/etc/named/secondary/named.conf”

Add auth entry to config, run
# /usr/local/directslave/bin/pass admin yourhardtoreadpassword

Set `background 0` in config for tests and go

and use this command for test.

# /usr/local/directslave/bin/directslave
You must see output like this

2012/06/22-01:18:53 main (type Net::Server::HTTP -> MultiType -> Net::Server::Fork) starting! pid(57841)
Binding to TCP port 2222 on host 212.109.44.44 with IPv4

In /etc/named.conf some line follow this:

%CODE2%

Note

***Set `background 1` and start directslave daemonized

stop directslave process
# kill `cat /usr/local/directslave/run/directslave.pid`

 

REF:
https://forum.directadmin.com/showthread.php?t=43924

Leave a Reply

Your email address will not be published. Required fields are marked *