Save up to 30% on Dedicated Servers – Chat Now!

Your Webhosting Questions
Answered by the Webhosting Experts
Tags +
...
Tags
...
...

How to open certain ports in CSF Firewall on a dedicated server

1. Login to your Dedicated server with root

2. To open ports in CSF, you will want to edit these lines in this file:

# Allow incoming TCP ports
TCP_IN = “20,21,22,25,26,53,80,110,143,443,465,587,993,995,2077,2078,2082,2083,2086,2087,2095,2096”
# Allow outgoing TCP ports
TCP_OUT = “20,21,22,25,26,37,43,53,80,110,113,443,465,873,2087,2089,2703”
# Allow incoming UDP ports
UDP_IN = “20,21,53,465,6277,24441”
# Allow outgoing UDP ports
UDP_OUT = “20,21,53,113,123,465,873,6277,24441,33434:33523”

and add the port number at the end of each line. See this example below where I add port 12345 to the incoming TCP ports section:

# Allow incoming TCP ports
TCP_IN = “20,21,22,25,26,53,80,110,143,443,465,587,993,995,2077,2078,2082,2083,2086,2087,2095,2096,12345”

Once that is done, save the file and then restart the firewall:

service csf restart

Share

Facebook
Twitter
LinkedIn
Email
WhatsApp

Need More Personalized Help?

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your my.hivelocity.net account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here at: support@hivelocity.net. We are also available to you through our phone and live chat system 24/7/365.