Configure DNS Server Step-by-Step config Guide Using Webmin

Configure DNS Server Using Webmin

DNS (Domain Name Server) used for name resolving to any hosts that means it  translates domain names into IP addresses.  Domain names are alphabetic, they’re easier to remember. The Internet however, is really based on IP addresses. Every time you use a domain name, therefore, a DNS service must translate the name into the corresponding IP address.

In our previous article, you have setup your DNS Server using command line interface, refer below link for more information.

Setting up DNS Master-Slave Server Step-by-Step config Guide

dns_webmin_logo_ittroubleshooter-in

 

In this article We will seen how to configure DNS Server Using Webmin(web-based interface). Webmin tool offer to new system administrators to perform all system management task from via a web browser, Instead of using the command line console or terminal. You can also manage a system from the console or remotely.

My setup:

We use 4 systems, One machines as server setup and other three machines as a client machines (Linux as well as window). Let look at below details for more understanding.

DNS  server ip address and hostname(Centos7):192.168.1.10 (server1.ittroubleshooter.in)
DNS  Client  ip address and hostname(Centos7):192.168.1.11 (server2.ittroubleshooter.in)
DNS  Client ip address and hostname(RHEL7):  192.168.1.12 (client1.ittroubleshooter.in)
DNS  Client ip address and hostname(Window7): 192.168.1.13 (client2.ittroubleshooter.in)

Step by Step configuration of DNS Server Using Webmin

1) Setting up Webmin.

As previous, we have seen how to configure Webmin on Centos/RHEL7 systems, refer below link.

Setting up Webmin on Centos/RHEL7

2) Install the package for DNS using Webmin.

After Log into Webmin, First we need to search “BIND DNS Server” and install the Bind DNS Server Packages, refer below screen shots.

1bind_search_ittroubleshooter-in

After search “BIND DNS Server”, Click on “Click here” option to downloaded the DNS server Packages using YUM. If you are not configured the YUM server, refer the link.(Configure the Yum Server in Centos7/RHEL7/Fedora22)

2bind_yum_ittroubleshooter-in

On Below screenshot, The Bind Packages can be automatically installed by Webmin.

3installed_package_ittroubleshooter-in

 

Note: If you already installed the DNS packages, then there is no need to perform above steps. Similarly you Go to Servers, and then click on “BIND DNS Server”.

3) Creating a Forward Master Zone.

Now Go to Servers, then click on “BIND DNS Server” and Click on “Create master zone”.

4master_ittroubleshooter-in
Enter the domain without the www into the “Domain name / network” box (In our case we are using ittroubleshooter.in domain name). For the master server, type in the domain name as well. You can check the “Create NS record” box then enter your email address in the appropriate box. Type in the IP address of the server and Click “Create” button, refer below screenshot.

5createmaster_ittroubleshooter-in

On the next Step, You will then be redirected to the Master zone page for that domain you just created. Now you create A records (Address Records) after Click on “Address” options, refer below screenshot.

6editmaster_ittroubleshooter-in

4) Creating “A” records (Address Records).

Type in “server1” for the name, and type in the “IP address” and Click on “create”, refer below screen shot.

arecord_ittroubleshooter-in

As below screenshot, Address Records has been created.

7addressrecord_ittroubleshooter-in

Similarly, create Address record for remaining systems and the click on “Return to zone list” button.

8address_oittroubleshooter-in

As you seen below screenshot, the “ittroubleshooter.in” i.e Forward Master Zone has been created. Now, its time to create Reverse Master Zone. Click on “create master zone”.

9createreverse_ittroubleshooter-in

5) Creating a Reverse Master Zone.

After click on “create master zone”. Select Zone Type Reverse Zone. Enter the domain or network into the “Domain name / network” box (In our case we are using 192.168.1). For the master server, type in the domain name as well. You can check the “Create NS record” box then enter your email address in the appropriate box. Type in the IP address of the server and Click “Create” button, refer below screenshot.

10reversecreated_ittroubleshooter-in

On the next Step, You will then be redirected to the Master zone page for that domain you just created. Now you create A records (Reverse Address Records) after Click on “Reverse Address” options, refer below screenshot.

12editreverse_ittroubleshooter-in

