The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Changing port and CSF

Discussion in 'Security' started by magicalwonders, Nov 19, 2014.

  1. magicalwonders

    magicalwonders Well-Known Member

    Joined:
    Nov 21, 2012
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I've been getting a lot of failed login attempts from hackers, so asked my host to change the port I login to the server with. I use the same new port to sftp.

    However, the login attempts are just as many as before. I've noticed on looking in CSF that the allowed incoming TCP ports are still including port 22. Should this not be removed?

    Also, according to wikipedia, ports 20 & 21 are for FTP data transfer and FTP control (command). As I'm only using SFTP on another port, is it safe to remove these from the list in CSF ?

    Hope someone can advise?
     
  2. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    942
    Likes Received:
    57
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    Ensure your new SSH port is open in CSF, and that SSH is indeed listening on that port. At that time it should be fine to close port 22, as well as 20/21 if you don't use normal FTP.
     
  3. magicalwonders

    magicalwonders Well-Known Member

    Joined:
    Nov 21, 2012
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    OK, thanks for the confirmation. I've had a look in WHM »Plugins »ConfigServer Security & Firewall »View listening Ports, and my new port is listed. 20 and 22 is not present in this list, although port 21 is. Not sure I really understand that.
     
  4. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    942
    Likes Received:
    57
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    Do you have the FTP server disabled, or do you simply not utilize it? You can go to "FTP Server Selection" in WHM and entirely disable the service if you wish.
     
  5. magicalwonders

    magicalwonders Well-Known Member

    Joined:
    Nov 21, 2012
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I've had a look in WHM and the setting for "FTP Server Selection" has "Pure-FTPD" enabled. I transfer and download files using SFTP, so I assume I need to keep that setting enabled?
     
  6. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    942
    Likes Received:
    57
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    Pure-FTPD Is not necessary for SFTP. SFTP is a subsystem of the SSH service and will work fine with no FTP server selected.
     
  7. magicalwonders

    magicalwonders Well-Known Member

    Joined:
    Nov 21, 2012
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    OK I'll disable that setting then. Thanks for your help and advice on this. :)
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    669
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  9. magicalwonders

    magicalwonders Well-Known Member

    Joined:
    Nov 21, 2012
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Thanks for the link Michael. :)
     
Loading...

Share This Page