Bobcares

Virtualmin Common DNS Errors – How we troubleshoot

by | Jan 7, 2021

Virtualmin Common DNS Errors occur if it doesn’t have correct glue records at the registrar.

As part of our Server Management Services, we assist our customers with several Virtualmin queries.

Today, let us discuss the virtual hosting system and the common DNS errors.

 

Troubleshoot Virtualmin Common DNS Errors

For DNS to work, it must have correct glue records at the registrar, as well as correct records on the Virtualmin system.

Similarly, the slaves must also have correct records. Otherwise, we will experience intermittent resolution failures.

  • Glue Records

To check glue records we can use the whois command:

whois example.com

Look for the “domain servers” or “name servers” section of the output. The results will resolve to the DNS servers.

We must configure Glue records at the name service registrar. Virtualmin and Webmin have no control over records at the registrar. Hence, problems must resolve with whatever interface the registrar provides.

  • NS Records

The NS records on the Virtualmin server should match those found in the glue records. Failure of which will cause intermittent problems.

We can use the host command to find the NS records for a given zone:

host -t NS example.com
  • A Records

Address records, or A records, are the basic building block of DNS zones. They map names to IP addresses.

To check an A record, we use the host command:

host example.com

We can also specify the name server used to resolve queries. We need to add the name or IP of the server to the end of the command:

host example.com ns1.example.com

Or, if we are not sure about the nameserver IP address resolving correctly, we can use an IP:

host example.com ip
  • MX Records

Mail exchanger records, or MX records, provide mail servers the information they need to know to deliver mail for a particular domain.

We can check an MX record with the host command:

host -t MX example.com

[Couldn’t set up the records? We’d be happy to assist]

 

  • Virtualmin error: 127.0.0.1 isn’t listed in /etc/resolv.conf

This is typical because the IP address assigns by DHCP. While obtaining an IP address, the DNS servers by our DHCP server are used in place of what is currently set up on the server.

We suggest using static IP’s. It will prevent DNS servers from being overwritten. It will also remove the chance of the server obtaining the wrong IP address.

However, to continue using DHCP, we need to configure the system to not use the DHCP server’s DNS settings.

To solve that, log into the server as root, and create/edit the file /etc/dhclient.conf.

Then we add this line to that file:

prepend domain-name-servers 127.0.0.1;

The next time we obtain the IP address via DHCP, it should use the local server rather than what the DHCP server provides.

If we are certain that the server does not obtain its IP address via DHCP – the issue can occur when using a VPS. Where the VPS provider automatically overwrites the /etc/resolv.conf file at each reboot.

If that is the case, to get around this error, go to System Settings -> Virtualmin Configuration -> Advanced Settings, set ‘Check resolv.conf for this system’ to ‘No’.

This is a non-ideal setting and will cause DNS lookups on the server to be slower.

Unfortunately, some providers do not give another option – and in that case, this setting should work.

If the provider is overwriting /etc/resolv.conf on each bootup, another option is to make that file immutable. It prevents even root from changing it.

To do that we can run ‘chattr +i /etc/resolv.conf’. Or we can add the following to the end of /etc/rc.local file:

echo nameserver 127.0.0.1 >> /etc/resolv.conf
  • How to setup nameservers for a server?

In order to use the Virtualmin server as a DNS server, it needs to be setup. So that names like ns1.example.com and ns2.example.com can be input as a domain’s nameservers.

First, we have to go to the domain name registrar for example.com and register the server as a nameserver. It is usually as simple as inputting two or more names, and the IP addresses associated with them.

After registering the nameservers at the domain name registrar we have to log into Virtualmin.

Select the “example.com” domain, click Server Configuration -> DNS Records, and create a new “A – IPv4 Address” record for ns1.example.com and ns2.example.com.

Lastly, we have to tell Virtualmin to use the nameservers when it generates NS records for new Virtual Servers.

To do that, go to System Settings -> Server Templates -> Default Settings -> BIND DNS Domain, and set ‘Master DNS server hostname’ as well as ‘Additional manually configured nameservers’.

Failed to setup nameservers? We are available 24*7]

 

Conclusion

In short, Virtualmin Common DNS Errors trigger when glue records at the registrar are not correct. It should have correct records on the Virtualmin system. Today, we saw how our Support Techs go about this issue.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF