[Vtigercrm-developers] vtiger 6.4 - does not store IP address into login history behind firewall or proxy - resolved

Holbok István holbok at gmail.com
Mon Mar 21 18:23:55 GMT 2016


Hi List members,

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.

The solution is simple, using get_ip() function located at: 
https://gist.github.com/ChrisWiegman/5df4c564d12f2739d1c7#file-get_ip-php

In the CRM we should change
- \modules\Users\models\Module.php and
- \modules\Users\Authenticate.php

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.


-- 
Kindest regards:
*Holbok István*



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20160321/11adc169/attachment.html>


More information about the vtigercrm-developers mailing list