27 Mar 2018

Adding a DNS Zone in cPanel/WHM Server

cPanel/WHM is very efficient when it comes to DNS management. You can setup a DNS zone with just a few clicks. When a website is created in WHM, a DNS zone is also created in WHM. Additionally, you can create DNS zones in WHM without adding a website.

This tutorial will briefly walk you through adding a DNS zone in WHM.

Step 1: Logging in to WHM

Being able to manage DNS zones requires access to WHM. Simply go to http://YourHostname:2087 and enter your login information. If this is your first time logging in, you can get started with the One-Click cPanel guide.

Step 2: Adding a DNS zone

On the left-hand navigation menu, find “DNS Functions” and click “Add a DNS Zone”.

cpanel_1a.png

Under “Domain Information”, enter an IP address and a domain name. The IP address entered here will be used for the A records and other default records. In this example, 1.2.3.4 is the IP address, and example.com is the domain name. Click the blue button labelled “Add Zone” to add the DNS zone.

The zone will now be created. Pay close attention to the output. Upon success, it will read similar to the following:

Results of adding zone example.com

Zone created successfully for IP 1.2.3.4.
Zone is owned by system.

You can now view and edit the DNS zone by clicking “Edit DNS Zone” (from the left-hand navigation menu), choosing a zone, and clicking “Edit”. A default zone will look like this:

cpanel_2a.png

You can add new entries by entering record information under “Add New Entries Below this Line”. Click “Save” to add them.

Step 3: Removing a DNS zone

You can remove a DNS zone by clicking “Delete a DNS Zone” (from the left-hand navigation menu), choosing one or more zones, and clicking “Delete”.

cpanel_3a.png


Testing zones on your DNS server

The Linux dig command is a tool for performing DNS lookups. You can test zones that were added to your DNS server by specifying the IP address of your DNS server when performing a lookup.

dig @1.2.3.4 www.example.com

...
;; ANSWER SECTION:
www.example.com.        14400   IN      CNAME   example.com.
example.com.            14400   IN      A       1.2.3.4
...

Using this DNS server on the internet

For a DNS zone hosted on your cPanel/WHM server to become publicly available on the internet, the owner of the domain must set the nameservers of the domain to point at your cPanel/WHM server. The nameservers are set at the registrar (where the domain was purchased). Each registrar has their own interface for managing domains and nameservers.

If you are planning to use this server to host DNS for your own domain name, you will also need to specify glue records at your registrar. Glue records solve the problem of a looping condition during DNS lookups. For example, if you own example.com, and your cPanel/WHM server is ns1.example.com, you would need to setup glue records. Again, each registrar has their own interface for managing these records.

Share this
19 Mar 2018

Installing and configuring ClamAV for cPanel server

WHM comes with a free, pre-installed version of clamavconnector (Clam antivirus) that is not activated by default.

Activate it by following this procedure:

  1. Connect to your WHM interface as root.
  2. On the home page, click on the cPanel link (icon).
  3. Click on “Manage Plugins”.
  4. Select the box “Install and keep updated” in the corresponding section to clamavconnector.
  5. Click on save at the bottom of the page to confirm the installation.

WHM will then download the necessary packages for clamavconnector and will install it automatically,  this may take a few minutes.

Once the installation has been completed, you will have a virus scan link in your cPanel interface.

Please go through the relevant screen captures:

clamav.png

clamav2.png

clamav3.png

That’s it !!!

Share this
15 Mar 2018

How to install nslookup, dig, host commands in Linux

That can’t do moment we face when we are trying to check if the website is pointing to correct IP and the nameservers which are authoritative for our servers are added correctly at the registrar end. A newly installed machine will not have dig, nslookup, host commands. So we have to manually install them on our servers. All these commands are included in a package called “bind-utils”. But different OS have different package names. I will be doing everything as root user, if you don’t have root privileges then you just have to add sudo before every command.

Installing is pretty straight process by the way.
My ubuntu sources list

root@serversupportz:~# cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu lucid main
deb http://archive.ubuntu.com/ubuntu lucid-updates main
deb http://security.ubuntu.com/ubuntu lucid-security main
deb http://archive.ubuntu.com/ubuntu lucid universe
deb http://archive.ubuntu.com/ubuntu lucid-updates universe

In ubuntu systems it is “dnsutils”

 

root@serversupportz:~# apt-get update
root@serversupportz:~# apt-get install dnsutils -y

In RHEL/Centos it will be bind-utils

root@serversupportz:~# yum install bind-utils
Share this
01 Mar 2018

Resource temporarily unavailable

OpenVZ is a container based virtualization technique for Linux. OpenVZ creates multiple secure, isolated Linux containers (otherwise known as VEs or VPSs) on a single physical server. Each container performs and executes exactly like a stand-alone server; a container can be rebooted independently and have root access, users, IP addresses, memory, processes, files, applications, system libraries and configuration files.

Here I explain a fix for the error “Resource temporarily unavailable” while switching user in OpenVZ based servers.

Error details

# su -
Password: 
su: cannot set user id: Resource temporarily unavailable

Solution

Edit (add) or change the following values in /etc/security/limits.conf

# vi /etc/security/limits.conf
-------------
*          soft     nproc          2047
*          hard     nproc          16384
*          soft     nofile         1024
*          hard     nofile         65536
-------------

It should be okay now!

Please try to switch now and let me know if you have any questions.

Share this

©2018 Serversupportz Limited. All Rights Reserved.

Click Me