How to achieve peer to peer transmission, when both source and destination are with dynamic IP and behind routers

0

I have 2 separate household internet connections in two separate buildings. The connections use dynamic IP. Also all devices on both networks are behind routers.

I also have a server with fixed IP from GoDaddy.com (cPanel shared Linux hosting)

Now, I need to transfer files from a PC on my first network to another PC on my second network. Since they are both behind their routers, this cannot work with the destination's private IP.

I also cannot send the entire file though the server for bandwidth reasons. So, I need to achieve some kind of peer to peer transfer directly between my PCs.

My question is, given the availability of the server, how exactly I can get this done? Can the destination PC save some information in the server, that the source can use in order to establish a direct connection with the destination PC? If so, what information needs to be saved in the server?

Sureshkumar K V

Posted 2019-02-05T09:40:55.380

Reputation: 1

Yes. You also could just use a dyndns service. – Seth – 2019-02-05T10:49:40.780

Is there a way, I could use my own server as mentioned in the question to solve this problem? – Sureshkumar K V – 2019-02-05T12:12:31.130

There are countless options. What you need to do is exchange the public IP so essentially you could any number of things because you haven't really specified anything. You could send a mail, you could run a script to let it post to a website, you could use SSH, you could let your server run an IRC demon and connect to that from your clients, you could run your own tracker and just use a torrent, you could setup some insane VPN solution. – Seth – 2019-02-05T13:04:44.007

I will have to save the port and public IP of the clients, as seen by the server. I got this from text about TCP hole punching. But I also read that they are not reliable. So what can I do to make guaranteed p2p connection, especially given that one of the clients could be on a 4G phone? – Sureshkumar K V – 2019-02-06T04:15:48.490

Phones are often behind a CGN which are a bit more complex to overcome. Every method I mentioned could be used to exchange the IPs. Whenever you determine the public IP on the client or server is up to you. You could also setup a port forward for a defined protocol one the non phone site which likely would make it easier to connect. Again, some of the methods mentions would allow you to use that. – Seth – 2019-02-06T06:53:48.030

Thanks a lot for your comments, I will check the possibilities as you mentioned, and get back. – Sureshkumar K V – 2019-02-06T07:24:06.737

No answers