Я устраняю проблему с соединением ftp от определенного клиента к серверу. Установить его в пассивный режим, к сожалению, не вариант. Я использую ncftp в режиме отладки для проверки соединения.
[myself@newqa ~]$ ncftp
NcFTP 3.2.4 (Apr 07, 2010) by Mike Gleason (http://www.NcFTP.com/contact/).
ncftp> debug
ncftp> passive
> passive
passive on
ncftp> passive
> passive
passive off
ncftp> open -u ftpuser my.server.com
> open -u ftpuser my.server.com
LibNcFTP 3.2.4 (April 3, 2010) compiled for linux-x86_64-glibc2.12
Uname: Linux|my.client.com|2.6.32-279.19.1.el6.x86_64|#1 SMP Sat Nov 24 14:35:28 EST 2012|x86_64
Contents of /etc/redhat-release:
Red Hat Enterprise Linux Server release 6.3 (Santiago)
Contents of /etc/issue:
Red Hat Enterprise Linux Server release 6.3 (Santiago)
Kernel \r on an \m
Glibc: 2.12 (stable)
Hello, dear user!
220: Hello, dear user!
Connected to 12.34.56.78.
Cmd: USER ftpuser
Password requested by 12.34.56.78 for user "ftpuser".
Please specify the password.
Password: ***********
331: Please specify the password.
Cmd: PASS xxxxxxxx
Login successful.
230: Login successful.
Cmd: PWD
257: "/"
Logged in to 12.34.56.78 as username.
Cmd: FEAT
211: Features:
EPRT
EPSV
MDTM
PASV
REST STREAM
SIZE
TVFS
End
Cmd: HELP SITE
214: The following commands are recognized.
ABOR ACCT ALLO APPE CDUP CWD DELE EPRT EPSV FEAT HELP LIST MDTM MKD
MODE NLST NOOP OPTS PASS PASV PORT PWD QUIT REIN REST RETR RMD RNFR
RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD
XPWD XRMD
Help OK.
Logged in to www.server.com.
Cmd: CLNT NcFTP 3.2.4 linux-x86_64-glibc2.12
500: Unknown command.
ncftp / > dir
> dir
Cmd: PORT 10,36,219,101,167,190
Could not read reply from control connection -- timed out.
Could not read reply from control connection -- timed out.
List failed.
Машина размещена в Amazon, и брандмауэр настроен на пропуск всех входящих TCP-трафика с ip моего сервера на клиент.
iptables отключен в клиенте
[root@newqa ~]# /etc/init.d/iptables status
iptables: Firewall is not running.
selinux отключен в клиенте
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
Вот что происходит, когда я пытаюсь сделать то же самое с клиентом, который находится в другой сети:
Logged in to my.server.com.
Cmd: CLNT NcFTP 3.2.5 linux-x86-glibc2.15
500: Unknown command.
ncftp / > dir
> dir
Cmd: PORT 192,168,1,36,221,20
200: PORT command successful. Consider using PASV.
Cmd: LIST
150: Here comes the directory listing.
226: Directory send OK.
Remote listing contents {
drwxr-xr-x 2 ftp ftp 4096 May 02 2013 bin
drwxr-xr-x 2 ftp ftp 4096 May 02 2013 dev
drwxr-xr-x 2 ftp ftp 4096 May 02 2013 etc
drwxr-xr-x 3 ftp ftp 4096 Mar 18 06:05 incoming
drwxr-xr-x 2 ftp ftp 4096 May 02 2013 lib
drwxr-xr-x 2 ftp ftp 4096 May 02 2013 lib64
drwxr-xr-x 5 ftp ftp 4096 May 02 2013 usr
}
drwxr-xr-x 2 ftp ftp 4096 May 2 2013 bin
drwxr-xr-x 2 ftp ftp 4096 May 2 2013 bin
drwxr-xr-x 2 ftp ftp 4096 May 2 2013 dev
drwxr-xr-x 2 ftp ftp 4096 May 2 2013 dev
drwxr-xr-x 2 ftp ftp 4096 May 2 2013 etc
drwxr-xr-x 2 ftp ftp 4096 May 2 2013 etc
drwxr-xr-x 3 ftp ftp 4096 Mar 18 06:05 incoming
drwxr-xr-x 3 ftp ftp 4096 Mar 18 06:05 incoming
drwxr-xr-x 2 ftp ftp 4096 May 2 2013 lib
drwxr-xr-x 2 ftp ftp 4096 May 2 2013 lib
drwxr-xr-x 2 ftp ftp 4096 May 2 2013 lib64
drwxr-xr-x 2 ftp ftp 4096 May 2 2013 lib64
drwxr-xr-x 5 ftp ftp 4096 May 2 2013 usr
drwxr-xr-x 5 ftp ftp 4096 May 2 2013 usr
Не знаете, где продолжить устранение неполадок, какие-либо предложения?
Спасибо,