FTPのトラブルシューティング

FTPのトラブルシューティング

Virtual Boxにcentos 6.5をインストールしました。プライマリFTPサーバーを構成しようとしています。詳細は次のとおりです。

  1. DVD/Yumからvsftpdをインストールする:ステータス - >成功

  2. テスト目的でファイアウォールを無効にします。

    chkconfig iptables off : successful
    
    service iptables stop : successful
    
  3. また、selinuxを無効モードに設定します。成功

  4. VirtualBoxでNATを介したポート転送ルールを追加しました。

    Rule Protocol Host Port Guest Port
    Ftp  tcp.     2121.     21
    

これで、ローカルユーザーまたは匿名ユーザーに接続しようとすると、毎回他のエラーがたくさん発生します。

また、私のホストコンピュータにFilezilaが表示するログメッセージを追加しました。

-> LocalUserLogFromClient

Status: Disconnected from server
Status: Resolving address of localhost
Status: Connecting to [::1]:2121...
Status: Connection attempt failed with "ECONNREFUSED - Connection refused by
server", trying next address.
Status: Connecting to 127.0.0.1:2121...
Status: Connection established, waiting for welcome message...
Response:   220 Welcome to C6G FTP service.
Command:    AUTH TLS
Response:   530 Please login with USER and PASS.
Command:    AUTH SSL
Response:   530 Please login with USER and PASS.
Status: Insecure server, it does not support FTP over TLS.
Command:    USER FUser1
Response:   331 Please specify the password.
Command:    PASS *****
Error:  Connection timed out after 20 seconds of inactivity
Error:  Could not connect to server

->匿名ユーザーログ

Status: Resolving address of localhost
Status: Connecting to [::1]:2121...
Status: Connection attempt failed with "ECONNREFUSED - Connection refused by
server", trying next address.
Status: Connecting to 127.0.0.1:2121...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
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 (10,0,2,15,88,204).
Command:    LIST
Error:  The data connection could not be established: 10065
Error:  Connection timed out after 20 seconds of inactivity
Error:  Failed to retrieve directory listing

ベストアンサー1

ログには2つの異なる問題が表示されます。

  1. 匿名ユーザーでない場合は、ログインがタイムアウトします。ログインが完了するまで20秒待ってからFTPクライアントが放棄します。これは、特に仮想ユーザーなどを設定しようとすると、サーバーの認証構成が機能しないことを意味します。これに加えて、サーバーでログを作成するのに時間がかかるか、DNS解決を実行できます。

  2. 匿名ユーザーログにNATの問題がある可能性があります。227 Entering Passive Mode (10,0,2,15,88,204).これは、クライアントが10.0.2.15:22732/tcpに接続し、タイムアウトを報告する必要があることを意味します。 FTP接続自体がlocalhostであるため、必ず接続する必要がある奇妙なアドレスです。

(注:最後の2つの数字は、ネットワークバイト順のポート番号の2バイトです。したがって、88×256 + 204 = 22732です。)

おすすめ記事