Bobcares

For every $500 you spend, we will provide you with a $500 credit on your account*

BLACK FRIDAY SPECIAL EXTENSION

*The maximum is $4000 in credits, Offer valid till December 6th, 2024, New Customers Only, Credit will be applied after purchase and expires after six (6) months

For every $500 you spend, we will provide you with a $500 credit on your account*

BLACK FRIDAY SPECIAL EXTENSION

*The maximum is $4000 in credits, Offer valid till December 6th, 2024, New Customers Only, Credit will be applied after purchase and expires after six (6) months

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.