vsftpでpasvモードでの接続設定

vsftpの設定

#vi /etc/vsftpd/vsftpd.conf
#pasvモードの使用ポート範囲設定
pasv_min_port=50000
pasv_max_port=50030

pasv_enable=YES
にすると書いてるとこもあるがデフォルトでYESなので記載しなくてもOK
pasv_promiscuous=NO
pasvを有効にするためにYESにすると書いてるサイトがあったがVSFTPD.CONFのサイトでは以下の記載

pasv_promiscuous
Set to YES if you want to disable the PASV security check that ensures the data connection originates from the same IP address as the control connection. Only enable if you know what you are doing! The only legitimate use for this is in some form of secure tunnelling scheme, or perhaps to facilitate FXP support.

https://security.appspot.com/vsftpd/vsftpd_conf.html

セキュリティを無効にするにはとかなんとか。
デフォルトのままで。

リストコマンドで一覧が取得できない。

ファイヤウォール=iptablesの設定が問題。
ポートは20、21はすでに空けてるんだがftp用のモジュールを利用する必要があるらしい。

#vi /etc/sysconfig/iptables-config 
IPTABLES_MODULES="ip_conntrack_netbios_ns ip_conntrack_ftp ip_nat_ftp"