Linked IPs should only duplicate local IPs in DNS

Version 1.514

Bugfix
Finished

Previously, when linking IPs at: Admin Level -> IP Manager -> click the IP -> link IP the dns portion would just take a fresh copy of the dns_*.conf templates, and add all A and AAAA records from there using the new IP. This was not logically correct for some cases where a custom A record was added, pointing to an external IP. Functionality change in the DNS portion for linked IPs, where only matching A or AAAA records for the local IP, will be duplicated with the linked IP. For example, domain is on 1.2.3.4 with A records: www A 1.2.3.4 ftp A 1.2.3.4 pop A 2.3.4.5 smtp A 2.3.4.5 mail A 2.3.4.5 where 2.3.4.5 might be some external server managing the mail. If you link 1.2.3.5 to the dns for 1.2.3.4, the new zone will now look like: www A 1.2.3.4 www A 1.2.3.5 ftp A 1.2.3.4 ftp A 1.2.3.5 pop A 2.3.4.5 smtp A 2.3.4.5 mail A 2.3.4.5 Previously, the 2.3.4.5 A records would have been duplicated too, causing a round robin to both 1.2.3.5 and 2.3.4.5, which is is not likely the desired effect. This change also applies for AAAA records, in either order (linking IPv4 to IPv6 or IPv6 to IPv4)

Interested to try DirectAdmin? Get a 30-day Free Trial!