ftp: bind: Address already in use

903 views
Skip to first unread message

潘多

unread,
Mar 30, 2010, 6:23:36 AM3/30/10
to 西邮Linux兴趣小组
在网上找了一下,没有搜到有效的方法,在终端下通过ftp 222.24.22.151登入就会出现如下的问题,而用lftp 或者在浏览器中都很正常。(都是匿名登入)
Name (222.24.22.151:h): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/"
ftp> ls
500 Illegal PORT command.
ftp: bind: Address already in use
ftp> cd pub
250 Directory successfully changed.
ftp> ls
500 Illegal PORT command.
ftp> pwd
257 "/pub"
ftp>
  配置文件如下
[root@xy:~ ] & grep -v "#" /etc/vsftpd/vsftpd.conf
banner_file=/etc/vsftpd/welcome.txt
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=linux
xferlog_std_format=YES
data_connection_timeout=120
ascii_upload_enable=YES
ascii_download_enable=YES
ftpd_banner=Welcome to blah FTP service.
listen=YES

pam_service_name=vsftpd
userlist_enable=YES
banner_file=/etc/vsftpd/welcome.txt
tcp_wrappers=YES
[root@xy:~ ] &

Américo Wang

unread,
Apr 1, 2010, 2:38:50 AM4/1/10
to 潘多, 西邮Linux兴趣小组
2010/3/30 潘多 <duo...@gmail.com>:

你好像并没有使用passive模式。。。
你确定不是防火墙的问题?如果不是,试试关闭tcp_wrappers一项。

潘多

unread,
Apr 1, 2010, 8:48:21 AM4/1/10
to Américo Wang, 西邮Linux兴趣小组
改用被动模式
pasv_enable=YES

pasv_min_port=250

pasv_max_port=300
 关掉tcp_wrappers
都不行,但是用 lftp就很正常。

潘多

unread,
Apr 1, 2010, 10:28:47 PM4/1/10
to Américo Wang, 西邮Linux兴趣小组

刚才在教学楼可以用 ftp 正常登入,教学楼和ftp服务器在一个网段内,而在实验室的192.168.200.0用ftp登入仍然显示ftp: bind: Address already in use,但是,用lftp就没有任何问题。已经采用服务器的被动模式。

刘小虎

unread,
Apr 2, 2010, 2:16:09 AM4/2/10
to 潘多, Américo Wang, 西邮Linux兴趣小组

 

刚才在教学楼可以用 ftp 正常登入,教学楼和ftp服务器在一个网段内,而在实验室的192.168.200.0用ftp登入仍然显示ftp: bind: Address already in use,但是,用lftp就没有任何问题。已经采用服务器的被动模式。

 

好像没问题啊,我这里192.168.200.115
直接ftp 222.24.22.151
 
Connecting to 222.24.22.151:21...
Connection established.
Escape character is '^@]'.
220-******************************************************************
220-
220-
220-  welcome to xiyoulinux vsftpd
220- 
220-     This account you can only use it to download some
220-
220-      rescourse about your linux-study !
220- 
220-  
220-    thank you for your attention!
220-
220-      xiyoulinux.10.3.27
220-
220-
220-
220-******************************************************************

--
人生就像蜡烛一样,从顶燃到底,都应该是光明的。

潘多

unread,
Apr 2, 2010, 3:00:31 AM4/2/10
to 刘小虎, Américo Wang, 西邮Linux兴趣小组
能用ls看资源么

--
人生就像蜡烛一样,从顶燃到底,都应该是光明的。

刘小虎

unread,
Apr 2, 2010, 7:56:33 AM4/2/10
to 潘多, Américo Wang, 西邮Linux兴趣小组

 
 
能用ls看资源么
 
   得输入 passive on 才可以       这个就是关于ftp的主被动模式问题.............

--
人生就像蜡烛一样,从顶燃到底,都应该是光明的。


Américo Wang

