Chitika

Tuesday, October 13, 2015

How to setup DNS server on RedHat Enterprise Server 7

In this How-To we are going to setup DNS server for a single zone for our test domain mydomain.local. This DNS server will act as master authority for this domain and will resolve fully qualified domain name (FQDN) mydomain.local and www.mydomain.local to IP address 20.0.0.3.

Our Named Daemon will listen on two local IP addresses, Loopback 127.0.0.1 and Interface IP address 20.0.0.3

 DNS Server Installation

To install DNS server Open Terminal and Run following Command

# yum -y install bind bind-utils

Once the DNS installtation finished we have to configure to named daemon to listen on loopback and local interface address. Open /etc/named.conf and change the following line as per your network configuration.


Check if hostname is correct. open vi /etc/hosts and it will looks like following.


Here now we can start named Daemon.


Now check if name dc can be resolved.


Now Check port 53 by netstat command. We have DNS server configured to listen on Loopback and local interface.


Now open firewall to allow DNS queries from external sources.


Creating Zones

The following is the forward zone entry in named.conf file, written for mydomain.local domain. Edit /etc/named.conf.


zone "mydomain.local" IN {
type master;
file "fwd.mydomain.local.db";
allow-update { none; };

};

The following is the reverse zone entry in the named.conf file.

zone "0.0.20.in-addr.arpa" IN {
type master;
file "0.0.20.db";
allow-update { none; };

};

Zone Configuration

Default location of zone file is /var/named. Run following command in terminal to create forward zone file.

#vi /var/named/fwd.mydomain.local.db

Edit as per your configurations.


Run following command to create reverse zone file.

# vi /var/named/0.0.20.db


Restart the BIND service.

# systemctl restart named.service

Enable it on system start up.

# systemctl enable named.service

Now go to a client machine and enter DNS Address 20.0.0.3. Ping dc.mydomain.local or ping www.mydomain.local



You can also verify the forward lookup zone by following command. 



We have successfully installed BIND on RHEL7 as Master server.

Cheers :-)

How to install Webmin in Redhat Linux Enterprise 7 (RHEL 7)

Webmin is a Web-based Management tool for Linux distributions. You can manage the services like DNS, DHCP, MySQL server and other networking services. You can also manage the user, disk, file system, process, packages, etc

You can download available RPM's from Webmin Office Site or Use below commands to download and install.

First we need to create repo for Webmin


Now add following to webmin.repo file and save and exit.


Now we have to download the Webmin GPG key.


Import the GPG key.


To Install Webmin run following command.


You will see


To start the Webmin Run following command.


To Auto start Webmin at system startup run following


By default Webmin listen on Port 10000. To Allow the port in firewall run following.


Now open https://localhost:10000 in browser. Enter Username root and password for root to login.

You will see Webmin page.


Here you can configure your server.

That's all, Cheers :-)