Master server with Plesk is running behind NAT. Slave DNS server is running outside of the internal network and has public IP.
Slave DNS server could not update any zones from Master server.
The following error is present in the
/var/log/syslog file on the slave DNS server:
named: transfer of 'domain.tld/IN' from <internal Master DNS ip>#53: failed to connect: host unreachable
Despite all DNS records are correct and pointed to the public IP, in the zones config, master server still has internal IP 10.10.10.10 . When master server sends request to update to the slave server, slave server tries to connect to the master server as per received zone config to the internal IP i.e. 10.10.10.10.
Since IP address 10.10.10.10 is unreachable from the slave's network it is failing with the mentioned error.
iptables rules to ensure all outgoing traffic redirection from internal 10.10.10.10 to public 18.104.22.168
iptables -t nat -A OUTPUT -d 10.10.10.10 -p udp -j DNAT --to-destination 22.214.171.124 iptables -t nat -A OUTPUT -d 10.10.10.10 -p tcp -j DNAT --to-destination 126.96.36.199