vsftpdを使用してftpサーバー(Ubuntu 13.04 / Picuntu 4.4)をセットアップしています。プレーンFTPは完全に正常に動作します。接続を保護するために、SSL暗号化を追加しました。クライアントが証明書を受け入れた後、サーバーはログイン資格情報を受け入れます。ただし、コマンドの後、クライアント側で何かがおかしくなります。LIST
FTPクライアントログは次のとおりです。
Status:    Resolving address of my_website.info
Status: Connecting to 93.123.456.789:21...
Status: Connection established, waiting for welcome message...
Response:   220 Welcome to My Website.
Command:    AUTH TLS
Response:   234 Proceed with negotiation.
Status: Initializing TLS...
Status: Verifying certificate...
Command:    USER ftpuser1
Status: TLS/SSL connection established.
Response:   331 Please specify the password.
Command:    PASS ******
Response:   230 Login successful.
Command:    SYST
Response:   215 UNIX Type: L8
Command:    FEAT
Response:   211-Features:
Response:    AUTH TLS
Response:    EPRT
Response:    EPSV
Response:    MDTM
Response:    PASV
Response:    PBSZ
Response:    PROT
Response:    REST STREAM
Response:    SIZE
Response:    TVFS
Response:    UTF8
Response:   211 End
Command:    OPTS UTF8 ON
Response:   200 Always in UTF8 mode.
Command:    PBSZ 0
Response:   200 PBSZ set to 0.
Command:    PROT P
Response:   200 PROT now Private.
Status: Connected
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/"
Command:    TYPE I
Response:   200 Switching to Binary mode.
Command:    PASV
Response:   227 Entering Passive Mode (93,123,456,789,11,200).
Command:    LIST
Response:   150 Here comes the directory listing.
Error:  Connection timed out
Error:  Failed to retrieve directory listing 
-私はこの問題について多くのフォーラムでたくさん検索しましたが、解決策はどこにも見つかりませんでした。何日も何度も必死のヒットアンドトライアルを試みた後、ここでいくつかのガイダンスを探しています。接続は受動的であり、サーバーは明示的にクライアントに外部IPアドレスを指定し、狭い範囲、つまり3000-3030 のポートを指定します。VSFTPD構成ファイルは次 のとおりです。
listen=YES 
anonymous_enable=NO 
local_enable=YES 
chroot_local_user=YES 
chroot_list_enable=NO 
pam_service_name=ftp 
check_shell=NO 
ftpd_banner=Welcome to my website. 
userlist_enable=YES 
userlist_deny=NO 
max_clients=5 
max_per_ip=2 
pasv_enable=YES 
pasv_min_port=3000 
pasv_max_port=3030 
pasv_address=93.123.4xx.7xx # (external IP address of the server) 
pasv_addr_resolve=NO 
write_enable=NO 
ssl_enable=YES 
force_local_logins_ssl=YES 
force_local_data_ssl=YES 
ssl_tlsv1=YES 
rsa_cert_file=/etc/ssl/vsftpd/vsftpd.pem 
rsa_private_key_file=/etc/ssl/vsftpd/vsftpd.pem
ルータで適切なポート転送を設定しました。つまり、ポート21と3000〜3030の範囲のポートがサーバーマシンに転送されます。また、どこからでもサーバーに接続しようとすると、サーバーによって割り当てられたポートが3000〜3030の範囲にあることがわかります(たとえば、上記のメッセージ11 * 256 + 200 = 3016!)。
Response: 234 Proceed with negotiation.任意のResponseか、Requestこの下にの形をしている  \026\003\000\000\...