centos vsftp:425 failed to establish connection解决办法 (ls,dir等命令不能使用)
2017-03-26 17:05
1141 查看
原文链接:http://houzhiqingjava.blog.163.com/blog/static/16739950720147543625744/
先到CMD或者linux终端用命令行模式ftp命令测试一下,如果能登录,不能使用ls或者dir命令。
那就说明,主要问题在端口被防火墙控住。
提示语句:
200 PORT command successful. Consider using PASV.
425 Failed to establish connection.
vsftp中,通过编辑 /etc/vsftpd/vsftp.conf 实现启用PASV连接。
vi /etc/vsftpd/vsftp.conf
在配置文件中添加下面语句:
pasv_enable=YES
pasv_min_port=6000
pasv_max_port=7000
也即,启动PASV连接模式,开放6000-7000端口号作为数据传送端口。
此外,如果是对外网开放,必须在路由器的转发规则中,开放21端口。
为了保险,可以将6000-7000端口也写入到iptables中白名单中。
命令:
sudo iptables -A INPUT -p tcp --dport 6000:7000 -j ACCEPT
重启vsftpd (service vsftpd restart)
先到CMD或者linux终端用命令行模式ftp命令测试一下,如果能登录,不能使用ls或者dir命令。
那就说明,主要问题在端口被防火墙控住。
提示语句:
200 PORT command successful. Consider using PASV.
425 Failed to establish connection.
vsftp中,通过编辑 /etc/vsftpd/vsftp.conf 实现启用PASV连接。
vi /etc/vsftpd/vsftp.conf
在配置文件中添加下面语句:
pasv_enable=YES
pasv_min_port=6000
pasv_max_port=7000
也即,启动PASV连接模式,开放6000-7000端口号作为数据传送端口。
此外,如果是对外网开放,必须在路由器的转发规则中,开放21端口。
为了保险,可以将6000-7000端口也写入到iptables中白名单中。
命令:
sudo iptables -A INPUT -p tcp --dport 6000:7000 -j ACCEPT
重启vsftpd (service vsftpd restart)
相关文章推荐
- CentOS vsftpd 425 failed to establish connection 解决办法
- vsftp:425 failed to establish connection解决办法
- vsftp报错425 Failed to establish connection
- centos 不能使用命令解决办法
- CentOS中root使用Vi不能高亮显示的解决办法以及TAB补全命令
- Yii “CDbConnection failed to open the DB connection: could not find driver"解决办法
- 连接oracle报错“ORA-28547:connection to server failed,probable Oracle Net admin 解决办法
- 为DB2 新增加的用户不能直接使用db2命令的解决办法
- 端口错误安卓模拟器不能启动:The connection to adb is down, and a severe error has occurred的解决办法
- 为什么我的电脑在cmd中不能直接使用命令的解决办法
- Launch error: Failed to connect to remote VM. Connection refused.的解决办法
- android中使用代码混淆出现Conversion to Dalvik format failed with error 1错误的解决办法
- android中使用代码混淆出现Conversion to Dalvik format failed with error 1错误的解决办法
- 使用ProGuard遇到“conversion to Dalvik format failed with error 1”错误的解决办法
- 安卓模拟器不能启动:The connection to adb is down, and a severe error has occurred的解决办法
- 解决ADB启动问题(Failed to initialize Monitor Thread: Unable to establish loopback connection)
- [Android]使用ProGuard遇到“conversion to Dalvik format failed with error 1”错误的解决办法
- Yii “CDbConnection failed to open the DB connection: could not find driver"解决办法
- 使用ProGuard遇到“conversion to Dalvik format failed with error 1”错误的解决办法
- Win7 使用virtualbox安装centos虚拟机出现“不能为虚拟电脑 centos7 打开一个新任务.”的解决办法。