Virtualmin duplicating hostname A records (possible bug)

SYSTEM INFORMATION
OS type and version RL9
Webmin version 2.111
Virtualmin version 7.10.0

In virtualmin > server templates > default > dns domain I have ns1/ns2 nameservers in Additional manually configured nameservers and then in Primary DNS server hostname I have another (the hostname for my machine, eg, servername.mydomain.tld) however when I create a new Virtualmin account, then go to virtualmin > DNS records I noticed that virtualmin has created two identical A - IPv4 Address records for the hostname (servername.mydomain.tld) as well as for the AAAA - IPv6 Address hostname.

Seems like a bug? I have pretty much the same set-up on an identical (recent) virtualmin install (but on RL8) and it only creates one hostname record for ipv4 and ipv4 A records.

Oh that’s weird, when I delete one of them… they both disappear! :scream:

(Edit: creating them manually and I am left with just one of each.)

On the virtualmin 7.20 I believe there might of been some fixes to nameservers and templates.

1 Like

So your creating a virtual server with the same name as the hostname of the server ( you should not do that) or you just created a A record for it, just to be clear.

Never seen a post with 2 * A records and 2 * AAAA records being created, can you create a screenshot showing the issue.

I don’t have IP6 enable so this is what I get created with a new virtual server

1 Like

Actually just checked on another server and it’s the same there.

I am guessing it only does this for the first domain then - the one that is to act as the nameservers for that server (and which includes the hostname for that server such as servername.mymaindomain.tld).

No… the virtualmin account is for mymaindomain.tld - but the hostname for the server is servername.mymaindomain.tld

It’s literally just two identical records which also show when you go to ‘manually edit records’, here’s a snippet:

servername.domain.tld.	IN	A	33.44.55.66
servername.domain.tld.	IN	A	33.44.55.66
...
servername.domain.tld.	IN	AAAA	3a01:5f9:14a:7c4::4
servername.domain.tld.	IN	AAAA	3a01:5f9:14a:7c4::4

So your creating a subserver or top level.

image

1 Like

Top-level server (I pretty much always create top-level servers)

No I can’t replicate that issue, I create another top level called server.example.com and still no two A record being created. Check your template and see if you can see anything in there.

default is no extra records

maybe this setting may create a extra A

image

Nope it creates ns1.example.com A records.

1 Like

It works fine for subsequent accounts, it just appears to happen for the first account which is also happens to be the main nameserver/hostname domain for that server. (The hostname for every server I set up is usually something like someservername.serverdomain.tld - which then acts as the nameserver for all other domains, eg ns1.serverdomain.tld.)

(My server templates are the same as yours Stefan)

Right, I’d have a create a new server and test.

1 Like

Tried on new install, still can’t replicate sorry.

1 Like

Never heard of such a thing. Seems like you must be doing something unusual, but I have no idea what.

Have you customized the DNS in Server Templates?

1 Like

@Jamie, wasn’t that one of the DNS related bugs you had already fixed for the upcoming Virtualmin 7.20, or is it something else?

2 Likes

The issue Jamie worked on is duplicate and/or erroneous IPs added to named.conf. I hadn’t reported any issues with the zone files. I could be wrong but I believe he fixed it. I’ll be able to confirm once the next version of Webmin and Virtualmin 7.20 are released.

1 Like

I don’t think I fixed this one.

@Brook can you attach a screenshot of the DNS server template page?

1 Like

Here ya go Jamie - I usually set it up like the first image, but sometimes do what’s in the second image (the problem persists on both - which to clarify is just on the creation of the first account, works as expected after that):

Some other things that might help:

I set up FQDN/hostname via:

/etc/sysconfig/network
/etc/hosts
/etc/hostname
reboot

Usually giving it a memorable hostname, for example sunshine.mydomain.tld.

mydomain.tld is then set to act as the nameservers for all domains on that server, and I usually configure three nameservers:

sunshine.mydomain.tld
ns1.mydomain.tld
ns2.mydomain.tld

As per my notes, I…

Virtualmin > System Settings > Server Templates > Default Settings

  • DNS domain > Primary DNS server hostname > instead of Automatic choose Hostname and fill in your primary NS record: eg ns1.domain.tld or sunshine.mydomain.tld
  • While there:
    • Address records for new domains > Domain name ✓ www.domain ✓
    • Does SPF record cover all senders? > Yes, and deny other senders/Action for other senders: Dissalow
    • Additional manually configured nameservers > add ns1/ns2.domain.com etc

This is echoed in the initial webmin set-up process, where hostname is set to sunshine.mydomain.tld and additional nameservers are set to ns1.mydomain.tld and ns2.mydomain.tld

I do it this way, is sunshine.mydomain.tld a nameserver?

1 Like

It is yes… it is also the hostname for the server as set in:

/etc/sysconfig/network
/etc/hosts
/etc/hostname

I think part of the reason I settled on the way I do it is because virtualmin asks for the ‘hostname’ (both on that screen and the virtualmin post-install walkthrough) and I’ve always thought the hostname is the FQDN.

Hostname is the servers hostname, I don’t associate it with the virtual servers.
Nameservers should match what your using at your registrar as well. As long as it matches that fine.

Nameservers I use the stantard ns1.domain.com and ns2.domain.com and that why I have used that in the template.

1 Like

I wonder if the naming should be different on those virtualmin pages then? I think I settled on this way because I thought virtualmin wanted the server hostname specified there.

(But yes, I have all three set as nameservers at the registrar)