fbpx

How to enable SNMP and configure firewall access on WHM/cPanel

Introduction

By default a WHM/cPanel system doesn’t have SNMP installed, and there is no UI way of doing this. One reason why one would want to install SNMP on a WHM/cPanel system is because SNMP can be used to track CPU, disk, and memory usage, three essential parameters worth monitoring when running a server computer. This article explains how to enable SNMP on a WHM/cPanel system which is typically a multi step process.  The three steps documented here are:

  1. Determine operating system
  2. Ensure firewall access
  3. Install SNMP

Determine operating system

To install SNMP, one needs to determine the operating system version first. SNMP installation on CentOS/Redhat is different then SNMP installation on Ubuntu/Debian. One way to isolate the the operating system version is to use cat /etc/issue.

Is it CentOS/Redhat?

The output below is displayed on a virtualized CentOS system:

[root@host ~]# cat /etc/issue
\S
Kernel \r on an \m

A second step is required to determine the actual distribution:

[root@host ~]# cat /etc/redhat-release 
CentOS Linux release 7.7.1908 (Core)

Is it Ubuntu/Debian?

The output below is displayed if it’s Ubuntu:

root@host:~# cat /etc/issue
Ubuntu 18.04.3 LTS \n \l

Ensure firewall access

Most firewalls do not enable SNMP packets through by default. SNMP requires UDP port 161 to work. On WHM/cPanel systems there is firewall called CSF that may be installed. The instructions here are a guide on how to allow UDP port 161 if you have CSF installed.

Log into WHM
ConfigServer Security&Firewall
Scroll to Firewall Configuration
Scroll to Allow incoming UDP ports

Add 161 to the end of the list

Adding UDP Port 161 to WHM CSF Firewall

Scroll way down to the end of the page and press Change

Install SNMP

The final step is to install SNMP. Please follow the articles below depending on your Linux distribution:

How to set up SNMP for CentOS

How to get SNMP daemon working on Ubuntu 18.04 LTS

Contact us should you require assistance with your server or control panel management as we will be happy to assist.

References

https://forums.cpanel.net/threads/setting-snmp-on-cpanel.627063/
https://manage.accuwebhosting.com/knowledgebase/2418/How-to-Open-Ports-in-WHM-Firewall.html

Share this article

Share on facebook
Share on twitter
Share on linkedin

Leave a Reply

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

Scroll to Top