Linux serverNETWORK ADMINISTRATIONS

How to Configure DNS / BIND in CentOS 7 using WebMin.

Once you logs in to WebMin, navigate to ‘Unused Modules’ then click on ‘BIND DNS Server’.
The page will indicate that BIND is not installed.So install it by clicking ‘Click Here’ button.

Once its installed , navigate to ‘Refresh Modules’ in main page.
This will move the ‘BIND DNS Server’ from unused module list to ‘Servers’

Expand ‘Servers’ , then select ‘BIND DNS Server’ and click on ‘Addresses and Topology’
Here we need to replace the loopback IP address with the actual server IP and then click ‘Save’

Next step is to create a Master zone for storing forward records (name to IP)

In DNS Server main page , click ‘Create Master Zone’ button.
Fillup the details as shown below.

Domain name : mylinxlabs.com
Master Server : webmin01.mylinxlabs.com
Email Address : admin@mylinxlabs.com

Then click ‘Create’

Now we need to create a Master zone for storing reverse records (IP to name)

Go back to DNS Server main page and click ‘Create Master Zone’ button , but this time you have to select the radio button ‘Reverse (Address to Names)’

Network : 192.168.56
Master Server : webmin01.mylinxlabs.com
Email Address : admin@mylinxlabs.com

Then click ‘Create’

Now we can add records to the zone files . WebMin have a feature to automatically add forward record when we create a reverse record
In ‘Edit Master Zone 192.168.56’ page , click on ‘Reverse Addresses’

Address : 192.168.56.10
HostName : webmin01.mylinxlabs.com
Update Forward : Yes

Then click ‘Create’

This will create both forward and reverse address record

Now we have to go back to the server via SSH and open 53 port in firewall, so that clients can reach to the DNS to resolve names/IPs.

Execute below commands as root to open port 53

# firewall-cmd –zone=public –add-port=53/tcp –permanent
# firewall-cmd –reload

You can test the DNS resolution using the new DNS server by adding the IP 192.168.56.10 as nameserver in /etc/resolv.conf

In next post , I’ll explain how to configure a Mail server.

source

centos 7

Leave a Reply

Your email address will not be published. Required fields are marked *