Click here to Skip to main content
15,945,603 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I looking for information in the internet about the topic, but something was missing and unclear .

I create application that set on my customers PC, the problem begin when my customer computer set behind router, the application on the PC update by his client's phone device.

I see articles that implement port forwarding [most of them not working well on some routers].
I also read about STUN/STUNT/TURN/ICE solutions .

My question is [TCP],

I have service that run on server with public i.p .
Also ,I know the computer public I.P [router I.P] and in addition the private I.P [computer I.P ,NAT] and the port number , I have unique name for this computer .

The computer behind the router will update the server with his details [public,private i.p and port number] .

When new client want to establish connection to specific computer he will receive from the server all the computer details [according to computer name].

My question if it's possible to send message to computer behind router if we know all the details above w/o making port forwarding and other magic.

Thanks.
M.A.K
Posted

1 solution

Short answer is: if the router is performing NAT then no, you'll have to forward a port in order to do what you're attempting. That said it doesn't have to be a tedious manual affair, you could use upnp in your app on the PC to get the router to forward a port automatically if the router supports upnp. Just be aware that using upnp can pose a security risk.

The other way to do it would be to make the PC connect to the server and maintain the connection, then you can use the server to relay information between your client and the PC through that connection.
 
Share this answer
 
v2
Comments
[no name] 28-Jul-15 10:25am    
Thanks for your help,

"The other way to do it would be to make the PC connect to the server and maintain the connection, then you can use the server to relay information between your client and the PC through that connection."
This method call TURN [Traversal Using Relays around NAT,] , my centeral server will not stand in the load.

May you can recomended my on a good p2p lib (port forwarding)

10x.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900