Tunneling through private networks


I've two computers, each of them runs in another private network, so both PC's have private IP address. I need to connect these two computers. You can use third PC with public IP to initiate the connection, but not for the data transfer. How can I connect these two computers with private IP address? Please include links to tutorials how to do that in C++/C# as well.

Thank you very much.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Daniel JungesCommented:
to conect to another private ip, then you  have to forward the vpn port on you gateway to this ip.

implementation sample: http://social.msdn.microsoft.com/forums/en-US/netfxnetcom/thread/28125f40-9c3b-4e77-9bfb-8a975e9b3457/
JiriNovotnyAuthor Commented:
Well and how is this done in Hamachi/Skype? Or VPN? I heard that Skype is able to tunnel two private networks without using relay server.
Daniel JungesCommented:
This is another stuff:

Tunneling skype from behind firewall
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

JiriNovotnyAuthor Commented:
Well I don't need to know how to tunnel skype through firewall, I just said I heard that Skype is able to tunnet two private networks without using relay server, and I would like to know how it's done. And I heard that Hamachi is able to do the same, so also Hamachi should be able to tunnel two private networks without using any relay server.

So the ultimate question is: How to tunnel two applications running in different private networks without using any relay server?
Daniel JungesCommented:
It is not possible. If those applications can establish a tunel then there have an server implementation integrated. Other stuff: a port forward is strongly needed if no third server are integrated on session establishment.
JiriNovotnyAuthor Commented:
Well the solution is acceptable if third server is used for session establishment ONLY. Thus, the actual data must go directly from client to client, not through third server, as this would really overload that server. Hope the solution exists, because I must not overload the server.
JiriNovotnyAuthor Commented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.