• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to verify that a program runs in the same network it was originally installed  RSS feed

 
Ranch Hand
Posts: 376
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To do the same for a single PC the program can remember the IP address, but is it possible to restrict execution in PC on the LAN?
 
Ranch Hand
Posts: 56
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alejandro,

you can ask the current IP-Adress of a machine by using the following code:



You could hardcode or configure ip addresses you would like to allow to run your program from and stop the execution of the program when getting other ip addresses. Hope that is what you meant.

Cheers,
Ramon
 
Alejandro Barrero
Ranch Hand
Posts: 376
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ramon. However that will only work in one machine; I want to limit ehe executin to an entire network.
 
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typically this is done by running a "license server" someplace on the LAN, and then the program has to be authenticated by the license server before it will run (i.e., it contacts the license server via a socket connection.) If the LAN has a firewalled connection to the rest of the world, then that will be sufficient. There's really no hard and fast definition of a LAN in terms of address space or even hardware configuration, so nothing else is going to work.
 
Alejandro Barrero
Ranch Hand
Posts: 376
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ernest. What I want to do is to allow a program to run only in the computers in a network of a small company so that it cannot be stolen and used in another company. The license server can also be stolen. Perhaps it could be done if I can obtain the IP addresses of all the computers or something that identifies the lan, but I don't know how.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The license server could refuse to run except on a single machine -- when the company buys the product, you give them an encrypted license file that allows the license server to run on a single machine of their choosing. But it's true that a license server can be decompiled or otherwise reverse-engineered, if people have access to the binary.

A variation that requires more infrastructure on your part is to run the license server over the Internet. You run the license server on your own server, and it decides which clients to allow to run. If the key file is unique for each customer, then at least you know who is copying the software.

The truth is, of course, no such system is unbreakable.
 
Alejandro Barrero
Ranch Hand
Posts: 376
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks again Ernest. The license server can be stolen (copied). If the license server runs in the web, I have to validate the IP address of the requester, then I would have to know the IP addresses of al the computers in the network, but I haven't been able to find out how to do that; I don't see how to do it with IPCONFIG -all.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!