I've been looking around for a while on this issue and after wrestling with my mobile ISP, have finally got a VPN client to test with...
... however ...
All the other solutions using the $_SERVER
in this code (great article) seem to only return the IP address of the VPN server address (192.168.1.sss).
My solution requires me to send a message to a remote machine (on the end of a VPN) and not the main VPN server.
For example:
- External client browser fills in a form which posts to a PHP page (
VPN:192.168.1.ccc
) - The PHP page on server
www.example.com (192.168.1.sss)
then compiles a suite of instructions to send to the remote machine192.168.1.rrr
on same logical network (through VPN) as server.
... trouble is, $_SERVER[] seems to return 192.168.1.sss rather than 192.168.1.ccc
even if I send a message (using CURL) to 192.168.1.ccc it shows as not found.
any ideas on how to get the VPN client address known to the network in a way that means I can send the message??
Thanks in advance.