My computer is connected to Internet via a Router.
The Router is connected to my ISP.
I connect to an Office WAN via a VPN connection.
Using Java code:
I need to retrieve the Dynamic IP address assigned to my computer by the VPN DHCP.
I tried to use the code sample bellow but it returns the LAN IP address.
My knowledge of the package java.net.* is limited.
Any help would be greatly appreciated.
InetAddress address = InetAddress.getLocalHost();
System.out.println(address.toString()); // returns 10.0.1.1 (the LAN IP assigned by the router)