When setting up FTP server on Redhat 7 Linux box the following error message ftp: connect: No route to host may pop-up during FTP client session:
ftp server error client rhel7 ftp: connect: No route to host

230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (10,1,1,110,138,70).
ftp: connect: No route to host
The cause of the above error is a missing ip_conntrack_ftp kernel module. Quick fix solution is to load this module using modprobe:
# modprobe ip_conntrack_ftp
However, you will need to do this every time you reboot your RedHat server. Thus as a more permanent solution you can persistently load this module after each reboot by creating executable shell script within /etc/sysconfig/modules/ directory. Create file /etc/sysconfig/modules/iptables.modules with the following content:
exec /sbin/modprobe ip_conntrack_ftp >/dev/null 2>&1
Once you save this file you also need to make it executable:
# chmod +x /etc/sysconfig/modules/iptables.modules
The above script will load the following modules after each reboot:
[root@rhel7 ~]# lsmod | grep ftp
nf_conntrack_ftp       18638  0 
nf_conntrack          101024  9 nf_nat,nf_nat_ipv4,nf_nat_ipv6,xt_conntrack,ip6table_nat,nf_conntrack_ftp,iptable_nat,nf_conntrack_ipv4,nf_conntrack_ipv6
FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in:

Comments and Discussions