A cPanel server runs many services, each on its own port. Your firewall must allow the ones you use and should block the rest. This reference lists the standard ports, what they do and whether you can close them.
Before you start
- This list is for server owners configuring CSF, firewalld or a provider firewall. Hosting customers can use it to check that their own network does not block these ports.
- For a general list beyond cPanel, see common server ports.
cPanel, WHM and webmail
| Port | Service | Keep open? |
|---|
| 2083 | cPanel (SSL) | Yes |
| 2082 | cPanel (non-SSL) | Close if you force SSL |
| 2087 | WHM (SSL) | Yes, ideally limited to admin IPs |
| 2086 | WHM (non-SSL) | Close if you force SSL |
| 2096 | Webmail (SSL) | Yes |
| 2095 | Webmail (non-SSL) | Close if you force SSL |
| 2077 / 2078 | Web Disk (WebDAV) | Only if used |
| 2079 / 2080 | CalDAV / CardDAV | Only if used |
Websites
| Port | Service |
|---|
| 80 | HTTP (needed for redirects and AutoSSL validation) |
| 443 | HTTPS |
Email
| Port | Service | Notes |
|---|
| 25 | SMTP server-to-server | Required to receive mail |
| 465 | SMTP over SSL | Recommended for mail apps |
| 587 | SMTP submission (STARTTLS) | Alternative for mail apps |
| 993 / 143 | IMAP SSL / plain | Prefer 993 |
| 995 / 110 | POP3 SSL / plain | Prefer 995 |
App settings are explained in cPanel email ports.
FTP, SSH and DNS
| Port | Service | Notes |
|---|
| 21 | FTP / FTPS control | Close if everyone uses SFTP |
| 30000–35000 | Passive FTP data | Must match the Pure-FTPd passive range |
| 22 | SSH and SFTP | Limit to trusted IPs or change it |
| 53 TCP/UDP | DNS | Only if the server is a nameserver |
| 3306 | MySQL | Close unless remote MySQL is needed |
Apply the list to your firewall
- CSF: edit
TCP_IN and TCP_OUT; see open and close ports in CSF. - firewalld: add ports to the public zone; see firewalld zones.
- Outgoing, keep 25, 53, 80, 443, 465, 587 and 113 open so the server can send mail, resolve DNS and download updates and licences.
Tip: If cPanel works on 2083 at home but not at work, the office network blocks the port. Use https://yourdomain.com/cpanel through a proxy subdomain, or open cPanel in one click from the MdmHost dashboard.
Next steps