wget と ftp パッシブモード

wget と ftp パッシブモード

私がする時wget ftp://x.x.x.x:myport/a.jpg

--date time--  ftp://x.x.x.x:myport/a.jpg
           => ‘a.jpg’
Connecting to x.x.x.x:myport... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD not needed.
==> SIZE a.jpg ... 982159
==> PASV ... 

その後、wgetは「フリーズ」し、しばらくすると継続します

==> PASV ... couldn't connect to x.x.x.x port myport: Connection timed out
Retrying.

質問は、このエラー/動作をどのように修正するかです。Firefox と curl からは正常にファイルをダウンロードできるので、サーバーの障害ではないはずです。サーバーはパッシブ FTP モードを使用しています。サーバーは Windows を実行しています。

私の/etc/wgetrc

passive_ftp = on

経由で接続する場合にも奇妙な動作が発生しますftp。ログインはできますが、コマンドを送信すると と表示され227 Entering Passive Mode、フリーズします。

私のcurlログ

     0* Connected to x.x.x.x (x.x.x.x) port myport (#0)
< 220 Microsoft FTP Service
> USER anonymous
< 331 Anonymous access allowed, send identity (e-mail name) as password.
> PASS [email protected]
< 230 User logged in.
> PWD
< 257 "/" is current directory.
* Entry path is '/'
* Request has same path as previous transfer
> EPSV
* Connect data stream passively
* ftp_perform ends with SECONDARY: 0
< 229 Entering Extended Passive Mode (|||dataport|)
*   Trying x.x.x.x:dataport...
* Connecting to x.x.x.x (x.x.x.x) port dataport
* Connected to x.x.x.x (x.x.x.x) port myport (#0)
> TYPE I
< 200 Type set to I.
> SIZE a.jpg
< 213 982159
> RETR a.jpg
< 125 Data connection already open; Transfer starting.
* Maxdownload = -1
* Getting file with size: 982159
{ [1460 bytes data]
 33  959k   33  320k    0     0   984k      0 --:--:-- --:--:-- --:--:--  981k* Remembering we are in dir ""
< 226 Transfer complete.
100  959k  100  959k    0     0  1759k      0 --:--:-- --:--:-- --:--:-- 1756k
* Connection #0 to host x.x.x.x left intact

答え1

結局、いくつかのデータ ポートがルータから転送されていませんでした。

関連情報