Want more timely Centmin Mod News Updates?
Become a Member

Pure-FTPD Can't connect via FTP to newly built Centmin server.

Discussion in 'Other Centmin Mod Installed software' started by fly, May 13, 2023.

  1. fly

    fly Member

    109
    16
    18
    Jul 27, 2019
    Ratings:
    +28
    Local Time:
    12:34 PM
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 130.00beta01
    • Nginx Version Installed: i.e. 1.23.4
    • PHP Version Installed: 7.2
    • MariaDB MySQL Version Installed: 10.3
    • When was last time updated Centmin Mod code base ? : today
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:
      Code (Text):
      cat /etc/centminmod/custom_config.inc
      LETSENCRYPT_DETECT='y'
      MARCH_TARGETNATIVE='n'
      




      I built a server a couple of weeks ago and can log in fine via FTP. On a server I built yesterday, FileZilla simply times out after authentication. And the pureftpd log is empty. I looked over the Github commit forum and didn't see anything obvious related in the last couple of weeks. Suggestions?

      (Also, there's no thread prefix tag for Pureftpd.)
     
    Last edited: May 13, 2023
  2. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:34 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Added prefix for Pure-FTPD. As to your issue, have you double checked Pure-FTPD session is using explicit SSL mode with passive connections to port 21 as outlined at Pure-FTPD Virtual FTP Users - CentminMod.com LEMP Nginx web stack for CentOS ? You can also enable verbose logging on Filezilla client side too.

    Have you tried simple virtual FTP user password change Pure-FTPD Virtual FTP Users - CentminMod.com LEMP Nginx web stack for CentOS ?

     
  3. fly

    fly Member

    109
    16
    18
    Jul 27, 2019
    Ratings:
    +28
    Local Time:
    12:34 PM
    Sorry for the delay, circling back to this now. Filezilla is setup correctly. These servers were built about a week apart. The old one works with Filezilla, the new one does not. I just created a brand new vhost on the server and...

    Here's the Filezilla log on the older server (installed 4/17/23):
    Code:
    Status:    Connecting to 1.1.1.1:21...
    Status:    Connection established, waiting for welcome message...
    Status:    Initializing TLS...
    Status:    TLS connection established.
    Status:    Logged in
    Status:    Retrieving directory listing...
    Status:    Server sent passive reply with unroutable address. Using server address instead.
    Status:    Directory listing of "/" successful
    And the newer server (installed 5/10/23):
    Code:
    Status:    Connecting to 2.2.2.2:21...
    Status:    Connection established, waiting for welcome message...
    Status:    Initializing TLS...
    Status:    TLS connection established.
    Status:    Logged in
    Status:    Retrieving directory listing...
    Status:    Server sent passive reply with unroutable address. Using server address instead.
    Command:    MLSD
    Error:    Connection timed out after 20 seconds of inactivity
    Error:    Failed to retrieve directory listing
     
    Last edited: May 31, 2023
  4. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:34 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Filezilla try with debug verbose logging

    upload_2023-5-31_5-5-26.png

    Also does the server have more than one IP address? Is it a NAT based server?

    what's output for the following commands
    Code (Text):
    egrep '^TCP_IN|^TCP6_IN' /etc/csf/csf.conf | grep -o '30001:50011'
    

    and
    Code (Text):
    egrep -i '^PassivePortRange|ForcePassiveIP' /etc/pure-ftpd/pure-ftpd.conf
     
  5. fly

    fly Member

    109
    16
    18
    Jul 27, 2019
    Ratings:
    +28
    Local Time:
    12:34 PM
  6. fly

    fly Member

    109
    16
    18
    Jul 27, 2019
    Ratings:
    +28
    Local Time:
    12:34 PM
    I see my older server has those csf.conf entries, so I'm guessing that's the issue. Seems very unlikely that I would have somehow deleted those, but if you didn't have a commit that removed them - I guess that has to be the answer.

    edit: In comparing the files between the servers, there's quite a few missing under TCP_IN on the new server.
     
  7. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:34 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    You can check initial install log for references to passive ports to see if they were set initially
    Code (Text):
    cat /root/centminlogs/installer_*-*.log | egrep -B1 '30001:50011|50011'
    

    would give something like
    Code (Text):
    cat /root/centminlogs/installer_*-*.log | egrep -B1 '30001:50011|50011'
    CSF adding memcached, varnish ports to csf.allow list...
    TCP_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    --
    Before RPC/NFS port tweak
    TCP_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    --
    UDP_OUT = "67,68,111,2049,1110,33434:33534,44320,21,53,113,123"
    TCP6_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    --
    UDP6_OUT = "20,21,53,113,123"
    TCP_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    --
    UDP_OUT = "67,68,111,2049,1110,33434:33534,44320,21,53,113,123"
    TCP6_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    DROP_NOLOG = "23,67,68,111,113,135:139,445,500,513,520"
    TCP_IN = "20,21,22,25,53,80,110,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    --
    UDP_OUT = "67,68,2049,1110,33434:33534,44320,21,53,113,123"
    TCP6_IN = "20,21,22,25,53,80,110,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    TCP_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,81,9418,30001:50011"
    --
    UDP_OUT = "67,68,111,1110,33434:33534,44320,21,53,113,123"
    TCP6_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,81,9418,30001:50011"
    --
    After RPC/NFS port tweak
    TCP_IN = "20,21,22,25,53,80,110,143,161,443,465,587,993,995,1110,1186,1194,81,9418,30001:50011"
    --
    UDP_OUT = "67,68,1110,33434:33534,44320,21,53,113,123"
    TCP6_IN = "20,21,22,25,53,80,110,143,161,443,465,587,993,995,1110,1186,1194,81,9418,30001:50011"
    --
    UnixAuthentication           yes                                                                   |    # UnixAuthentication           yes
    PassivePortRange    30001 50011                                                                    |    # PassivePortRange             30000 50000
    --
    # together. For instance, if you use MySQLConfigFile, then UnixAuthentication,
    PassivePortRange    30001 50011
    --
    CSF adding memcached, varnish ports to csf.allow list...
    TCP_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    --
    Before RPC/NFS port tweak
    TCP_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    --
    UDP_OUT = "67,68,111,2049,1110,33434:33534,44320,21,53,113,123"
    TCP6_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    --
    UDP6_OUT = "20,21,53,113,123"
    TCP_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    --
    UDP_OUT = "67,68,111,2049,1110,33434:33534,44320,21,53,113,123"
    TCP6_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    DROP_NOLOG = "23,67,68,111,113,135:139,445,500,513,520"
    TCP_IN = "20,21,22,25,53,80,110,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    --
    UDP_OUT = "67,68,2049,1110,33434:33534,44320,21,53,113,123"
    TCP6_IN = "20,21,22,25,53,80,110,143,161,443,465,587,993,995,1110,1186,1194,2049,81,9418,30001:50011"
    TCP_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,81,9418,30001:50011"
    --
    UDP_OUT = "67,68,111,1110,33434:33534,44320,21,53,113,123"
    TCP6_IN = "20,21,22,25,53,80,110,111,143,161,443,465,587,993,995,1110,1186,1194,81,9418,30001:50011"
    --
    After RPC/NFS port tweak
    TCP_IN = "20,21,22,25,53,80,110,143,161,443,465,587,993,995,1110,1186,1194,81,9418,30001:50011"
    --
    UDP_OUT = "67,68,1110,33434:33534,44320,21,53,113,123"
    TCP6_IN = "20,21,22,25,53,80,110,143,161,443,465,587,993,995,1110,1186,1194,81,9418,30001:50011"
    --
    UnixAuthentication           yes                                                                   |    # UnixAuthentication           yes
    PassivePortRange    30001 50011                                                                    |    # PassivePortRange             30000 50000
    --
    # together. For instance, if you use MySQLConfigFile, then UnixAuthentication,
    PassivePortRange    30001 50011
    
     
  8. fly

    fly Member

    109
    16
    18
    Jul 27, 2019
    Ratings:
    +28
    Local Time:
    12:34 PM
    Nope, not in there.

    Code:
    cat /root/centminlogs/installer_*-*.log | egrep -B1 '30001:50011|50011'
    UnixAuthentication           yes                                                                   |    # UnixAuthentication           yes
    PassivePortRange    30001 50011                                                                    |    # PassivePortRange             30000 50000
    --
    # together. For instance, if you use MySQLConfigFile, then UnixAuthentication,
    PassivePortRange    30001 50011
    --
    UnixAuthentication           yes                                                                   |    # UnixAuthentication           yes
    PassivePortRange    30001 50011                                                                    |    # PassivePortRange             30000 50000
    --
    # together. For instance, if you use MySQLConfigFile, then UnixAuthentication,
    PassivePortRange    30001 50011
    
    While adding in the FTP ports into CSF fixed the issue, now I'm concerned that something else could be wrong with this server.
     
  9. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:34 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+