Manual:$wgUsePrivateIPs

Details
Determines whether MediaWiki will trust an X-Forwarded-For header specifying a private IP in requests from a trusted forwarding proxy.

Trusted is the key part and you must define which hosts they are in your localsettings.php as per Manual:$wgSquidServers

So if you have two traffic managers (Might be Zeus or F5) sending requests to your webservers the config would be this.

$wgUsePrivateIPs = true; $wgSquidServers = array( '172.1.1.1', '172.1.1.2' );