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.

FTP Connection Problem

Discussion in 'General Discussion' started by nasirnjs, Jan 23, 2015.

  1. nasirnjs

    nasirnjs Member

    Joined:
    Jan 14, 2015
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    After doing this ...
    /etc/pure-ftpd.conf

    PassivePortRange 49494 49894

    /usr/local/cpanel/scripts/restartsrv_ftpserver

    echo "PassivePortRange: 30000 50000" >> /var/cpanel/conf/pureftpd/main

    Error: Connection timed out
    Error: Failed to retrieve directory listing

    Please help me
     
  2. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    hey,

    You might need to open those ports in firewall, that is my best guess
     
  3. nasirnjs

    nasirnjs Member

    Joined:
    Jan 14, 2015
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I also add this rules into firewall is ok? or need to restart firewall ??
    -A INPUT -p tcp --dport 49494:49894 -j ACCEPT
     
    #3 nasirnjs, Jan 23, 2015
    Last edited: Jan 23, 2015
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you clarify why you ran used a different port range in /var/cpanel/conf/pureftpd/main compared to /etc/pure-ftpd.conf? I suggest using a firewall management tool such as CSF to allow the port range.

    Thank you.
     
  5. caisc

    caisc Active Member

    Joined:
    Oct 5, 2011
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Looks like you are using CSF firewall, here is the fix for this -

    Login to the server using SSH as root user
    Open the file /etc/pure-ftpd.conf
    Scroll down and look for the line that says #PassivePortRange 30000 35000
    Make sure it is not commented out (remove the # at the starting of the line)
    Save the file
    Restart the FTP server


    Now Login to your WHM and go Plugin section --> ConfigServer Security & Firewall
    and Edit the configuration file for the csf firewall and lfd so that you Add the port range 30000:35000 to TCP_IN

    Now, restart CSF and test FTP again. You should be able to connect with FTP now.
     
  6. nasirnjs

    nasirnjs Member

    Joined:
    Jan 14, 2015
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks every one Problem solve was Firewall Problem ..
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

Share This Page