Я недавно установил vsftpd в соответствии с этим руководством: http://www.krizna.com/ubuntu/setup-ftp-server-on-ubuntu-14-04-vsftpd/ . Я могу войти на ftp, но после этого я получаю следующие результаты от FileZilla:
Answer: 230 Login successful.
Commando: OPTS UTF8 ON
Answer: 200 Always in UTF8 mode.
Status: Connected
Status: Folder list
Commando: PWD
Answer: 257 "/"
Commando: TYPE I
Answer: 200 Switching to Binary mode.
Commando: PASV
Answer: 227 Entering Passive Mode (192,168,000,00,000,000). (I replaced the 0's)
Status: Server generated a passive answer with an untracable address. Uses the serveraddress instead
Commando: LIST
Error: Connection lost
Error: Receiving folder list failed
(я перевел выше)
В /etc/vsftpd.conf
у меня есть следующие закомментированные строки :
listen=YES
anonymouse_enable=NO
local_enable=YES
write_enable=YES
local_unmask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
chroot_local_user=YES (line #120)
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
allow_writeable_chroot=YES
ssl_ciphers=HIGH
pasv_enable=YES
pasv_max_port=40000
pasv_min_port=40100
Я также перенаправил следующие порты на сервер:
80 protocol both: TCP UDP
21 protocol both: TCP UDP
22 protocol both: TCP UDP
Я также сделал 22, потому что я установил openssh
Я надеюсь, что кто-то может помочь мне понять, почему я получаю это сообщение об ошибке. Заранее спасибо
Вероятно, необходимо открыть пассивные порты
iptables -I INPUT -p tcp --destination-port 40000:40100 -j ACCEPT
Тогда
service iptables save