dnsweb-hostingnameserversispconfig

Best Practice DNS Configuration for Single Server Hosting Multiple Domains


Note: IP addresses and domain names have been changed to equivalents so as not to attract attacks!

Background

I'm setting up a standalone VPS on which I'll host half a dozen or so domains catering both email and web hosting. I may add additional VPSs later but don't want to register a new FQDN for each new server. I plan to have single domain name with a subdomain created for each server. For example s1.myserverdomain.com and s2.myserverdomain.com. These FQDNs will be used to provide resolvable names for common services like mail.s1.myserverdomain.com.

The first VPS will have two IP addresses, so that I can use it for providing nameserver services as ns1.s1.myserverdomain.com and ns2.s1.myserverdomain.com. Later, when I add another server, I'll split them up.

(You might tell me that this is bad practice to run both nameservers on the same machine, because in the event that one goes down, so will the other, but considering that in that instance, so too will the mail and web hosting, there doesn't seem much point paying for another server just yet.)

What I want to finish up with is with godaddy handling the DNS for myserverdomain.com and creation of nameservers for ns1.s1..., ns2.s1... on my VPS and later will transfer ns2.s1 to ns2.s2. I will set the nameservers for each of the half dozen hosted domains to use those nameservers.

My Configuration

So far I have created the following DNS records at Godaddy for myserverdomain.com in addition to the default records created automatically by Godaddy:

TYPE    NAME    VALUE
A       s1      100.1.1.1
A       ns1.s1  100.1.1.1
A       ns2.s1  100.1.1.2
A       mail.s1 100.1.1.1
A       smtp.s1 100.1.1.1

There is a section on Godaddy for setting up hosts. I don't fully understand why this is, as I thought we just needed to create 'A' records to do that? Anyway, these are the hosts I've setup in that section:

HOST    IP ADDRESS
s1      100.1.1.1
ns1.s1  100.1.1.1
ns2.s1  100.1.1.1

These records were all created more than 48 hours ago, so have completed propagation.

The VPS Setup

The VPS is running Ubuntu 18.04 with ISPConfig 3.1 installed for the panel. It was setup following "The Perfect Server" tutorial for ISPConfig which included the installation of Bind. The hostname was set to s1.myserverdomain.com from the outset.

The panel currently shows the status of BIND as being "UP".

Current Status

When I head over to mxtoolbox.com and perform a DNS check on s1.myserverdomain.com it reports "No DNS server can be found".

My Question

I need to know what I've done wrong. Are there any records I should have created? Of those I did create, are any unnecessary or wrong? Thanks!


Solution

  • Could be several things, maybe you have port 53 closed, maybe your NS records aren't set up correctly, etc...

    You already noted how having the nameservers on the same machine is bad practice. Using a second IP is useless, I wouldn't bother. People can point a subdomains to a different IP address, and some DNS providers will wait a long time if they can't reach you, so even if your server is down for a minute, for some users it will be down for a long time.

    If you share your domain name, we can look it up and see what's wrong. You can also do this yourself with tools like zonemaster.net and intodns.com

    Lastly, ISPConfig has a good forum on howtoforge.com/community, I recommend it!