Настройки vstfpd.conf
Код: Выделить всё
listen=YES
anonymous_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
pasv_enable=YES
pasv_max_port=30100
pasv_min_port=30000
log_ftp_protocol=YESПроблема в том, что до фтп с внешки получается достучаться только когда на машину пробрасываю порты 1024-65536 (на фтп можно зайти anonymous'ом как консольным ftp так и firefox'ом). Пробрасываю на роуторе только порты 30000-30100 и начинаются фокусы. Консольный ftp заходит, но перестает передавать данные
Код: Выделить всё
user@localhost:~$ ftp -pd somehost.org
Connected to somehost.org.
220 (vsFTPd 2.2.0)
ftp: setsockopt: Bad file descriptor
Name (somehost.org:user): ftp
---> USER ftp
331 Please specify the password.
Password:
---> PASS XXXX
230 Login successful.
---> SYST
215 UNIX Type: L8
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
ftp: setsockopt (ignored): Permission denied
---> PASV
227 Entering Passive Mode (xx,xx,xx,xx,236,203)
ftp: connect: Connection timed out
ftp>в логах сервера смотрим:
Код: Выделить всё
Sat Dec 26 18:19:37 2009 [pid 2] CONNECT: Client "xx.xx.xx.xx"
Sat Dec 26 18:19:37 2009 [pid 2] FTP response: Client "xx.xx.xx.xx", "220 (vsFTPd 2.2.0)"
Sat Dec 26 18:19:40 2009 [pid 2] FTP command: Client "xx.xx.xx.xx", "USER ftp"
Sat Dec 26 18:19:40 2009 [pid 2] [ftp] FTP response: Client "xx.xx.xx.xx", "331 Please specify the password."
Sat Dec 26 18:19:42 2009 [pid 2] [ftp] FTP command: Client "xx.xx.xx.xx", "PASS <password>"
Sat Dec 26 18:19:42 2009 [pid 1] [ftp] OK LOGIN: Client "xx.xx.xx.xx", anon password "l"
Sat Dec 26 18:19:42 2009 [pid 3] [ftp] FTP response: Client "xx.xx.xx.xx", "230 Login successful."
Sat Dec 26 18:19:42 2009 [pid 3] [ftp] FTP command: Client "xx.xx.xx.xx", "SYST"
Sat Dec 26 18:19:42 2009 [pid 3] [ftp] FTP response: Client "xx.xx.xx.xx", "215 UNIX Type: L8"
Sat Dec 26 18:19:45 2009 [pid 3] [ftp] FTP command: Client "xx.xx.xx.xx", "PASV"
Sat Dec 26 18:19:45 2009 [pid 3] [ftp] FTP response: Client "xx.xx.xx.xx", "227 Entering Passive Mode (xx,xx,xx,xx,117,107)."
Sat Dec 26 18:24:45 2009 [pid 3] [ftp] FTP response: Client "xx.xx.xx.xx", "421 Timeout."Почему почему клиент обращается к порту 60619 (236*256+203) в то время как сервер слушает 30059?