The default port numbers for cPanel and WHM are given below :
cPanel : 2082 / 2083 (SSL)
WHM : 2086 / 2087 (SSL)
Please follow below steps to change the default port number to any value.
# SSH to cPanel server with root user
# Open “/var/cpanel/cpanel.config” file and change the default port number
port=2082
# Run the following commands after changing the default port value with new port number
/usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings /etc/init.d/httpd restart
# Ensure new port number is opened into the firewall
# Now you can access cPanel & WHM with new port number.