6) Creating Reverse Address.

Type in the IP address, and type in hostname on “hostname” box and Click on create, refer below screen shot.

13reverse_ittroubleshooter-in

As below screenshot, Reverse Address Records has been created.

14reversecreated_ittroubleshooter-in

Similarly, create Reverse Address record for remaining systems and the click on “Return to zone list” button.

15revfinal_ittroubleshooter-in

As you seen below screenshot, the “192.168.1” i.e Reverse Master Zone has been created.

16fwdandrev_ittroubleshooter-in

7) Edit Addresses & Topology options.

On Global Server options, Click on Addresses and Topology.

17add_ittroubleshooter-in

Enter the port no. and address on port and addresses box respectively, and click on save option(refer below screenshot).

18add_ittroubleshooter-in

8) Edit Zone Defaults option.

Click on Zone Defaults option, refer below screen shot.

19zonedefaults_ittroublesshooter-in

On Defaults zone settings type “any” on “allow queries from..” box.

20zonedefaultsquery_ittroubleshooter-in

Configuration of DNS Server is over, now start the Bind service.

21startbind_ittroubleshooter-in

9) Allow DNS service on firewall.

[root@server1 named]# firewall-cmd --add-port=53/udp --permanent
 success
[root@server1 named]# firewall-cmd --add-port=53/tcp --permanent
 success
[root@server1 named]# firewall-cmd --reload
 success
[root@server1 named]#

Configure DNS Server on Client (Linux) Side

1) Edit the /etc/resolv.conf file.

Add the DNS server details in “resolv.conf” file in all Client systems.

#vim /etc/resolv.conf

# Generated by NetworkManager
 search ittroubleshooter.in
 nameserver 192.168.1.10
 
 ~
 ~
 :wq

2) Restart network service.

[root@client1 ~]# systemctl restart network

3) Verify DNS server.

Using dig & nslookup command you can verify the DNS queries. if the commands is not found, you can use bind-utils packages.

[root@server2 ~]# nslookup client2
 Server:           192.168.1.10
 Address:    192.168.1.10#53
 
 Name: client2.ittroubleshooter.in
 Address: 192.168.1.13
 
 [root@server2 ~]# dig -x 192.168.1.13
 
 ; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7 <<>> -x 192.168.1.13
 ;; global options: +cmd
 ;; Got answer:
 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62751
 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2
 
 ;; OPT PSEUDOSECTION:
 ; EDNS: version: 0, flags:; udp: 4096
 ;; QUESTION SECTION:
 ;13.1.168.192.in-addr.arpa.   IN    PTR
 
 ;; ANSWER SECTION:
 13.1.168.192.in-addr.arpa. 38400 IN PTR   client2.ittroubleshooter.in.
 
 ;; AUTHORITY SECTION:
 1.168.192.in-addr.arpa. 38400 IN    NS    server1.ittroubleshooter.in.
 
 ;; ADDITIONAL SECTION:
 server1.ittroubleshooter.in. 38400 IN     A     192.168.1.10
 
 ;; Query time: 2 msec
 ;; SERVER: 192.168.1.10#53(192.168.1.10)
 ;; WHEN: Fri Oct 07 01:19:34 EDT 2016
 ;; MSG SIZE  rcvd: 133
 [root@server2 ~]#

Configure DNS Server on Client (Window) Side

In our case we are using window 7 machine.First go to start–> run–> type “ncpa.cpl”. Select the network adapter and go to  properties.It will popup the new window,Select the “Internet Protocol Version 4” option and click on properties, refer below screen shot.

window_ittroubleshooter-in_new

Fill the entries on preferred DNS server, refer below screen shot.

23ipv4win_ittroubleshooter-in

Use nslookup command you can verify the DNS queries, refer below screen shot;

window3_ittroubleshooter-in

Hope this post will help Linux/Unix beginners. Please share you feedback and Comments.!!!

Leave a Reply

2 Comments on "Configure DNS Server Step-by-Step config Guide Using Webmin"

Notify of
avatar
Sort by:   newest | oldest | most voted
Rajesh Dwivedi
Guest

NDC command failed : rndc: /etc/rndc.conf does not exist

wpDiscuz