Problem Description: the FTP client implemented by Java reports an error when it is connected to no route to host
Through the ping command to test the network, you can access
Through the Yun install – y FTP installation client test, it also returns no route to host
Turn off the server firewall, and the test can be accessed
The reason is said to be that IPtable doesn’t preset the part of NAT processing
solution:
1、
In the/etc/sysconfig/iptables config file
Change iptables_ Modules = “is iptables_ MODULES=”ip_ nat_ ftp ip_ conntrack_ ftp”
Restart iptables service
2、
Direct loading module
modprobe ip_ nat_ ftp
modprobe ip_ conntrack_ ftp
With the above settings, it doesn’t work
The modprobe – L | grep FTP command can not be used in CentOS 7 system, but lsmod | grep FTP is used instead
Finally, through modifying the firewall rules, the following two rules are added:
-I INPUT -s 10.50.0.6 -p tcp -m tcp –dport 21 -j ACCEPT
-I INPUT -s 10.50.0.6 -p tcp -m tcp –dport 20 -j ACCEPT
In the/etc/sysconfig/iptables file
Similar Posts:
- [Solved] MYSQL ERROR 2003 (HY000): can’t connect to MySQL server (10060)
- How to Solve Linux:No route to host
- Docker run error: docker0: iptables: No chain/target/match by that name.
- Zabbix-server Error: No route to host [How to Solve]
- [SVC] Online Iptables Restart error: Couldn’t load target `ACCET’:/lib64/xtables/libipt_ACCET.so: cannot open shared object file: No such file or directory
- [Solved] CentOS 7.2 Startup Error: Failed to start IPv4 firewall with iptables
- Remote connection with Navicat mysql:Can ‘t connect to MySQL server (10060)
- [Solved] SQLSTATE[HY000] [2003] Can’t connect to MySQL serv
- Driver failed programming external connectivity on endpoint query_allen
- [Solved] RPC mount export: RPC: Unable to receive; errno = No route to host