1) Add all your server's IPs to this list separating each IP with a comma
/* Enter your known [trusted] proxy servers here. You can list multiple trusted IPs separated by a comma.*/
$config['Misc']['proxyiplist'] = '127.0.0.1, 192.168.1.6';
2) Locate this variable in the same file (should be right underneath the previous variable) then change HTTP_X_FORWARDED_FOR with HTTP_X_REAL_IP
/* If the real IP is passed in a http header variable other than HTTP_X_FORWARDED_FOR, then you can set the name here; */
//$config['Misc']['proxyipheader'] = 'HTTP_X_FORWARDED_FOR';
$config['Misc']['proxyipheader'] = 'HTTP_X_REAL_IP';