Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What to enter as the target's IP address?  RSS feed

 
Aji Prasetyo
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys,

I have an application that send and receive array of bytes. It can works under the same network by inputing the target PC's IP address and it's Port.
The problem is I want to send and receive with PC on other network. What IP address should I enter, because I can't see the target PC's IP address from my PC.

Thank you so much beforehand.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even if you did somehow came to know the IP address of a machine on a different network, chances are that there's a firewall in between that blocks socket connections on most ports.
 
Aji Prasetyo
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I managed to get the IP address of target PC behind the gateway machine and the IP address of the gateway machine.
But from my PC I can't see the target PC's IP address.
I also heard of "Virtual Private Network (VPN)" to create a virtual connection using a public network such as internet. Is it applicable?
How can I setup VPN?

Thank you.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A VPN requires quite a bit of setup work. It may be useful if there is one particular IP address that you need to access over and over again, but not if the target IP address changes every so often. Plus, the gateway or firewall that's currently blocking the connection needs to allow this; is that a realistic assumption, i.e., can you directly or indirectly influence its policy?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!