unread,
Apr 2, 2010, 11:03:33 AM4/2/10
to 潘多, Américo Wang, 西邮Linux兴趣小组


vsftpd的相关日志里有什么?

--
Live like a child, think like the god.

李磊

unread,
Apr 2, 2010, 12:44:15 PM4/2/10
to 潘多, 西邮Linux兴趣小组
ftp -p 
have a try
 

--
要退订此论坛请发邮件至 xiyoulinux-...@googlegroups.com
更多选项: http://groups.google.com/group/xiyoulinux?hl=zh-CN
提问前建议您阅读:http://www.xiyoulinux.cn/blog/?p=64
也请查看我们的FAQ:http://xiyoulinux.cn/wiki/index.php?title=FAQ
 
To unsubscribe from this group, send email to xiyoulinux+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.



--
自伞自度,自性自度,求人不如求己!

www.rhlei.org

潘多

unread,
Apr 2, 2010, 8:46:27 PM4/2/10
to Américo Wang, 西邮Linux兴趣小组
 实验室是192.168.200.0的私有ip段,日志里面只是表明了222.24.22.235登入的信息,刚才在服务器上用iptables转发了一下,看看你们可以访问不。由于是才学ftp,安全方面还没有考虑全面,希望学长在闲暇时指导一下。由于是实验室的实验服务器,对匿名用户开了很大的权限。这里告诉那个服务器的一个普通用户;
sername: linux   password:linux
需要root用户的话可以单独发邮件。

monan

unread,
Apr 1, 2010, 6:40:33 AM4/1/10
to 潘多, 西邮Linux兴趣小组
On 03/30/2010 06:23 PM, �˶� wrote:
> ����������һ�£�û���ѵ���Ч�ķ��������ն���ͨ��ftp 222.24.22.151����
> �ͻ�������µ����⣬����lftp ������������ж����������������룩

> Name (222.24.22.151:h): ftp
> 331 Please specify the password.
> Password:
> 230 Login successful.
> Remote system type is UNIX.
> Using binary mode to transfer files.
> ftp> pwd
> 257 "/"
> ftp> ls
> 500 Illegal PORT command.
> ftp: bind: Address already in use
> ftp> cd pub
> 250 Directory successfully changed.
> ftp> ls
> 500 Illegal PORT command.
> ftp> pwd
> 257 "/pub"
> ftp>
> ���������

> [root@xy:~ ] & grep -v "#" /etc/vsftpd/vsftpd.conf
> banner_file=/etc/vsftpd/welcome.txt
> anonymous_enable=YES
> local_enable=YES
> write_enable=YES
> local_umask=022
> anon_upload_enable=YES
> anon_mkdir_write_enable=YES
> dirmessage_enable=YES
> xferlog_enable=YES
> connect_from_port_20=YES
> chown_uploads=YES
> chown_username=linux
> xferlog_std_format=YES
> data_connection_timeout=120
> ascii_upload_enable=YES
> ascii_download_enable=YES
> ftpd_banner=Welcome to blah FTP service.
> listen=YES
>
> pam_service_name=vsftpd
> userlist_enable=YES
> banner_file=/etc/vsftpd/welcome.txt
> tcp_wrappers=YES
> [root@xy:~ ] &
>
> --
> Ҫ�˶�����̳�뷢�ʼ��� xiyoulinux-...@googlegroups.com
> ���ѡ� http://groups.google.com/group/xiyoulinux?hl=zh-CN
> ����ǰ�������Ķ���http://www.xiyoulinux.cn/blog/?p=64
> Ҳ��鿴���ǵ�FAQ��http://xiyoulinux.cn/wiki/index.php?title=FAQ

>
> To unsubscribe from this group, send email to
> xiyoulinux+unsubscribegooglegroups.com or reply to this email with the
> words "REMOVE ME" as the subject.
passive
Reply all
Reply to author
Forward
0 new messages