Agent
Step by Step Installation
Agent CentOS / CloudLinux installation instructions
Adding the repository
CentOS 6
wget http://repo.nixpal.com/el6/nixpal-el6-1.2-2.el6.x86_64.rpm
yum localinstall nixpal-el6-1.2-2.el6.x86_64.rpm
CentOS 7
wget http://repo.nixpal.com/el7/nixpal-el7-1.1-1.el7.x86_64.rpm
yum localinstall nixpal-el7-1.1-1.el7.x86_64.rpm
CentOS 8
wget http://repo.nixpal.com/el8/nixpal-el8-1.1-1.el8.x86_64.rpm
yum localinstall nixpal-el8-1.1-1.el8.x86_64.rpm
Installing zcloudagent
yum clean all
yum install zcloudagent
Debian and Ubuntu Installation
Adding the repository
Import the GPG key, get the nixpal.list file and update the repositories:
wget -O /tmp/nixpal.key -q https://repo.nixpal.com/debian/KEY.gpg ; apt-key add /tmp/nixpal.key
wget -O /etc/apt/sources.list.d/nixpal.list https://repo.nixpal.com/debian/nixpal.list
apt update
Installing zcloudagent
apt install zcloudagent
FreeBSD Installation
FreeBSD comes in a single .tar.gz package.
Also Because of its nature we need curl and gcc.
pkg install curl
pkg install gcc
wget http://repo.nixpal.com/freebsd/zcloudagent-FreeBSD.tar.gz
tar -zxvf zcloudagent-FreeBSD.tar.gz
cd zcloudagent
You will see a install.FreeBSD.sh script. You can run it or inspect it first.
zcloudagent binary goes to /usr/local/bin, zcloudagent.conf goes to /usr/local/etc/ and service file goes to /usr/local/etc/rc.d/ .
Don’t forget to enable the service to /etc/rc.conf and make changes to conf file. After editing /usr/local/etc/zcloudagent.conf you can enable and start service:
service zcloudagent start
Configuring and starting zonecloud
Add the
- SERVER_HOSTNAME: your controller’s hostname
- LICENSE: Obtained from us
- TOKEN: Obtained from the controller
fields in /etc/zcloudagent.conf
.
ZONES_FILE=/etc/named.conf
TOKEN=Token_From_zCloud_Server
SERVER_HOSTNAME=controller.yourdomain.com
UPDATE_INTERVAL=60
LOG_LEVEL=1
LICENSE=ZCAgent-xxxxxxxxxxx
If the server is Debian/Ubuntu the only different is the location of named.conf. It should be ZONES_FILE=/etc/bind/named.conf
Enabling / Starting Zonecloud Agent
CentOS 6
chkconfig zcloudagent on
service zcloudagent start
Centos 7/8 and Debian / Ubuntu
systemctl enable zcloudagent --now
Check service if started with “status”
Centos 6: service zcloudagent status
CentOS 7 / 8: systemctl status zcloudagent
Also, check Controller web interface if the agent is sending zone information.
Configuring named.conf
We now need to tell our Bind which our nodes are.
We create a ACL with our nodes IPs:
acl "nodes" {
1.1.1.1; // ns1.domain.com
2.2.2.2; // ns2.domain.com
3.3.3.3; // ns3.domain.com
4.4.4.4; // ns4.domain.com
};
And then we add in options:
notify yes;
//allow-query {"nodes";}; /* Ucomment this line when the propagation is complete. Also, comment the next one! */
allow-query {any;};
allow-transfer {"nodes";};
allow-notify {"nodes";};
notify-to-soa yes;
also-notify {1.1.1.1; 2.2.2.2; 3.3.3.3; 4.4.4.4; };
Let’s have a look of an Agent’s Cloudlinux 7 named.conf final form:
include "/etc/rndc.key";
/* First of all we declare ACL with our Nodes (Our own DNS Servers) IPs */
/* Let's name this acl "nodes" */
acl "nodes" {
1.1.1.1; // ns1.mycompany.com
2.2.2.2; // ns2.mycompany.com
3.3.3.3; // ns3.mycompany.com
4.4.4.4; // ns4.mycompany.com
};
/* Then we leave the default -or edit as you need options (stats, versions, hostname, pid-file, directory */
/* The only change we need is recursion to be NO */
controls {
inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
};
options {
recursion no;
directory "/var/named"; // the default
pid-file "/var/run/named/named.pid";
dump-file "data/cache_dump.db";
statistics-file "data/named_stats.txt";
version "";
hostname "";
notify yes;
//allow-query {"nodes";}; /* Ucomment this line when the propagation is complete. Also, comment the next one! */
allow-query {any;};
allow-transfer {"nodes";};
allow-notify {"nodes";};
notify-to-soa yes;
also-notify {1.1.1.1; 2.2.2.2; 3.3.3.3; 4.4.4.4; };
};
/* That's it. We don't need something else from named.conf. Everything else stays as is */
logging {
channel default_log {
file "/var/log/named/named.log" versions 5 size 128M;
print-time yes;
print-severity yes;
print-category yes;
severity warning;
};
category default { default_log; };
category general { default_log; };
};
zone "my-zone-example.com" {
type master;
file "/var/named/my-zone-example.com.db";
};
....
....
....