电脑软硬件应用网
当前位置: 电脑软硬件应用网 > 电脑学院 > 服务器技术 > 正文
vsftpd 提示:No route to host问题处理
vsftpd 提示:No route to host问题处理
2011-11-15 10:01:10  文/佚名   出处:电脑软硬件应用网   

vsftp 无法连接, 提示No route to host。

问题原因:iptables 未开放21端口

[root@localhost sysconfig]# iptables --list

Chain INPUT (policy ACCEPT)

target prot opt source destination

RH-Firewall-1-INPUT all -- anywhere anywhere

 

Chain FORWARD (policy ACCEPT)

target prot opt source destination

RH-Firewall-1-INPUT all -- anywhere anywhere

 
Chain OUTPUT (policy ACCEPT)

target prot opt source destination

 

Chain RH-Firewall-1-INPUT (2 references)

target prot opt source destination

ACCEPT all -- anywhere anywhere

ACCEPT icmp -- anywhere anywhere icmp any

ACCEPT esp -- anywhere anywhere

ACCEPT ah -- anywhere anywhere

ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns

ACCEPT udp -- anywhere anywhere udp dpt:ipp

ACCEPT tcp -- anywhere anywhere tcp dpt:ipp

ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED

ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh

REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

从上面的iptables 可以看出系统未开放21端口。

 

解决方法: 修改iptables,开放21端口

在/etc/sysconfig/iptables-config 中增加以下语句

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT

然后重启iptables:service iptables restart

问题解决!

  • 上一篇文章:

  • 下一篇文章: 没有了
  • 最新热点 最新推荐 相关阅读
    shell后台定时任务crontab的用法
    linux下查看端口命令
    Linux命令介绍:VI命令应用集锦
    如何在Linux系统中安装系统日志服务
    为Linux MySQL数据库设置磁盘限额
    在Linux操作系统下防范黑客技巧
    从五方面解析Linux防火墙框架
    Linux服务器安装好后如何进行优化?
    Linux系统技巧:Linux中增加软路由的
    详解Linux中增加软路由的方法
    关于45IT | About 45IT | 联系方式 | 版权声明 | 网站导航 |

    Copyright © 2003-2011 45IT. All Rights Reserved 浙ICP备09049068号