LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   telnet: connect to address 192.168.15.3: No route to host (https://www.linuxquestions.org/questions/linux-networking-3/telnet-connect-to-address-192-168-15-3-no-route-to-host-766274/)

mohammedahmed86 11-02-2009 12:01 PM

telnet: connect to address 192.168.15.3: No route to host
 
hi fellas im a new member of this group . i m developing a socket programme . my one machine1 ip = 192.168.15.3 when send a string to machine2 ip = 192.168.15.2. the prg works fine but when i do this from machine2 to machine1 this doesnot work.
I pinged each other its fine but when i tried to telnet for 192.168.15.2 to 192.168.15.3 i got this error

telnet: connect to address 192.168.15.3: No route to host

my iptables is empty n SElinux is also disabled i dont understand the prb kindly help me out

regards
M.Ahmed

camorri 11-02-2009 12:24 PM

Try updating your /etc/hosts file on both machines. This is what the entries look like:

Quote:

192.168.1.50 I-Think
192.168.1.20 MrBurnie
192.168.1.27 slacker
One entry for each system on your sub-net.

xcristi 11-02-2009 01:11 PM

What the route command says? (on 192.168.15.2)

mohammedahmed86 11-03-2009 12:39 AM

output of 'route'
 
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.15.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default mywimax 0.0.0.0 UG 0 0 0 eth0

mohammedahmed86 11-03-2009 12:48 AM

nothing happened with additions on /etc/hosts still the same error

xcristi 11-03-2009 07:15 AM

But you are able to connect through ssh to 192.168.15.3?
Eventually try ssh -vvv for debug.

Also, try a nmap scan for 192.168.15.3 and post the results.

camorri 11-03-2009 08:31 AM

Quote:

nothing happened with additions on /etc/hosts still the same error
This ping fails with the /etc/hosts table updated? Does it pick up the correct IP address when you run the ping? If not, there is something severely wrong in your TCP/IP stack.

chris24300 11-03-2009 11:53 AM

Check out the firewall settings, I had problems similar to that and although I added rules to iptables it still didn't work because the firewall settings did have the trusted service selected.

System -> Administration -> Security Level and Firewall

Then under trusted services select telnet and whatever else you wish to use.

Regards,
Chris

rkski 11-03-2009 08:09 PM

The output of #route looks ok.
It looks like the 192.168.3 is not accepting telnet connections. Is port 23 open?

dxqcanada 11-03-2009 08:14 PM

No route to host ... means that the workstation thinks it cannot get there.

As you have configured both hosts on the same network ... I would say there is something wrong with the Ethernet interface.

There was another recent post with this same problem ... it was found that the ethernet card driver was the cause.

mohammedahmed86 11-03-2009 10:21 PM

ssh is working i connect both machines with ssh

chappel 11-03-2009 10:22 PM

Quote:

Originally Posted by dxqcanada (Post 3743489)
No route to host ... means that the workstation thinks it cannot get there.

Well deduced. It may be helpful to check the arp cache of each machine after pinging from both sides ('arp -a'), and using tcpdump (or wireshark, if you like GUIs) when initiating a ping - you should see an arp request ('who-has IPADDRESS') and then a reply, if the mac isn't already in the cache.

It is also possible there is something odd with the switch between the machines. If it is manageable you could check the mac-address table on it, too.

Hope this helps.

ch

chappel 11-03-2009 10:27 PM

Quote:

Originally Posted by mohammedahmed86 (Post 3743570)
ssh is working i connect both machines with ssh

both ping and ssh work, but telnet only runs one-way? Your socket program isn't somehow redirecting port 23 outbound to someplace weird, is it?

mohammedahmed86 11-03-2009 10:30 PM

@ chris2430 : thanks ,in fact everyone for responding to my prb. It has worked the firewall settings for TCP was not in trusted side on the receiving end .
soon will be coming with others
ThankU all.


All times are GMT -5. The time now is 11:38 PM.