Setting up DNS nameserver does not work

SYSTEM INFORMATION
OS type and version Debian 10
Virtualmin version 6.17-3.

Hello everybody,

I’m completely new to Virtualmin. In the pas I’ve hosted several website at home, but in recent years I’ve had my websites hosted at an external company. Now, I’d like to move everything to my own server.

I got most things working, but I still find myself struggling with the DNS name server. Originally, I tried to have my main domain be a website and a name server. It was not really possible to get this done, because I couldn’t get my registar to create the glue records.

Right now my situation is like this:

  • alternative domain has two records: ns1.altdomain.nl and ns2.altdomain.nl, both point to the same public ip
  • port 53 is forwarded (TCP and UDP) to the server
  • the hostname (and main virtual server) of there server is altdomain.nl and has two dns a records (ns1 and ns2) pointing to the global domain, furthermore, there are two ns records pointing to ns1.altdomain.nl and ns2.altdomain.nl
  • virtual server template is modified to include both name servers with any new virtual server
  • there is a second virtual server with my primary domain as hostname
  • my primary domain is set at the registar to point at nameservers ns1.altdomain.nl and ns2.altdomain.nl

With above steps, my primary domain does not work. The DNS records in virtualmin appear to be correct, but nothing is propagated. What am I doing wrong?

If any additional info is needed, please let me know.

Ps: I love the Virtualmin software!

@rikben,

I offer paid support for an affordable rate, and can get all your DNS issues resolved via a screen sharing session (so you can see how it was done). My policy is simple, no solution no cost. All work is “post-paid” so you get what you require before making payment.

I don’t understand what this means or what you were trying to do.

It sounds like you still don’t have glue records, which is the one piece of the puzzle that Virtualmin cannot solve for you (your registrar manages those, presumably providing you a GUI for setting them).

Springing glue records into existence for a domain that does not yet have working name resolution can be difficult or impossible with some registrars. If they don’t let you enter IP addresses in addition to the names of the name servers, you’ll need to host your domain first on a DNS server that already has working glue records, and then once your registrar has looked up ns1.yourdomain.tld and ns2.yourdomain.tld and knows their IPs, you can change the glue records to point to your new name servers.

Hi Joe, thanks for your quick reply. I gave up on making glue records for my primary domain. Instead, I am now using another domain as top domain, which at the registar has two dns A records that point to the server ip. This domain does not need to host a website. This domain is set as hostname on the server and has a virtual server that has the name server records corresponding with those on set at the registar.

My “primary” domain, which I would like to show a website, is a second virtual server. At the registar I’ve set the nameserver to the top domain mentioned above.
The DNS records in Virtualmin are set as such that:

  • the start of domain is ns1.topdomain.nl, root.ns1.topdomain.nl, …
  • there are two name server records for ns1.topdomain.nl and ns2.tomdomain.nl

To summarise my goal: I have a top domain that I want to function as name server for other domains that will be hosted on the server. The top domain currently has DNS configured at the registar. The domain that has to show a website, is pointed to the server, I would like virtualmin to be able to control the DNS records.

Previously, I tried to have the topdomain be hostname, nameserver and web server.

The hostname should be a subdomain like server.altdomain.tld

Then in Virtualmin, you can create a virtual server for altdomain.tld and host a website on it.

Thanks for your reply. I had that in my original setup. However, this shouldn’t affect the name server I suppose?

The essential thing is to have a subdomain as hostname, so it can be something like server.topdomain.tld in keeping with your latest example.

No, the hostname is distinct from your name servers and the choice of hostname will not effect your name servers, when you specify these in Virtualmin Post Install Wizard.

Allright, but that supposedly still doesn’t explain why my DNS name server doesn’t work for my other domain name?

No. The subdomain server hostname recommendation is to keep mail simple.

Name servers are wholly independent of your web, mail, server hostname, and everything else. I’m seeing a bunch of conversation about wholly irrelevant details here, which maybe indicates some fuzzy understanding. I’m having a hard time following what the problem is.

Forget about your websites, subdomains, and everything else.

Do your glue records work? Are you sure?

When you do whois domain.tld for the domain that is having problems, what are the name servers returned? Are they right? OK, now when you lookup the IP of those name servers, does that work?

Hi Joe, once again thank you for your reply.

My topdomain has DNS (external) records:
ns1.topdomain.nl → server ip (identical)
ns2.topdomain.nl → server ip (identical)
These records resolve and point to my server.
In virtualmin the virtual server as records for these name servers.

Then I made a second virtual server, let’s say domain.nl. At the registar name servers are set to ns1.topdomain.nl and ns2.topdomain.nl. In virtualmin the dns records show that the domain starts at ns1.topdomain.nl and ns2.topdomain.nl. All these settings are default.
domain.nl however, does not resolve.

I’m not confident you’ve answered my question.

When you do whois topdomain.nl what are the name servers listed? Is it what you expect?

If this is actually your domain, here’s what I see:

$ whois topdomain.nl
...
Domain nameservers:
   ns2.undeveloped.nl
   ns1.undeveloped.nl

And, when I ask for those name server IPs, I get:

$ host ns2.undeveloped.nl
ns2.undeveloped.nl has address 52.209.184.250
$ host ns1.undeveloped.nl
ns1.undeveloped.nl has address 52.29.254.64

And, when I ask those name servers for your domain, I get:

$ host topdomain.nl ns1.undeveloped.nl
Using domain server:
Name: ns1.undeveloped.nl
Address: 52.29.254.64#53
Aliases: 

topdomain.nl has address 3.64.163.50

Is all of that what you expect?

And, if this is not actually your domain, please use example.tld or some other non-existent name (in particular .tld is a non-existent .tld, so it makes it useful for example domains).

