Menu
Classic WoW Private Server - Instant 60 1.12.1 Vanilla. Play World of Warcraft 1.12.1 Classic Vanilla for free. RetroWoW is a custom vanilla server.
The Domain Name System (DNS) is a method used to translate human-readable domain names (or Fully Qualified Domain Names (FQDN)) to machine-readable IP addresses, to locate a computer in a network such as the Internet.
In computer and network systems, this is necessary because, although the FQDNs are easy for humans to remember and use, computers (clients) access resources or services on other computers (servers) based on IP addresses.
In this regard, a DNS server (also known as a name server) maintains a directory of FQDNs and translates them to IP addresses; it can also return an IP address when a hostname/FQDN is provided. There are different types of DNS servers including authoritative name server, caching name server and many others.
In this article, we will walk you through the steps to install and configure a private/internal, authoritative DNS server on RHEL 8 using BIND open source software.
Requirements:
My Testing Environment:
Step 1: Installing Bind DNS on RHEL 8
1. To install bind and its utilities on your server, run the following cdnf command.
2. Next, start the DNS service for now, then enable it to auto-start at system boot and check if it is up and running using the systemctl commands.
Start Bind Server on RHEL 8
Step 2: Configuring BIND DNS on RHEL 8
3. To configure Bind DNS server, first you need to take a backup of the original configuration file /etc/named.conf using following cp command.
4. Now open /etc/named.conf configuration file for editing using your favorite command line text editor as follows.
Under the
options
configuration section, comment out the following lines.5. Next, look for the
allow-query
parameter and set its value to your network, which means that only hosts on your local network can query the DNS server.Step 3: Creating the Forward and Reverse DNS Zones
A Forward Zone is where the hostname (or FQDN) to IP address relations are stored; it returns an IP address using the hostname. Note that normal DNS queries are forward lookup queries. On the other hand, a Reverse Zone returns the FQDN of a host based on its IP address.
6. To define the forward and reverse zones, add the following lines at the end of the /etc/named.conf file.
Let’s briefly explain the options in the above zone configurations:
- type: Defines the role of this server for the zone. The value “master” means it’s an authoritative server where the master copy of the zone data is maintained.
- file: specifies the zone’s database file.
- allow-update: specifies the hosts which allowed to submit Dynamic DNS updates for master zones. None in this case.
Step 4: Creating Forward DNS Zone File
7. First, create a Forward zone file under the /var/named directory.
Add the following configuration in it.
Let’s briefly explain the above zone definition and the parameters.
- TTL: specifies the time-to-live of the RR and $TTL directive gives a default TTL for every RR without a specific TTL set.
- @: It is an alias for the domain name (e.g tecmint.lan) defined in the main configuration file.
- IN: means the Internet.
- SOA: specifies the Start of Authority: who the authoritative name server is (dns-primary.tecmint.lan), the administrator’s contact info (admin.tecmint.lan, the @ sign is replaced by a period) and other related information.
- NS: means name server.
- Serial: this value is used by the DNS server to verify that the contents of a particular zone file are up-to-date.
- Refresh: specifies how often a slave DNS server should perform a zone transfer from the master.
- Retry: specifies how often a slave should retry a failed zone transfer.
- Expire: determines how long a slave server should wait before answering client query when a master is unreachable.
- Minimum: sets the minimum TTL for the zone.
- A: A host address.
Step 5: Creating Reverse DNS Zone File
8. Similary, create a Reverse zone file under the /var/named directory.
Then add the following lines in it. Here, the PTR is the opposite of A record used to map an IP address to a hostname.
Reverse DNS Zone File
9. Set the correct ownership permissions on the zone files as follows.
10. Finally, check the DNS configuration and the zone files has the correct syntax after making the above changes, using the named-checkconf utility (no out means no error):
11. Once you have performed all the necessary configuration, you need to restart the DNS service for the recent changes to take effect.
12. Next, before any clients can access the DNS service configurations on the server, you need to add the DNS service in the system firewall config and reload the firewall settings using the firewall-cmd utility, as follows:
Step 6: Testing DNS Service From a Client
13. In this section, we will show how to test the DNS service from a client side. Log into the client machine, configure it to use the above DNS server. On a Linux system, open the file /etc/resolve.conf using your favorite text editor.
Add the following entry in it, which tells the resolver to use the specified nameserver.
Save the file and close it. Note that you also have to specify the DNS server in the network interface configuration file.
14. Add the DNS servers IP 192.168.56.100 as resolver to the client machine network interface configuration file /etc/sysconfig/network-scripts/ifcfg-enp0s3 as shown in the following figure.
15. Then use the nslookup utility to query the IP using the hostname and vise versa, of the www, mail and docs servers in your network as shown.
Check DNS Server Queries
Summary
In this article, we have shown how to install and configure a private, authoritative DNS server on RHEL 8 using BIND software. We hope everything worked fine for you, otherwise, send us your queries or any other comments via the feedback form below.