Server Gigabit Guide

How to open ports in WHM/SSH firewall?

You are here:
Estimated reading time: < 1 min

Open Port in CSF Firewall through SSH

  1. Login to your Linux Server through SSH. Open csf.conf file using any text editor./etc/csf/csf.conf
  2. Add the port you wish to open and restart CSF firewall for the changes to take into effect.# Allow incoming TCP ports
    TCP_IN = “20,443,465,21,22,587,993,25,53,80,110,143,995”
    # Allow outgoing TCP ports
    TCP_OUT = “20,21,443,587,22,25,80,110,43,53”
  3. csf -r  // This is to restart CSF firewall

Open Port in CSF Firewall through WHM

  1. Login to WHM.
  2. Type firewall in Find bar and click on ConfigServer Security&Firewall link.Open Port in CSF Firewall through SSH Login to your Linux Server through SSH. Open csf.conf file using any text editor./etc/csf/csf.conf Add the port you wish to open and restart CSF firewall for the changes to take into effect.# Allow incoming TCP ports TCP_IN = “20,443,465,21,22,587,993,25,53,80,110,143,995” # Allow outgoing TCP ports TCP_OUT = “20,21,443,587,22,25,80,110,43,53” csf -r // This is to restart CSF firewall Open Port in CSF Firewall through WHM Login to WHM. Type firewall in Find bar and click on ConfigServer Security&Firewall link.
  3.  Click on the Firewall Configuration button. Firewall Configuration button
  4. Scroll down and locate Allow incoming TCP ports section. Enter the port you wish to open and click on the Change button at the bottom to save your changes.
  5.  Allow incoming TCP ports section
  6. Lastly, you will need to restart csf by clicking on Restart csf+lfd button.
Was this article helpful?
Dislike 0
Views: 64