Port configuration in CWP 7
The CWP 7 panel we can configure the CSF / LFD firewall using the CSF Firewall module.
In CWP.admin we go to: Left menu -> Security -> CSF Firewall
Here we can include IP addresses in the white list, block or unblock.
For additional configuration we can do it by clicking on the Firewall Configuration button or Left Menu -> Security -> CSF Firewall -> Firewall Configuration where we can edit the configuration of the CSF firewall.
Port configuration structure on the CSF firewall
The open ports are listed as TCP_IN, TCP_OUT, UDP_IN, and UDP_OUT
If we need to open a range of ports for example from 30000 to 50000, we can do it by setting: 30000: 50000.
Example of Port Configuration in CWP 7
# Allow incoming TCP ports
TCP_IN = "20,21,29950,25,53,80,110,143,443,465,587,993,995,2030,2031,30000:50000"
# Allow outgoing TCP ports
TCP_OUT = "20,21,29950,25,53,80,110,113,443,2030,2031,30000:50000,993,995"
# Allow incoming UDP ports
UDP_IN = "20,21,53"
# Allow outgoing UDP ports
# To allow outgoing traceroute add 33434:33523 to this list
UDP_OUT = "20,21,53,113,123"
# Allow incoming PING
ICMP_IN = "1"