Skip to content

virtualmin check-config Incorrectly Reports Primary DNS Server Does Not Resolve IP Address #1030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
MSSEsq opened this issue Mar 19, 2025 · 14 comments

Comments

@MSSEsq
Copy link

MSSEsq commented Mar 19, 2025

System Information:
Webmin version 2.303

Virtualmin version 7.30.7

FreeBSD 14.2-RELEASE-p2 on amd64

Running “virtualmin check-config” in a Unix command shell or opening the “Re-Check Configuration” Virtualmin page incorrectly reports:

BIND DNS server is installed, however, the default primary DNS server ns1.mail.ourdomain.tld does not resolve to an IP address

Running nslookup ns1.mail.ourdomain.tld from the Webmin Terminal Module (using the actual URL) returns the correct IPv4 and IPv6 addresses of our primary DNS server.

@jcameron
Copy link
Collaborator

What output do you get if you run host ns1.mail.ourdomain.tld from the CLI?

@MSSEsq
Copy link
Author

MSSEsq commented Mar 19, 2025

What output do you get if you run host ns1.mail.ourdomain.tld from the CLI?

The host command returns the correct IPv4 and IPv6 addresses of our primary DNS server the same as the nslookup command does.

webmin pushed a commit that referenced this issue Mar 19, 2025
@jcameron
Copy link
Collaborator

Ok I see the real issue now - the error message in Virtualmin is wrong! What it should really say is that the IP that ns1.mail.ourdomain.tld resolves to isn't one of the IPs active on your system.

Is that correct?

@MSSEsq
Copy link
Author

MSSEsq commented Mar 19, 2025

The answer to you question depends upon what you mean by “the IP that ns1.mail.ourdomain.tld resolves to isn't one of the IPs active on your system.“ Bind should be storing the resolved IP addresses of our three authoritative DNS servers locally for the Time To Live (TTL). Our primary DNS server runs on a remote Mail-in-a-Box instance, and our secondary and tertiary DNS servers functioning as slaves to that primary run as NSD on the local system. Bind supports Postfix by providing local IP address resolution for all mail relay servers. I can find no reason why check-config is reporting that the URL of our primary DNS server does not resolve to an IP address. The IP address that our primary DNS server resolves to is not local, but that is not a problem.

@jcameron
Copy link
Collaborator

So are you planning to host DNS zones on your Virtualmin system, or will they be entirely remote and managed manually?

@MSSEsq
Copy link
Author

MSSEsq commented Mar 19, 2025

So are you planning to host DNS zones on your Virtualmin system, or will they be entirely remote and managed manually?

Yes, DNS zones are hosted on the Virtualmin system, but only as slave zones automatically managed by secure communications between NSD running on our Mail-in-a-Box server, which is primary, and NSD running on the Virtualmin system, which is secondary and tertiary. Bind only runs as a recursive DNS server in support of Postfix. Only NSD responds to DNS requests authoritatively for the hosted domains.

@MSSEsq
Copy link
Author

MSSEsq commented Mar 19, 2025

As an aside, a new Webmin Module for managing NSD would be a nice enhancement, if someone is looking for a new development project.

@jcameron
Copy link
Collaborator

So if you're not running BIND on the Virtualmin system, the best option would be to disable it at on the Features and Plugins page.

@MSSEsq
Copy link
Author

MSSEsq commented Mar 20, 2025

BIND is running on the Virtualmin system. Bind runs as a recursive DNS server only. This supports Postfix. BIND is not authoritative for any domain. The authoritative DNS server on the Virtualmin system is NSD. That enables NSD master to NSD slave communication to reliably keep the NSD zone files on the Virtualmin system synchronized with the primary DNS server running on our Mail-in-a-Box server.

@jcameron
Copy link
Collaborator

Right, BIND is running but your not hosting primary DNS zones locally. Hence for your setup, I think it would be simpler to turn off DNS on the Features and Plugins page.

@MSSEsq
Copy link
Author

MSSEsq commented Mar 20, 2025

I can ignore the message, but it does seem to be reporting a configuration problem. I suggest changing the message to:

BIND DNS server is installed. The default primary DNS server ns1.mail.ourdomain.tld does not resolve to an IP address of a network interface on this system.

This revised message would be less confusing and more informative.

@jcameron
Copy link
Collaborator

Well I think it would be a real error if you were hosting master zones locally on BIND, as it would indicate that the hostname in the NS record doesn't resolve to your machine, and this DNS lookups would fail.

@MSSEsq
Copy link
Author

MSSEsq commented Mar 21, 2025

Well I think it would be a real error if you were hosting master zones locally on BIND, as it would indicate that the hostname in the NS record doesn't resolve to your machine, and this DNS lookups would fail.

Yes, that was what I intended the language that I suggested to convey, presuming that the URL should resolve to a local IP address. If I have understood your earlier comments well, then the message appears when the default primary DNS server URL does not resolve to an IP address of a local network interface. The original message reports that the URL does not resolve to an IP address, which was factually incorrect in our circumstance. It would be reasonable and appropriate to extend the message to provide more information when the primary DNS server URL does not resolve to an IP address of a local network interface:

BIND DNS server is installed. The default primary DNS server ns1.mail.ourdomain.tld does not resolve to an IP address of a network interface on this system. If the BIND DNS server will be used as a primary authoritative DNS server for Internet domains hosted by this system, then the addresses of the of the Registered Name Servers should be updated to the correct URLs and IP addresses in the records maintained by the Internet Domain Registrar.

Users who manage DNS servers should be able to understand this message, and should know whether or not the local system is intended to host a registered or authoritative name server.

webmin pushed a commit that referenced this issue Mar 21, 2025
@jcameron
Copy link
Collaborator

OK I will change the error message to be clearer that it's expecting the IP to be one of the interfaces on your system, but I won't make it too wordy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants