PureFTPD not working

Discussion in 'Installation/Configuration' started by Milen Karaganski, Mar 30, 2020.

  1. Milen Karaganski

    Milen Karaganski New Member

    Hello.

    I have ISPConfig, the latest version installed on Ubuntu Server 18.04 TLS and can't get pure FTPD working. I've read a lot of topics, and here is what I did so far:

    1. In my router, I have enabled forwarding for ports 21 and 22 to my server private IP address (192.168.0.108)
    2. I have set "ForcePassiveIP" in /etc/pure-ftpd/conf set to my external IP (85.187.xx.xx) - it is a static IP bind to my router MAC address
    3. I have set "PassivePortRange" in /etc/pure-ftpd/conf "30000 50000"
    4. I have created a file in /etc/ufw/applications.d called "pure-ftpd" with the following content:
    Code:
    [pure-ftpd-mysql]
    title=FTP server (cp.shhservice.com-FTP)
    description=Simple FTP and FTPS Server
    ports=21,30000:50000/tcp
    and then allowed the rule.
    5. With "ufw status" I can see the rule is added and "ALLOWED"

    When trying to connect via FileZilla (with my server domain, my site domain or via IP, response is:

    Code:
    Status:    Resolving address of cp.shhservice.com
    Status:    Connecting to 85.187.xx.xx:21...
    Status:    Connection established, waiting for welcome message...
    Status:    Initializing TLS...
    Status:    Verifying certificate...
    Status:    TLS connection established.
    Status:    Logged in
    Status:    Retrieving directory listing...
    Command:    PWD
    Response:    257 "/" is your current location
    Command:    TYPE I
    Response:    200 TYPE is now 8-bit binary
    Command:    PASV
    Response:    227 Entering Passive Mode (85,187,xx,xx,168,191)
    Command:    MLSD
    Error:    The data connection could not be established: ECONNREFUSED - Connection refused by server
    Will be glad if someone can help.

    Best regards.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to open and foward the passive port range 30000 50000 from your router to your server as well.
     
  3. Milen Karaganski

    Milen Karaganski New Member

    Stupid me. :) Working now.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Btw, the passive port range you have chosen is quite large. That's ok, but you could have used a smaller range if you don't expect 20 thousand simultaneous connections by FTP to your server :)
     
  5. Milen Karaganski

    Milen Karaganski New Member

    I know, but on lot of places I've found this as recommended values so ...
    Also, from my research, I saw this is a kind of "common" problem for setting up the server. Maybe it's a good idea to be included as an additional note to the "Perfect Server" guides.
     

Share This Page