質問: ftp illegal portコマンド ssl/tlsを使用するようにproftpdを設定しました。接続しようとすると、「無効なportコマンド」が表示されますfinding host xxx.nl ... connecting to xxx.xxx.xxx.xxx:21 connected to xxx.xxx.xxx.xxx:21 in 0.018001 seconds, waiting for server response initializing ssl session ... 220 ftp server ready. auth tls 234 auth tls successful ssl session not set for reuse ssl session started. host type (1): auto user xxx 331 password required for xxx pass (hidden) 230 user xxx logged in syst 215 unix type: l8 host type (2): unix (standard) pbsz 0 200 pbsz 0 successful prot p 200 protection set to private pwd 257 "/" is the current directory cwd /var/www/html/ 250 cwd command successful pwd257 "/var/www/html/" is the current directory type a 200 type set to a port 192,168,192,14,211,181 500 illegal port command port failed 500 illegal port command pasv 227 entering passive mode (xxx,xxx,xxx,xxx,160,151). connecting data channel to xxx.xxx.xxx.xxx:160,151(41111) failed to connect data channel to xxx.xxx.xxx.xxx:160,151(41111) iptables:chain input (policy accept) target prot opt source destination accept icmp -- anywhere anywhere /* 000 accept all icmp */ accept all -- anywhere anywhere /* 001 accept all to lo interface */ reject all -- anywhere loopback/8 /* 002 reject local traffic not on loopback interface */ reject-with icmp-port-unreachable accept all -- anywhere anywhere /* 003 accept all to eth1 interface */ accept all -- anywhere anywhere /* 004 accept related established rules */ state related,established accept tcp -- anywhere anywhere multiport ports ftp /* 021 allow ftp. */ accept tcp -- anywhere anywhere multiport ports ssh /* 022 allow ssh. */ accept tcp -- anywhere anywhere multiport ports smtp /* 025 allow smtp. */ accept tcp -- anywhere anywhere multiport ports pharos /* 051 allow rundeck. */ accept tcp -- anywhere anywhere multiport ports 8140 /* 814 allow puppetserver. */ accept tcp -- anywhere anywhere multiport ports http /* 080 allow http. */ accept tcp -- anywhere anywhere multiport ports https /* 443 allow https. */ drop all -- anywhere anywhere /* 999 drop all */ chain forward (policy accept) target prot opt source destination chain output (policy accept) target prot opt source destination 通常のftp経由での接続は問題なく動作します...私はftp_authssl // xxx.nl /でws_ftpを使用しています...他のいくつかの接続オプション、ポートなどを試しましたが、すべて同じエラーが発生しました。あるいは、時々最初のディレクトリリストが表示されるようです(しかし、それはws_ftpのキャッシュかもしれません)
回答: これは私にとってうまくいきました:vsftpd.confに以下の行を追加する必要があります。私はこの答えを見つけるために何日も費やしましたlisten=yes #listen_ipv6=yes vsftpd.conf内のコメント化されていないすべての項目の下listen=yes anonymous_enable=no local_enable=yes write_enable=yes dirmessage_enable=yes use_localtime=yes xferlog_enable=yes connect_from_port_20=yes secure_chroot_dir=/var/run/vsftpd/empty pam_service_name=vsftpd rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key ssl_enable=no pasv_enable=yes pasv_min_port=1024 pasv_max_port=1048 port_enable=yes pasv_address=put your public ip address here (e.g. 18.236.105.3)