Edit: Or just give us your actual domain. I don’t know why that’d be a secret or sensitive information.

Hi Joe,

I’m sorry I’ve not made it clear. The domains mentioned were meant as an example.
The real domains are hostedbyrikben.nl (has the registar as name server) and rikben.nl (has hostedbyrikben.nl as name server).

Edit: the main virtual server on my domain is set to hostedbyrikben.nl. The dns records of this domain are:

$ttl 3600
@	IN	SOA	ns1.hostedbyrikben.nl. root.ns1.hostedbyrikben.nl. (
			1646737835
			3600
			600
			1209600
			3600 )
@	IN	NS	ns1.hostedbyrikben.nl.
@	IN	NS	ns2.hostedbyrikben.nl.
hostedbyrikben.nl.	IN	A	83.128.205.128
www.hostedbyrikben.nl.	IN	A	83.128.205.128
ftp.hostedbyrikben.nl.	IN	A	83.128.205.128
m.hostedbyrikben.nl.	IN	A	83.128.205.128
ns1.hostedbyrikben.nl.	IN	A	83.128.205.128
ns2.hostedbyrikben.nl.	IN	A	83.128.205.128
localhost.hostedbyrikben.nl.	IN	A	127.0.0.1
webmail.hostedbyrikben.nl.	IN	A	83.128.205.128
admin.hostedbyrikben.nl.	IN	A	83.128.205.128
mail.hostedbyrikben.nl.	IN	A	83.128.205.128
hostedbyrikben.nl.	IN	MX	5 mail.hostedbyrikben.nl.
hostedbyrikben.nl.	IN	TXT	"v=spf1 a mx a:hostedbyrikben.nl ip4:10.0.1.195 ip4:83.128.205.128 ip6:fd2a:ef3b:4c5f:4599:6ab5:99ff:fe75:ece4 ?all"

Then the records in rikben.nl are:

$ttl 3600
@	IN	SOA	ns1.hostedbyrikben.nl. root.ns1.hostedbyrikben.nl. (
			1646737989
			3600
			600
			1209600
			3600 )
@	IN	NS	ns1.hostedbyrikben.nl.
@	IN	NS	ns2.hostedbyrikben.nl.
rikben.nl.	IN	A	83.128.205.128
www.rikben.nl.	IN	A	83.128.205.128
ftp.rikben.nl.	IN	A	83.128.205.128
m.rikben.nl.	IN	A	83.128.205.128
localhost.rikben.nl.	IN	A	127.0.0.1
webmail.rikben.nl.	IN	A	83.128.205.128
admin.rikben.nl.	IN	A	83.128.205.128
mail.rikben.nl.	IN	A	83.128.205.128
rikben.nl.	IN	MX	5 mail.rikben.nl.
rikben.nl.	IN	TXT	"v=spf1 a mx a:rikben.nl ip4:10.0.1.195 ip4:83.128.205.128 ip6:fd2a:ef3b:4c5f:4599:6ab5:99ff:fe75:ece4 ?all"

I don’t care what the records are. The records are meaningless if the glue records and the name servers those glue records are pointing to are wrong. I’ve given examples of how to check those things above using the whois and host commands. (But, when I visit your domain, I see a Virtualmin landing page, which seems to indicate your DNS is working.)

Then again, according to whois, your name servers are:

   nszero1.axc.nl
   nszero2.axc.nl

Yes, that’s correct. As I mentioned before, the DNS of hostedbyrikben.nl is managed by the registar. It has the records for ns1 and ns2, that are pointing to my ip.

rikben.nl does not have the DNS managed by the registar, the nameservers of hostedbyrikben.nl are entered and point to my server.

$ whois rikben.nl
Domain nameservers:
   ns1.hostedbyrikben.nl          
   ns2.hostedbyrikben.nl  

Asking for either the domain of ns1 or ns2:

$ host ns1.hostedbyrikben.nl
ns1.hostedbyrikben.nl has address 83.128.205.128

And finally asking for the name servers:

$ host rikben.nl ns1.hostedbyrikben.nl
rikben.nl has address 83.128.205.128
rikben.nl mail is handled by 10 ALT4.ASPMX.L.GOOGLE.COM.
rikben.nl mail is handled by 5 ALT1.ASPMX.L.GOOGLE.COM.
rikben.nl mail is handled by 10 ALT3.ASPMX.L.GOOGLE.COM.
rikben.nl mail is handled by 5 ALT2.ASPMX.L.GOOGLE.COM.
rikben.nl mail is handled by 1 ASPMX.L.GOOGLE.COM.

So as it turns out I was wrong, DNS is now working correctly. The server manages DNS for the rikben.nl domain. It probably took longer to propagate somehow. One issue remains though, a website is still not shown.

Make a new topic!

Thanks for your time @Joe!

I do think I still have DNS issues, but hopefully they will be fixed by allowing more time to pass.

As stated above, when I check the DNS from my terminal it seems to work. But when I use dnschecker.org and look for ns records, it only resolves at four different locations. When I look for A or MX records, none are resolved.

Do you think this is simply a matter of more time to get these propagated?

Edit: the records are still not resolving. I’ve switched rikben.nl back to the registar name servers to get my email to function again. I’ve created a new virtual server: gtspelsite.nl and pointed the name servers to ns1.hostedbyrikben.nl and ns2.hostedbyrikben.nl.
I’ll wait a couple hours and see if records propagate.

If when you check at your terminal all of those records (A/MX) works, then yes, propagation is the problem. If you’re testing what you should be testing to confirm they are all working, that is.

But, if you don’t get A records and MX records when testing at the command line, either, then something is still wrong.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.