The topic of this post is about How to Setup DNS Server on a Dedicated Server. DNS stands for Domain Name System. When you create a website, you must specify a name that points to your site in order to register its domain. Later, this name will be converted to IP with the help of DNS and identified in the Internet space.

What is DNS Server?

One of the important and influential elements on DNS performance is a global set of DNS servers. A DNS server is any computer that is registering and known to be a member of the Domain Name System (DNS). In fact, requests are managing using DNS Server. Each DNS server that serves a specific software purpose on the network has a public IP address and a database of network names and addresses of other Internet hosts. DNS servers are organizing and operate in a hierarchy. At the highest level of this hierarchy, the Internet has 13 root servers, which are famous for their major role, complete database and comprehensive performance. These servers are owned by well-known and independent companies.

It should be said that in order for a domain to point to a website, it must be added to the DNS server in the first step. DNS server is a large database that contains a collection of related domains and IPs. For example, if the domain is google.com, the site will resolve to IP with DNS address 64.233.167.99.

There are many DNS servers in hosting companies and organizations. These DNS servers are connecting to each other. Therefore, it is only enough for your hosting company to add your domain name to the DNS server so that it is gradually (in about 48 hours) coordinating with other DNS around the world.

How to Install DNS Server on a Dedicated Server

In the continuation of this article, we want to teach you step by step How to Install DNS Server on a Dedicated Server. The first step is to install BIND (or any DNS server). Note that BIND will allow you to become a DNS server for private (LAN) or public (Internet) networks.

1) You will find out whether you have BIND on your server or not by using the following command:

named -v

One thing to note is that BIND, or another DNS server, is required to authorize the secondary DNS server.

2) Now we come to the step of adding the domain to the secondary DNS. Log in to your Neuronvm account. Now, after selecting the server, go to the “Secondary DNS” tab.

3) In the next step, you can click on the Add a domain button.

4) After you’ve successfully completed the above steps, you’ll be presented with a secret value that you’ll need to add as the contents of a new TXT record in your DNS zone file.

5) In the “Name” field, write “ownercheck“.

6) In the “Value” field, you need to write the secret value that you provided.

7) You can check that your new record is publicly accessible using the MX Toolbox.

8) We recommend that you change the option to “TXT Lookup” and put ownercheck.yourdomain.com in the field.

9) Finally, click the Next button.

10) In the next step, click the Add button to confirm ownership.

11) With this configuration, you can use a free secondary DNS server provided by Neuronvm.

If you have done all the steps correctly, this secondary DNS server will work as a backup copy of your primary DNS server.

How to perform Authorizing Zone Transfers

In this section, we are going to explain to you how to Authorize Zone Transfers. The important point is that you must authorize zone transfers on your server to NeuronVM’s secondary DNS server.

On the other hand, considering that the default locations of DNS zone files vary by distribution, the files where the domain information is stored will be in one of the following two paths:

/etc/bind/named.conf.local
/var/named/example.com

Zone File will look like the following commands:

acl trusted-servers {
147.135.0.4; // sdns1.neuronvm.com
};
zone example.com {
type master;
file "example.com";
allow-transfer { trusted-servers };
};

After successfully completed the steps, it is necessary to restart named to apply the changes by running the following command:

sudo systemctl restart named

Conclusion

Since the browsers check the local DNS server first, you can define related records in your internal DNS server so that the resolve action is done locally. Finally, we hope you have learned How to Setup DNS Server on a Dedicated Server by reading this article.

Rate this post