Ubuntu伺服器14.04 vsftpd連線問題

Ubuntu伺服器14.04 vsftpd連線問題

我最近根據本教程安裝了 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

我希望有人能幫助我弄清楚為什麼我會收到該錯誤訊息。先致謝

答案1

您可能需要打開被動端口

iptables -I INPUT -p tcp --destination-port 40000:40100 -j ACCEPT

然後

service iptables save

相關內容