<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body smarttemplateinserted="true" bgcolor="#FFFFFF" text="#000000">
    Hi List members,<br>
    <br>
    The vtiger 6.4 does not store the IP address of logged in users, if
    the system is installed behind proxy or firewall. In this case the
    router or gateway IP address is stored instead of the users' IP.<br>
    <br>
    The solution is simple, using get_ip() function located at:
<a class="moz-txt-link-freetext" href="https://gist.github.com/ChrisWiegman/5df4c564d12f2739d1c7#file-get_ip-php">https://gist.github.com/ChrisWiegman/5df4c564d12f2739d1c7#file-get_ip-php</a><br>
    <br>
    In the CRM we should change  <br>
    - \modules\Users\models\Module.php and<br>
    - \modules\Users\Authenticate.php<br>
    <br>
    all $userIPAddress = $_SERVER['REMOTE_ADDR']; statement should be
    changed into call of above mentioned get_ip() function that uses
    HTTP_X_FORWARDED_FOR to detect the valid users' IP.<br>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      Kindest regards:<br>
      <b>Holbok István</b><br>
      <br>
      <br>
      <br>
    </div>
  </body>
</html>