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 |
Configuring and starting zonecloud – /etc/zcloudagent.conf #
Add the
- SERVER_HOSTNAME: your controller’s hostname
- LICENSE: Obtained from us
- TOKEN: Obtained from the controller
- DNS_SERVER_TYPE=PDNS
- PDNSUTIL_BINARY_PATH=/usr/bin/pdnsutil
fields in /etc/zcloudagent.conf
.
1 2 3 4 5 6 7 8 9 | 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 your server uses PowerDNS uncomment the following 2 lines DNS_SERVER_TYPE=PDNS PDNSUTIL_BINARY_PATH=/usr/bin/pdnsutil |
Enabling and Staring agent:
Check service if started with “status”
systemctl status zcloudagent
Also, check Controller web interface if the agent is sending zone information.
Configuring named.conf and pdns.conf #
- There is now automated way to copy/paste/configure named.conf and pdns.conf from inside the Controller.
And just copy/paste the appropriate configuration
We now need to tell our PowerDNS BUT ALSO Bind because PowerDNS reads the “options” directives in named.conf. So we need to edit BOTH conf files (named.conf and pdns.conf)
Let’s assume our nodes DNS Servers IP’s are: 1.1.1.1 , 2.2.2.2, 3.3.3.3 and 4.4.4.4 for this example.
In named.conf we need:
1 2 3 4 5 6 | notify yes; notify-to-soa yes; allow-query {any;}; allow-transfer {1.1.1.1; 2.2.2.2; 3.3.3.3; 4.4.4.4; }; allow-notify {1.1.1.1; 2.2.2.2; 3.3.3.3; 4.4.4.4; }; 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 | include "/etc/rndc.key"; controls { inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; }; }; options { recursion no; directory "/var/named"; pid-file "/var/run/named/named.pid"; dump-file "data/cache_dump.db"; statistics-file "data/named_stats.txt"; version ""; hostname ""; notify yes; notify-to-soa yes; allow-query {any;}; allow-transfer {1.1.1.1; 2.2.2.2; 3.3.3.3; 4.4.4.4; }; allow-notify {1.1.1.1; 2.2.2.2; 3.3.3.3; 4.4.4.4; }; 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"; }; .... .... .... |
In pdns.conf we need:
1 2 3 4 5 6 | disable-axfr=no allow-axfr-ips=127.0.0.0/8, 1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4 allow-notify-from=0.0.0.0/0,::/0, 1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4 also-notify=1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4 allow-unsigned-notify=yes forward-notify=1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4 |
Restart pdns and check Nodes.