LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-29-2000, 03:17 PM   #1
vlad
LQ Newbie
 
Registered: Nov 2000
Posts: 3

Rep: Reputation: 0
Question


Please help.
In our project I need to establish TCP connection between two sockets on the same host. Normally it should be done over the "lo" local loop. But due to the run-time search for the IP of the destination, - I have to use "eth0" and use "dot IP" notation for the host.
DOesn't work.
Any system services, like ping, between same host sockets don't work. System (kernel) doesn't allow through.
How to configure the system to allow such connection ?
I appreciate any suggestions.

Vlad.
 
Old 12-15-2000, 04:36 AM   #2
TK Tech
LQ Newbie
 
Registered: Dec 2000
Location: Cambodia
Posts: 8

Rep: Reputation: 0
[QUOTE]Originally posted by vlad
Please help.
In our project I need to establish TCP connection between two sockets on the same host. Normally it should be done over the "lo" local loop.[QUOTE]

Really ? How did you do this ?

Quote:
But due to the run-time search for the IP of the destination, - I have to use "eth0" and use "dot IP" notation for the host.
DOesn't work.
Any system services, like ping, between same host sockets don't work. System (kernel) doesn't allow through.
How to configure the system to allow such connection ?
I appreciate any suggestions.
Vlad.
Which distribution are U using ?
Did your network card is properly installed ?
Are your PC connected per-to-per or from part of a Intranet ?

Sorry,....just to make sur before to solve....

Good luck !
 
Old 12-15-2000, 10:34 PM   #3
vlad
LQ Newbie
 
Registered: Nov 2000
Posts: 3

Original Poster
Rep: Reputation: 0
Wink Done

After much investigation I found the problem.

First, to clarify what was going on:
normaly, when creating connection to the same host you use a "localhost" or "127.0.0.1" and this is routed to the "lo" interface.
In the destributed application, client is getting IP in the run-time and this IP may become the same host.
In this case the following happens: Linux kernel (RedHat 6.2 kernel 2.2.16) providing full internet address, like 205.144.333.222 still identifies it as a local address and sends it over the "lo" as if it were 127.0.0.1 !

Here is a bug :
this host has it's own firewall which does not allow exterior internet IP over the loop !
By adding the line to ipchains
/sbin/ipchains -A input -s 205.144.333.222 -i lo -j ACCEPT
I fixed the problem.

Thanks for interest
Vlad
 
  


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
Can't connect to host localhost Scoobsky Linux - Networking 3 10-26-2005 11:47 AM
KMail could not connect to host joe2280 Linux - Software 1 09-26-2005 07:12 AM
host to connect to itself through eth0 ? vlad Programming 1 02-01-2005 01:29 PM
Problem withInternet, DHCP, connect with eth0 down work, connect with eth0 up not zowey Linux - Networking 1 03-12-2004 10:05 AM
eth0 and host address tommytomato Linux - Newbie 2 12-03-2003 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:40 AM.

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
Open Source Consulting | Domain Registration