EL 6 #
1 2 | 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 |
EL 7 #
1 2 | 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 |
EL 8 #
1 2 | 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 #
1 2 | 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:
1 2 3 | 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 #
1 | apt install zcloudagent |
FreeBSD Installation #
FreeBSD comes in a single .tar.gz package.
1 2 3 4 5 | 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:
1 | 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 .
1 2 3 4 5 6 | 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
EL6 #
1 2 | chkconfig zcloudagent on service zcloudagent start |
EL 7/8/9 and Debian / Ubuntu #
1 | systemctl enable zcloudagent --now |
Check if the services is started…
Centos 6: service zcloudagent status
EL : systemctl status zcloudagent
Also, check Controller web interface if the agent is sending zone information.
Configuring named.conf #
A copy/paste-configuration for named.conf is available in your controller under the Servers page.
We now need to tell our Bind which our nodes are.
We create a ACL with our nodes IPs:
1 2 3 4 5 6 | 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:
1 2 3 4 5 6 7 | 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: #
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | 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"; }; .... .... .... |