Michel Melo says his client will have "a machine with a server". In this case, it means that, for example, you have a WAMP or a MAMP on the machine.
Using this server, locally, the client will put data, using client software (for example Firefox)
Example:
Main site with Linux is a web server
Local site with WAMP
Client using Firefox in WAMP
Michel's problem does not seem to be "As my Linux server will know the user's IP address of Firefox", because its user will not connect in Linux.
Michel's problem is "How my Linux server can know the IP of the WAMP server that will connect".
And this?
If this is the answer, it can not be "Uses JS" because WAMP will not use JS.
The other problem is that if the client's internet connection is disturbed, your local network may receive another IP address. And in this case, the client's "server" will not be recognized by the "global" server anymore.
By analyzing this, I think the best option is to transmit a connection code to the local server. And every time this local server will connect in the "global" served, it will transmit the code. IP does not seem to be a reliable enough option.