ftpとnat

Last-modified: 2006-09-23 (土) 19:39:08

passiveパケットのアドレス+ポートは変換しなくてよい?
http://www.rtpro.yamaha.co.jp/RT/FAQ/TCPIP/ftp-passive-mode.html
http://www.rtpro.yamaha.co.jp/RT/FAQ/index.html

EPSVコマンドのアドレスは変更しない
http://www5d.biglobe.ne.jp/~stssk/rfc/rfc2428j.html

FTPにはパッシブモードと言うのがあってIEもFireFoxもパッシブモードを使用していた。が、その中でもEPSVコマンドがFireFoxには無かった。EPSVコマンドは簡単に言えばパッシブモードにおいてデータ転送用のポートを20番に固定するもの。

EPSVについてはRFC2428参照。

vsftpdはEPSVをサポート
vsFTPDですが、MDTMとSITEコマンドに対応しているようです。
以下の手順で確認できます。
[root@linux root]# telnet localhost ftp ← telnetでFTPサーバへ接続
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 (vsFTPd 1.2.1)
user ユーザ名 ← ユーザ名応答
331 Please specify the password.
pass パスワード ← パスワード応答
230 Login successful.
help ← helpコマンド応答
以下がvsFTPDが対応しているコマンド
214-The following commands are recognized.
ABOR ACCT ALLO APPE CDUP CWD DELE EPRT EPSV FEAT HELP LIST MDTM MKD
MODE NLST NOOP OPTS PASS PASV PORT PWD QUIT REIN REST RETR RMD RNFR
RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD
XPWD XRMD
214 Help OK.

RFC959 [STD 9] "FILE TRANSFER PROTOCOL (FTP)" (Standard)
http://jbpe.tripod.com/rfcj/rfc-959.ej.sjis.txt
FTP 標準。これが基本 [*]

RFC1123 [STD 3] "Requirements for Internet Hosts -- Application and Support" (Standard)
4.1 にRFC959 を補完する情報あり [*]
http://jbpe.tripod.com/rfcj/rfc1123.j.sjis.txt

RFC1127 "A Perspective on the Host Requirements RFCs"
Host Requirements RFCs に関する議論のサマリ (FTP に関する記述あり)

RFC1579 "Firewall-Friendly FTP" (Informational)
Firewall 越えて使うなら PASV だ、という話
http://www.ipa.go.jp/security/rfc/RFC1579JA.html

RFC1635 [FYI24] "How to Use Anonymous FTP" (Informational)
初心者のための FTP (Anonymous FTP) のガイド [*]
RFC2228 "FTP Security Extensions" (Standards Track)
FTP のセキュリティの強化を行なうもの
RFC2389 "Feature negotiation mechanism for the File Transfer Protocol" (Standards Track)
FTP のどの機能拡張を実装しているかを negotiation するための「FEAT」

RFC2428 "FTP Extensions for IPv6 and NATs" (Standards Track)
IPv6 や NAT に関する拡張
http://www5d.biglobe.ne.jp/~stssk/rfc/rfc2428j.html

RFC 2577 "FTP Security Considerations" (Informational)
FTP のセキュリティ面での実装の上での考察
RFC 2640 "Internationalization of the File Transfer Protocol" (Proposed Standard)
7 bit US-ASCII だけじゃなく UTF-8 も使えるようにする