Tuesday, October 8, 2019

The data connection could not be established: EHOSTUNREACH - No route to host

Error: The data connection could not be established: EHOSTUNREACH - No route to host

Just do these few steps:

1. Add these rules to your iptables configuration:

$ iptables -A INPUT -p tcp --dport 21 -j ACCEPT
$ iptables -A OUTPUT -p tcp --sport 20 -j ACCEPT

2. To support passive mode FTP, then, you need to load the ip_conntrack_ftp module on boot. Uncomment and modify the IPTABLES_MODULES line in the /etc/sysconfig/iptables-config file to read:

$ IPTABLES_MODULES="ip_conntrack_ftp"

3. Save the iptables config and restart iptables.

$ service iptables save
$ service iptables restart



0 comments: