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 Issue

Discussion in 'General Discussion' started by lamp, May 24, 2007.

  1. lamp

    lamp Well-Known Member

    Joined:
    Dec 22, 2003
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    Here is the problem:
    All my clients can connect to their domain name using ftp except for one. Whenever they try to connect, the server answers: "Connection closed by remote host"

    Anyone have any clue why these guys would get singled out? I am running lfd + csf.

    Any suggestions would be much appreciated.
     
  2. WhmSonic

    WhmSonic Well-Known Member

    Joined:
    Mar 19, 2007
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Sometimes passive FTP ports cause this problem you may try it.

    So you installed a firewall, but it seems to have crippled passive ftp connections. Your clients are complaining of timeouts and lagging connection closed by remote host, performance of the FTP server. All these are signs that you did not configure your firewall and FTP server properly for passive FTP connections.

    Open your firewall configuration file and add this passive ports to TCP,EGF,UDP and EGF(UDP)

    Passive Port: 35000_36000

    Save and restart your firewall.

    Open pureFTP configuration file and force ftpserver to use below ports:
    Code:
    pico /etc/pure-ftpd.conf
    Find the line # PassivePortRange 30000 50000

    If there is a leading '#' character, remove it.
    remember to change ports to 35000 36000 in ftpd conf file.

    Ie. (previous example becomes this)
    Code:
    # Port range for passive connections replies. - for firewalling.
    
    PassivePortRange          35000 36000
    

    Now save the file and restart your FTP server

    Code:
    /etc/init.d/pure-ftpd restart
    
     
    #2 WhmSonic, May 24, 2007
    Last edited: May 24, 2007
  3. lamp

    lamp Well-Known Member

    Joined:
    Dec 22, 2003
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for that ... but it was already configured as described. Still, the user cannot ftp to the machine.

    I even asked them to try:

    telnet [ip] 21

    But they get the same error. I can't even see anything wrong in the logs (/var/log/messages). Nowhere do I have an indication that the connection was closed (or even attempted).

    Any thoughts?

    Lamp.
     
  4. lamp

    lamp Well-Known Member

    Joined:
    Dec 22, 2003
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    Here is what happens when this particular client tries to login from his location using
    telnet [ip] 21... the Connection to host lost comes up right away...


    220---------- Welcome to Pure-FTPd [TLS] ----------
    220-You are user number 1 of 50 allowed.
    220-Local time is now 9:00. Server port: 21.
    220 You will be disconnected after 15 minutes of inactivity.


    Connection to host lost.


    At a loss here....

    Lamp
     
Loading...

Share This Page