LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-08-2014, 12:55 AM   #1
praveen.amboji
LQ Newbie
 
Registered: Oct 2012
Posts: 10

Rep: Reputation: Disabled
No route to host error while connecting to ftp server


I have two virtual machines running in my virtualbox I have configured
ftp server on machine '1'
the ipaddress of the machine is 10.0.2.15
and the ip of the other machine is 10.0.2.16
i could ping from machine 1 to machine 2 but while connecting to the ftp server the error was "no route to host"
#################Detils of Machine2##################################

[root@ktcl5 ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 08:00:27:C5:3B:06
inet addr:10.0.2.16 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fec5:3b06/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12340 errors:0 dropped:0 overruns:0 frame:0
TX packets:12294 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11892554 (11.3 MiB) TX bytes:2504123 (2.3 MiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:59 errors:0 dropped:0 overruns:0 frame:0
TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5102 (4.9 KiB) TX bytes:5102 (4.9 KiB)

# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

[root@ktcl5 ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.2.0 * 255.255.255.0 U 1 0 0 eth0
default 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
 
Old 01-08-2014, 09:42 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Seems to me the firewall is not accepting connections on port 21 (ftp).
Add a rule before the INPUT reject rule to allow port 21 in.
To make it a bit easier, I suggest you change policy for INPUT to DROP. Then you can remove the "reject" rule and just add new allow rules without needing to bother about the order.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ftp: connect: No route to host dwarf007 Linux - Networking 15 03-22-2013 02:55 PM
Socket: ERROR connecting: No route to host Maitrikkshah Linux - Networking 8 02-27-2012 04:58 AM
FTP server "No Route to Host" KinnowGrower Linux - Server 10 08-05-2008 10:38 PM
FTP No Route to Host JShadow Linux - Networking 2 03-11-2005 02:59 AM
ftp connect: no route to host dominant Linux - Networking 4 09-07-2004 04:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration