Symptoms
-
After changing the Public IP address to a new one at Plesk > Tools & Settings > IP Addresses, the Slave DNS Manager extension does not update the current DNS zones on the slave DNS server(s) with the new IP:
# nslookup example.com 203.0.113.4
Server: 203.0.113.4
Address: 203.0.113.4#53
Name: example.com
Address: 203.0.113.2Note: In the above example, 203.0.113.4 is the slave DNS server; the new Public IP address changed at Plesk (Master) is 203.0.113.3, which is assigned to example.com. However, when checking the domain zone against the slave DNS server, example.com still resolves to the old IP, which is 203.0.113.2.
-
The zone file on the slave DNS server still shows the old IP address as the master:
# named-nzd2nzf /var/cache/bind/_default.nzd
...
zone "example.com" { type slave; file "bot.example.com"; masters { 203.0.113.2; }; }; -
Both Plesk and the Slave DNS server run on the same external sub-network that runs behind a NAT, at Google Cloud. The servers are synced via Slave DNS Manager using their internal IP addresses.
Cause
Bug in the Slave DNS Manager extension with ID EXTPLESK-929, which will be fixed in future product updates.
Resolution
As a workaround, remove the DNS zone files on the slave DNS server and manually disable and re-enable the DNS for the domains at Plesk to recreate the zone files with the new public IP address.
CentOS/RHEL
-
Connect to the Plesk (Master) server via SSH
-
Run the following command to show a list of all domains and copy its output:
# plesk bin domain --list > /pleskdomains.txt
example.com
example.net -
Connect to the Slave DNS server on another SSH session
-
Replace the old IP (203.0.113.2) with the new one (203.0.113.3) at
/var/named/3bf305731dd26307.nzf
:# sed -i -e 's/'203.0.113.2'/'203.0.113.3'/g' /var/named/3bf305731dd26307.nzf
-
Take the output copied from step #2 and paste into it:
# cat /pleskdomains.txt
example.com
example.net -
Run the following commands to remove the zone files of Plesk domains from the slave DNS server:
# for i in $(cat /pleskdomains.txt); do rm -f /var/named/$i ; done
-
Restart DNS service on slave DNS server:
# systemctl restart named
Note: Repeat steps 3-7 on each of connected slave DNS servers.
-
Return to SSH console of Plesk (Master)
-
Turn on/off DNS service for each domain:
# for i in $(cat /pleskdomains.txt); do plesk bin dns --off $i; plesk bin dns --on $i; done
Debian/Ubuntu
-
Connect to the Slave DNS server via SSH.
-
Delete information about zone example.com:
# rndc delzone -clean example.com
-
Check that the information about zone was removed. The command should return empty output:
# named-nzd2nzf /var/cache/bind/_default.nzd | grep example.com
-
Log in to Plesk and sync DNS zones under Extensions > My Extensions > Slave DNS Manager > Resync.