Manual:$wgUsePrivateIPs

Details
Determines whether MediaWiki will trust an X-Forwarded-For (XFF) header specifying a private IP in requests from a trusted forwarding proxy. If set to, private IP addresses in the XFF header will be ignored.

A trusted forwarding proxy is any proxy listed in either  ( prior to 1.34) or   (  prior to 1.34). Extensions can also mark proxies as trusted via the   hook.

So if you have two traffic managers (Might be Zeus or F5) sending requests to your webservers, forwarding from an internal network, the config might be this: