Help with third party redirection

Hello all.

Hopefully I can explain this well, I don’t understand the problem fully and therefore may fumble a bit…

consider this please:

  1. There are three separate computers, each at a different location, each having its own IP.
  2. None of the routers can be adjusted or otherwise changed for things like port forwarding.
  3. None of the routers will work with miniUPnP

Lets name the 3 computers:
PC1 = some users notebook
PC2 = a server cgi app
PC3 = a tool that has two major parts - an Engine that does some work which also periodically checks into computer 2, the server. Among other info, it sends its internal IP address

The process:
PC1 connects to PC2. The user logs in then desires to be transferred to PC3. This is the code I used.

Dim s as string = "http://" + Trim(IP) + ":8080"
ShowURL(S)

When I tested the above all within the same network, it worked perfectly. However, when I tried to test having the computers on three different networks, PC2 would not connect to PC3 (so the user could view actual data at the location where PC3 is physically at).

While doing more research on this, looked into how Team Viewer handles this - since my arrangement is virtually identical - other than I am starting an app, not performing all of the functions of TV. In any case, the docs I have seen say that the remote PC(PC3) creates an outgoing connection from PC3 to PC2 using port 80. PC1 connects to PC2 then somehow forwards on to the already port 80 connected PC3. The rational, which makes perfect sense, is that it eliminates the need to make any changes to the router, use miniUPnP or other software tools.

So my question is - what am I doing wrong with my current strategy of using ShowURL? And if that will not work at all, how can I respond to PC3 (which has opened the port for me already by using the default TCP port) that has connected to PC2?

Any suggestions, code samples etc etc would be GREATLY APPRECIATED!
Thank you,

Tim

You need to have the non-local ip address if they are on a different network. You could have a central known server providing the right information. To all the clients perhaps.

Hi Derk.

I have both the non-local (assigned by the ISP) as well as the local IP assigned by the router.
Doesn’t seem to matter…
Should I use port 80, rather than 8080? Should I keep the PC3 always logged into PC2?

Thank you for your reply!
Tim

Could it be a problem with the ISP preventing this from working?
Just a thought…

[quote=376876:@Tim Seyfarth]Could it be a problem with the ISP preventing this from working?
Just a thought…[/quote]
If you are trying to traverse the internet, things get way more complicated.

If you are allowed to install other software on these PCs, you might want to look at ZeroTier. Their software creates a virtual network between the machines which is completely independent of primary network.

Without having access to the routers to add port forwarding there’s no way you’re going to be able to talk to any machines behind a router from out on the internet other than:

  1. Have a “master server” that is reachable out on the internet which all PCs connect to, then using Hole Punching you could “link” up the connections.

  2. Connecting through a system like Greg suggests, I used Hamachi many years ago for something similar. ZeroTier looks like a similar solution.

A network schema and addressing used would help to solve your problem

traceroute, ping and nmap (Zenmap) are your friends to diagnose your problem

All of the machines are mine, I have them on different ISP’s networks for testing before going into the field and trying for example with Xojo cloud.

What Julian suggested is exactly what I am trying to do. What I cannot figure out is how to get the two PC’s to connect to each other but will try the tools suggested.

BTW, this describes better what I was trying to describe in this thread. What is missing is how it actually works.

Again, thank you all for your replies. I will give the recommendations a close look and try.

Tim

Can anyone suggest when using “Hole Punching” [https://en.wikipedia.org/wiki/Hole_punching_(networking) [/url] how to get the the public and private ports? I know how to get the public and Private IP’s, but how to tether the public and private ports?

Thanks again,
Tim