nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

No route to host

This is a discussion on No route to host within the Linux hardware forums, part of the Linux Getting Started category; Hi May be i m a new to this i m trying to connect through putty to my linux machine ...

Register free or login to your existing account and remove all advertisements.


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux hardware

Linux answers from nixCraft.


Linux hardware Discussion about Linux hardware related problems.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-04-2007, 10:39 AM
Junior Member
User
 
Join Date: Sep 2007
OS: Debian
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
csvinayak is on a distinguished road
Default No route to host

Hi

May be i m a new to this

i m trying to connect through putty to my linux machine running on the VM ware , i get an erro "no route to host "
my Vmware settings "Ethernet - Bridged
Network connection is Bridged -Connected directly to physical network

when i run the cmd ifconfig-a my i.p is "16.138.59.189"

while i try to ping i get a response , but can't putty to it

pls advise
Reply With Quote
  #2 (permalink)  
Old 09-04-2007, 09:21 PM
Junior Member
User
 
Join Date: Sep 2007
Location: Mumbai
OS: Redhat/Solaris
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
amsreeku is on a distinguished road
Default No route to host

Even though if u have assigned ip to your linux machine it is not enough to connect to your linux machine, means through which port are you connecting to the machine that particular service has to be enabled.

For example if you are trying to connect through 22 port the you have to enable ssh service in your linux machine.
__________________
Shrikumar
Reply With Quote
  #3 (permalink)  
Old 09-06-2007, 02:22 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,695
Thanks: 11
Thanked 243 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Turn on sshd by running any one of the following:
service sshd start
Code:
/etc/init.d/ssh start
Verify ssh port is open
Code:
netstat -tulpn | grep :22
Make sure firewall is not blocking access to port 22
Code:
/sbin/iptables -L -n
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #4 (permalink)  
Old 09-11-2007, 03:44 PM
Junior Member
User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
hackerb9
Default Could be tcp wrappers

Quote:
Originally Posted by csvinayak View Post
when i run the cmd ifconfig-a my i.p is "16.138.59.189"
while i try to ping i get a response , but can't putty to it
I believe the above posters are correct, but here is one more thing you can try if that doesn't work: Check /etc/hosts.allow and /etc/hosts.deny to see if SSH is being protected by TCP wrappers. (Don't worry if they're empty.)

--b9
Reply With Quote
  #5 (permalink)  
Old 09-17-2007, 03:27 PM
Junior Member
User
 
Join Date: Sep 2007
OS: Debian
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
csvinayak is on a distinguished road
Default Hi ALL i tried all the options but no luck

i m sorry if this is a repetitive stuff


still unable to putty to linux which is running on vmare "error message No route to HOST

i m running on win xp ,, where i have installed Vmware inside the Vmware i have installed the Linux image .....VMWARE n/w connection is Bridged

here my sys i.p is "16.138.59.22"

& ip in the linux is "16.138.59.81"

i m able to ping the i.p's from the windows C.L.I & from linux as well

ssh port is opened , no firewalls
Reply With Quote
  #6 (permalink)  
Old 10-10-2007, 11:44 AM
Junior Member
User
 
Join Date: Oct 2007
Location: Simferopol
OS: CentOS-4.4.Server (i386)
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Andrew Burdyug is on a distinguished road
Send a message via ICQ to Andrew Burdyug
Default No route to host. Solution.

Hello, csvinayak
I too have a problem with putty connect to my
VM Ware. And what I do :

1. Check ip`s and ports in my CentOS (VM Ware) and my PuTTY.

Result : no mistakes.

2. Check the state sshd in my CentOS (VM Ware):

[root@localhost ~]# /etc/init.d/sshd status
sshd (pid 3940 3936) is running...
[root@localhost ~]#

Result : sshd is running.

3. Check the state a port on CentOs for connection through ssh:

[root@localhost ~]# netstat -a | grep ssh
tcp 0 0 *:ssh *:* LISTEN
[root@localhost ~]#

or

[root@localhost ~]# cat /etc/services | grep ssh
ssh 22/tcp # SSH Remote Login Protocol
ssh 22/udp # SSH
Remote Login Protocol
[root@localhost ~]# netstat -an | grep 22
tcp 0 0 :::22 :::* LISTEN
[root@localhost ~]#


Result: all is normal.

4. Check configuration my iptables:

[root@localhost ~]# /sbin/iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 255
ACCEPT esp -- 0.0.0.0/0 0.0.0.0/0
ACCEPT ah -- 0.0.0.0/0 0.0.0.0/0
ACCEPT udp -- 0.0.0.0/0 224.0.0.251 udp dpt:5353
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:631
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
[root@localhost ~]#

Result: God dammed!! No rule for port 22! -> port 22
- forbidden!

4. Add rule for port 22 to my iptables:
Just insert
it line by means of your favourite editor
in
/etc/sysconfig/iptables:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

before:

-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT

Warning: your chaine name may be enother, because you have enother Linux. Curent
chaine name you can see through /sbin/iptables -L -n (see above).

5. Check
/etc/sysconfig/iptables:

[root@localhost ~]# cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
[root@localhost ~]#

6. Reboot you Linux and enjoy PuTTY
[root@localhost ~]# reboot

PS: If you want to thank me, just send me mail
for example:
[root@localhost ~]# echo "Thanks, you help me " | mutt buran83@gmail.com
[root@localhost ~]#

With the best regards !
Andrew B.
Reply With Quote
  #7 (permalink)  
Old 10-12-2007, 09:06 PM
rockdalinux's Avatar
Is that all you got?
User
 
Join Date: May 2005
Location: Planet Vegeta
OS: Redhat
Posts: 703
Thanks: 15
Thanked 19 Times in 18 Posts
Rep Power: 10
rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light
Default

Quote:
Originally Posted by csvinayak View Post
i m sorry if this is a repetitive stuff


still unable to putty to linux which is running on vmare "error message No route to HOST

i m running on win xp ,, where i have installed Vmware inside the Vmware i have installed the Linux image .....VMWARE n/w connection is Bridged
I'm sorry but I don't get out. You cannot install vmware inside vmware. Generally you do as follows:

Host -> Vmware -> Guest

Do not use following

Host -> Vmware -> Vmware -> Guest
__________________
Rocky Jr.
What's wrong? I hope I am not making you uncomfortable...

Never send a boy to do a mans job.
Reply With Quote
  #8 (permalink)  
Old 12-07-2007, 11:22 AM
anilvrathod's Avatar
Junior Member
User
 
Join Date: Dec 2007
Location: Pune
OS: Red Hat
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
anilvrathod is on a distinguished road
Default

Dear Friend
Check your routing tables and also check your physical network
Reply With Quote
  #9 (permalink)  
Old 04-07-2008, 05:44 PM
Junior Member
User
 
Join Date: Feb 2008
OS: Linux
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
chal.arun is on a distinguished road
Default

check whether root is permitted to login through ssh or not. I think "#PermitRootLogin yes" should be enabled to make your thing work.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
xen API/sdk for use in sles10 sp1 host namitha XEN 1 12-18-2008 10:56 AM
How to host website using adsl router zeebala CentOS / RHEL / Fedora 2 04-01-2008 09:23 PM
No Route to Host zakaferoz Mail Servers 1 11-18-2007 08:20 AM
Mail hub and smart host ricc Mail Servers 4 08-30-2007 12:01 PM
Virtual Host NeoGreen Web servers 3 08-12-2007 12:01 PM


All times are GMT +5.5. The time now is 10:09 PM.


Powered by vBulletin® Version 3.8.4 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2009 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38