Help Center
How to open and close ports using CSF in WHM?
Blocking and enabling ports on a server are fundamental functions to ensure the security and proper functioning of applications and services. Ports serve as entry and exit points for information on a server, facilitating communication between different devices and applications.
Port blocking is used to restrict unauthorized access to certain services or applications. By blocking unused ports or those posing a security risk, the attack surface is reduced, and the server is protected against potential intrusions or exploitation attempts.
On the other hand, enabling ports allows for external access to specific services that need to be used from the outside. This is especially useful when allowing external connections to applications or services such as web servers, databases, or email services.
It is important to configure port blocking and enabling carefully, following security best practices. This involves assessing risks, allowing only necessary ports, implementing authentication and encryption measures, and maintaining constant vigilance to detect and mitigate potential security threats.
Before making any changes to port configurations, it is essential to understand how to open and close ports in WHM using the ConfigServer Security & Firewall (CSF). This tutorial will guide you through the necessary steps to manage your server's ports securely and efficiently.
- Access your WHM account using your administrator credentials.
- In the main menu, look for the "Plugins" section and click on "ConfigServer Security & Firewall."
- Within CSF, scroll down to the "Firewall Configuration" section.
- You will find a list of allowed and blocked TCP and UDP ports. To open a port, simply add the port number and click "Save."
- If you want to close a port, remove the port number from the list and save the changes.
- Verify that the changes have been applied correctly by checking the list of allowed and blocked ports.
- Repeat steps 4 to 6 for each port you wish to open or close.
- Once finished, review and confirm that the ports are configured according to your needs.
Always remember to make firewall configuration changes carefully and follow security best practices.
Related articles
- Screen command in CentOs: more efficient sessions
- Solution: 'Service Unavailable' on CloudLinux servers
- Database export via command line
- Protect your data: configure RAID notifications with S.M.A.R.T.
- List CronJobs for all cPanel users
- Delete unnecessary files from the /tmp partition
- Change reserved disk space in CentOS
- Know your hardware: get accurate information on CentOS 7
- Basic SSH commands
- Optimize accounts with manual rearrange
- IP blocking in CSF via command line
- Clear DNS cache: solution to resolution problems
- Change file permissions via command line
- How to Modify the Hosts File in Windows, Linux, and macOS
- How to Use Telnet to Test SMTP Connectivity on Port 25
- Adjusting reserved space on Linux disks
- Adjusting reconstruction speed in RAID on Linux
- Where are NGINX logs stored?
- Configuring RAID failure notifications with mdadm
- Differences between Legacy VPS and Cloud VPS
- Install cPanel in your server or VPS
- How to send emails via SSH?
- Manage screen session