This article explains how to open ports on your server in CSF.
Be aware that opening ports on your server can be a security risk, so please be aware of the risk before opening specific ports on your server.
To open ports on your server there are ways of doing this. You can open ports via WHM, or via the command line.
How to open ports in WHM
- Login to WHM: SERVER-IP/WHM
- Click “ConfigServer Security & Firewall,” which is under the “Plugins” section
- Go to "Firewall Configuration"
- Find "TCP_IN=" under "IPv4 Port Settings"
- Enter the port number in the list below. Make sure to separate ports with a single comma and do not enter any spaces.
- Click "Change" at the bottom of the page.
The above steps will reset your firewall, and enable ports to be open.
How to open ports via command line
- SSH into your server.
- Go to the directory with the CSF configuration file.
- Open the file "csf.conf"
- Once you are in the configuration file, find "TCP_IN=", it will be under "# Allow incoming TCP ports"
- Within the quotation marks, put the port number that you wish to open. Separate each IP using a single comma and no spaces.
- Close the file and save all changes.
- Restart the firewall.