LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: activeion

着急呀, vsftpd只能用localhost访问, 用IP不行

[复制链接]
发表于 2003-5-20 19:35:19 | 显示全部楼层
你这样测试看看!ftp -a ip
然后到你到/var/log/中看看vsftpd.log
看看,是不是有问题!
 楼主| 发表于 2003-5-20 22:35:57 | 显示全部楼层

ftp 没有-a这个参数

gentoo-jizh root # ftp -a 162.105.51.178
ftp: a: unknown option
gentoo-jizh root #
 楼主| 发表于 2003-5-20 22:39:10 | 显示全部楼层

/var/vsftpd/vsftpd.log

我发现全部是成功登录的localhost。 这怎么解释?


ue May 20 01:16:58 2003 [pid 4372] [ftp] OK LOGIN: Client "127.0.0.1", anon password "NcFTP@"
Tue May 20 00:58:41 2003 [pid 24748] [ftp] OK LOGIN: Client "127.0.0.1", anon password "NcFTP@"
Tue May 20 01:02:55 2003 [pid 24778] [ftp] OK LOGIN: Client "127.0.0.1", anon password "NcFTP@"
Tue May 20 18:38:32 2003 [pid 28994] [ftp] OK LOGIN: Client "127.0.0.1", anon password "NcFTP@"
Tue May 20 18:41:40 2003 [pid 29012] [ftp] OK LOGIN: Client "127.0.0.1", anon password "NcFTP@"
发表于 2003-5-20 22:42:48 | 显示全部楼层
我已经发过一次了,这个问题是防火墙导致的,关了或者设一下就行了,用默认的配置就能上。
 楼主| 发表于 2003-5-20 23:52:06 | 显示全部楼层

好像不是亚, 大侠再看看?

ipchain和iptable我都没有安装。ps也没有发现这些进程

gentoo-jizh init.d # rc-update del ipchain
* ipchain not found in runlevel boot; skipping
* ipchain not found in runlevel default; skipping
* ipchain not found in runlevel nonetwork; skipping
* Caching service dependencies...                          [ ok ]
* rc-update complete.
gentoo-jizh init.d # rc-update del iptable
* iptable not found in runlevel boot; skipping
* iptable not found in runlevel default; skipping
* iptable not found in runlevel nonetwork; skipping
* Caching service dependencies...                          [ ok ]
* rc-update complete.
gentoo-jizh init.d # rc-update del ipchains
* ipchains not found in runlevel boot; skipping
* ipchains not found in runlevel default; skipping
* ipchains not found in runlevel nonetwork; skipping
* Caching service dependencies...                          [ ok ]
* rc-update complete.
gentoo-jizh init.d # ps auxx |grep ipchain
root     17521  0.0  0.2  4224  668 pts/2    R    23:32   0:00 grep ipchain
发表于 2003-5-21 03:30:32 | 显示全部楼层
我想一定是你的防火墙的问题
你把防火墙设置为none看看可不可以
 楼主| 发表于 2003-5-21 09:19:53 | 显示全部楼层

防火墙还有别的软件么?(除了iptables, ipchain)

我应该如何设置为none?
谢谢指教
发表于 2003-5-21 09:42:18 | 显示全部楼层

VSFTPD的建议

1. 检查你的IP地址是否可以ping通,如果不通,用ifconfig配置网卡
2. 添加DNS系统,为了通过域名访问FTP
3. 建议安装RH9,问题比较好解决
 楼主| 发表于 2003-5-21 09:52:33 | 显示全部楼层

哈哈, 终于让我找到答案了

太不容易了。在gentoo的论坛上(forums.gentoo.org)

修改/etc/xinetd.conf让xinetd在各个interface监听(包括eth0和lo)
问题就解决了

谢谢大家了
发表于 2003-5-21 23:53:40 | 显示全部楼层
这样改不好 ,它会影响到xinet支持的其他服务,
你应该改/etc/xinetd.d/vsftpd的配置,改成这样:
/etc/xinetd.d/vsftpd
blardG xinetd.d # cat vsftpd
# default: off
# description: Vsftpd is an FTP server, designed to be secure.
# $Header: /home/cvsroot/gentoo-x86/net-ftp/vsftpd/files/vsftpd.xinetd,v 1.2 2002/05/04 03:42:50 woodchip Exp $

service ftp
{
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/sbin/vsftpd
        server_args     = /etc/vsftpd/vsftpd.conf
        log_on_success  += DURATION USERID
        log_on_failure  += USERID
        nice            = 10
        disable         = no
        only_from       = 0.0.0.0
}
blardG xinetd.d #

关键是这一行:
        only_from       = 0.0.0.0
而xinetd.conf应该继续保持为:
xinetd.conf
blardG etc # cat xinetd.conf
# Sample configuration file for xinetd

defaults
{
        only_from      = localhost
        instances      = 60
        log_type       = SYSLOG authpriv info
        log_on_success = HOST PID
        log_on_failure = HOST
        cps            = 25 30
}

includedir /etc/xinetd.d
blardG etc #
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表