Ho configurato due nuove scatole CentOS 7 contemporaneamente, quindi le configurazioni dovrebbero essere identiche, solo indirizzi IP e nomi host diversi.
Ho installato VSFTPD e configurato per porte passive. Una scatola si collega bene, nessun problema, tuttavia la seconda scatola mi genera continuamente questo errore:
GnuTLS error -15: An unexpected TLS packet was received.
Ecco la traccia di debug di FileZilla:
Status: Connecting to 192.168.20.68:21...
Status: Connection established, waiting for welcome message...
Trace:  CFtpControlSocket::OnReceive()
Response:   220 (vsFTPd 3.0.2)
Trace:  CFtpControlSocket::SendNextCommand()
Command:    AUTH TLS
Trace:  CFtpControlSocket::OnReceive()
Response:   234 Proceed with negotiation.
Status: Initializing TLS...
Trace:  CTlsSocket::Handshake()
Trace:  CTlsSocket::ContinueHandshake()
Trace:  CTlsSocket::OnSend()
Trace:  CTlsSocket::OnRead()
Trace:  CTlsSocket::ContinueHandshake()
Trace:  CTlsSocket::OnRead()
Trace:  CTlsSocket::ContinueHandshake()
Trace:  CTlsSocket::OnRead()
Trace:  CTlsSocket::ContinueHandshake()
Trace:  TLS Handshake successful
Trace:  Protocol: TLS1.2, Key exchange: ECDHE-RSA, Cipher: AES-256-GCM, MAC: AEAD
Status: Verifying certificate...
Status: TLS connection established.
Trace:  CFtpControlSocket::SendNextCommand()
Command:    USER datamover
Trace:  CTlsSocket::OnRead()
Trace:  CFtpControlSocket::OnReceive()
Response:   331 Please specify the password.
Trace:  CFtpControlSocket::SendNextCommand()
Command:    PASS *******
Trace:  CTlsSocket::OnRead()
Trace:  CTlsSocket::Failure(-15)
Error:  GnuTLS error -15: An unexpected TLS packet was received.
Trace:  CRealControlSocket::OnClose(106)
Trace:  CControlSocket::DoClose(64)
Trace:  CFtpControlSocket::ResetOperation(66)
Trace:  CControlSocket::ResetOperation(66)
Error:  Could not connect to server
L'errore è sempre subito dopo il controllo della password.
So che il problema NON È SELinux, poiché l'ho disabilitato. Il problema non è nemmeno il firewall, poiché ho provato a disabilitare Firewall Daemon (firewalld).
Ecco la parte rilevante del file /etc/vsftpd/vsftpd.conf.
listen=YES
listen_ipv6=NO
pasv_enable=YES
pasv_max_port=10100
pasv_min_port=10090
pasv_address=192.168.20.88
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
ssl_ciphers=HIGH
require_ssl_reuse=NO
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
Ho fatto una ricerca su Google ma non ho visto 15 codici di errore.
Pensieri?
Risposta accettata:
Ho riscontrato lo stesso errore dopo il comando PASS in CENTOS 7. (Errore GnuTLS -15:è stato ricevuto un pacchetto TLS imprevisto.)
La mia soluzione è la seguente:
Ho dovuto aggiungere quanto segue a vsftpd.conf:
allow_writeable_chroot=YES
chroot_local_user=YES 
local_root=/ftphome/$USER 
user_sub_token=$USER