views:

21

answers:

1

There are three computers, server-A client-B and server-C. All are connected via TCP/IP. Computer server-A and client-B are behind a firewall and can only make outward connections. Computer server-C can both listen and connect.

Server-A and server-C will run my program and hence can both listen and connect, at least I can program them to do so. The software that runs on Client-B can only connect.

I want to make a direct connection from Client-B to Server-A. I cannot create a direct connection from Client-B to Server-A (nor the other way around) due to the firewall. But I can have both Client-B and Server-A connect to Server-C.

To get this to work I could create a proxy on Server-C which just forwards packets from Client-B to Server-A (and the other way around) but I don't want to do this - I want a direct connection between Client-B and Server-A.

My question, is there some way that Server-C can manipulate the IP packets so that Server-C is only initially needed for the two to connect but can then 'connect' the two socket streams so they can directly send packets to each other?

A generic example would be; home computer A want so send some music files to computer C. Both of them are behind firewalls/routers/whatever. So they can only connect to some server B on port 80. And now I want server B to do some magic so that the music file is not sent via server B but directly from A to C...

Any help or tips are greatly appreciated!

A: 

If Server-A and Client-B are behind NAT then hole punching approach can be used.

If there is no NAT, then tcp tunneling via server-C is not that bad idea.

Vadmyst
Yup! that's just what I need. Reading up on NAT traversal and TURN protocols as we speak. Thanks so much for the tip.Cheers, Woporo
woporo