Vsftpd prompt: No route to host troubleshooting

Source: Internet
Author: User

 

Vsftp cannot be connected. The system prompts No route to host.

Cause: port 21 is not enabled for iptables

[Root @ localhost sysconfig] # iptables -- list

Chain INPUT (policy ACCEPT)

Target prot opt source destination

RH-Firewall-1-INPUT all -- anywhere

 

Chain FORWARD (policy ACCEPT)

Target prot opt source destination

RH-Firewall-1-INPUT all -- 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

ACCEPT icmp -- anywhere icmp any

ACCEPT esp -- anywhere

ACCEPT ah -- anywhere

ACCEPT udp -- anywhere 224.0.0.20.udp dpt: mdns

ACCEPT udp -- anywhere udp dpt: ipp

ACCEPT tcp -- anywhere tcp dpt: ipp

ACCEPT all -- anywhere state RELATED, ESTABLISHED

ACCEPT tcp -- anywhere state NEW tcp dpt: ssh

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

From the above iptables, we can see that the system has not opened port 21.

 

Solution: Modify iptables and open port 21.

Add the following statement to/etc/sysconfig/iptables-config:

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

Restart iptables: service iptables restart.

Solve the problem!

This article is from the "leom_lee" blog

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.