title: Magento getRemoteAddr returns junk as IP in localhost
body: <p>I want to get the visitor's(users) ip address, for which i have tried like below:</p>
  
  <pre><code>$remoteAddr = Mage::helper('core/http')-&gt;getRemoteAddr(true); 
  echo "&lt;pre&gt;"; print_r($remoteAddr); echo "&lt;/pre&gt;";
  </code></pre>
  
  <p>Im running on Xampp in windows and the above code returns output like below which is not even like ::1  (Tried in all browsers too!!)</p>
  
  <p><a href="https://i.stack.imgur.com/1Rsbx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Rsbx.png" alt="enter image description here"></a> </p>
  
  <p>Is the code right in magento.</p>
  
  <p>I found out the below stackposts to see the fix why localhost returns ::1 which is equivalent of ipV6 address</p>
  
  <p><a href="https://stackoverflow.com/questions/3699454/should-a-mamp-return-1-as-ip-on-localhost">Should a MAMP return ::1 as IP on localhost?</a></p>
  
  <p>I did change the apache2/httpd.conf</p>
  
  <blockquote>
    <p>Listen 80</p>
  </blockquote>
  
  <p><strong>Make it look like this:</strong></p>
  
  <blockquote>
    <p>Listen 127.0.0.1:80</p>
  </blockquote>
  
  <p>But it still displays the same.</p>
  
  <p>Is it right in localhost?  </p>