title: InetAddress.getLocalHost().toString() returns different ip address
body: <p>I'm trying to convert <code>InetAddress.getLocalHost()</code> to String but it gets a different address. When I use <code>InetAddress.getLocalHost()</code>, I get my real IP address, but when I use <code>InetAddress.getLocalHost().toString()</code> it's some different address that I don't know.</p>
  <p>This is my code:</p>
  <pre><code>  String ipAddr = StringUtils.substringAfter((String) InetAddress.getLocalHost(), &quot;/&quot;);
    String host = InetAddress.getLocalHost().getHostAddress();
  </code></pre>
  <p>My real IP address is 172.xxx.xxx.xxx, but when I convert to string, I get 168.xxx.xxx.xxx. How can I get my real IP address, that is, my IP address from my local machine?</p>