EC2
$ cat /etc/system-release
Amazon Linux AMI release 2018.03
$ uname -r
4.14.165-103.209.amzn1.x86_64
$ sudo yum -y install vsftpd
- Passive モードの設定
- 当たり前だが pasv_address を設定しても ftp サーバから見た相手は NLB
$ vi /etc/vsftpd/vsftpd.conf
pasv_enable=YES
pasv_min_port=60000
pasv_max_port=60003
$ adduser ftpuser
$ passwd ftpuser
$ service vsftpd start
$ chkconfig vsftpd on
$ brew install ncftp
$ dd if=/dev/random of=test.dat bs=1m count=512
$ vi ~/.ncftp/firewall
passive=on
$ ncftp -u ftpuser -p ****** FTPNLB-******.elb.ap-northeast-1.amazonaws.com
NcFTP 3.2.6 (Dec 04, 2016) by Mike Gleason (http://www.NcFTP.com/contact/).
Connecting to 172.17.4.211...
(vsFTPd 2.2.2)
Logging in...
Login successful.
Logged in to FTPNLB-******.elb.ap-northeast-1.amazonaws.com.
ncftp /home/ftpuser > passive
passive on
ncftp /home/ftpuser > put test.dat
test.dat: