WHM/cPanel is the most popular hosting control panel used world wide by hosting companies. Default port numbers for cPanel and WHM are 2082/2083 and 2086/2087 respectively.
Today we will learn to change default cPanel port. First of all you will need root access to change cPanel default port. The value of the port is defined in the configuration file of cPanel /var/cpanel/cpanel.config
We can edit the value in this file to change cPanel default port.
1). Login to SSH as root.
2). Run this command to open cpanel configuration file :
Now look for this value "port=2082" in the file and change it to the port any number like 2099. Now save and exit.
3). After done this changes you have to run this command to make in affect for these changes.
Now all changes are applied. Now you have to also look for the port number port number you have used as cPanel port is added in server firewall allowed ports or not.
If it is not allowed than you to add it.