Virtualmin changes DNS records it doesn't 'own' when moving hosts

I have quite a few clients that use me primarily for hosting dns, where the sites and/or mail, etc is hosted elsewhere. Everytime I have moved servers, some of their DNS records get changed. Using Virtualmin Pro, Cloudmin Physical, via cloudmin->virtualmin domains->move.

For instance, if I move domain1.com from hostA to hostB, and they have an A record pointing to another host at 1.1.1.1, after the move, the A record will reflect hostB's configured IP, and I end up manually changing it.

Is there a way to move virtualhosts between servers without virtualmin interpreting DNS records that were never pointed to my hosts?

Status: 
Closed (fixed)

Comments

Virtualmin shouldn't update records for IP addresses other than ones that were using the old IP.

In your case was 1.1.1.1 the IP of the old system, new system, or neither?

In one case, an A record was pointed to 1.1.1.1,virtualmin hostA was 2.2.2.2, and when I moved it to virtualmin hostB at 3.3.3.3, it changed the A record to 3.3.3.3. I'd be happy to test again with any debugging enabled or supply a login to my hosts to see if I just have something wacky, but I've had it happen every singlebtime I've moved virtual servers around...

I had a closer look at Virtualmin's logic here, and it will only change the IP of records that originally had the same IP as the domain. So if you had the records :

@  IN  A 2.2.2.2
www IN A 2.2.2.2
foo IN A 1.1.1.1

and then moved to a system with IP 3.3.3.3, the resulting records would be :

@  IN  A 3.3.3.3
www IN A 3.3.3.3
foo IN A 1.1.1.1

So the foo record which points to some remote system wouldn't be touched.

In your case, what was the name of the A record that was changed?

Sorry for the lack of response!

Yes, that was the case, the A record for the domain, as well as www(if it existed). But it wasn't just domains that were 'hosted'. On vminA with IP 1.1.1.1, if the host domain A record was pointed to 2.2.2.2, and I moved it to vminB with IP 3.3.3.3, it would change the domain A record to 3.3.3.3.

I just reproduced this on a host. I changed the domain A record to 8.8.8.8, then moved it from vminA to vminB. It change the domain A record to it's IP, but left the www record as set to the old host (even more odd).

In these cases, what does Virtualmin think the domain's primary IP address is? You can see this at Server Configuration -> Change IP Address , and also in Edit Virtual Server -> Configurable Options -> External IP address.

In the test that I did, after the fact, Change IP address shows the correct shared IP (10.1.1.194) and External IP is correct, and is what it changed the domain A record to.

just to say it again: vminA: 1.1.1.1 vminB: 2.2.2.2 on domain.com, which was on vminA at 1.1.1.1: I changed the domain A record to 8.8.8.8 I moved it from vminA to vminB the domain A record was changed to 2.2.2.2 (by vmin) the www A record was left at 1.1.1.1

Ok, I see the issue now .. when restoring, Virtualmin assumes that the A record for the domain was the domain's old IP address, and updates any records with that IP to the new IP.

I will fix this in the 3.89 Virtualmin release.

Automatically closed -- issue fixed for 2 weeks with no activity.