Lack of interest Add support for proxies


Well-known member
XenForo does not support the logging of remote IP addresses of users accessing the system through any form of proxy. Inside /library/xenforo/controller.php are a few areas where the ZendFramework function getclientip is called. Unfortunately all calls to this function pass in FALSE which is telling ZF to not check for certain headers to see if the connecting IP has been proxied.

Please override this function and allow within the ACP the ability to specify our own header to check for proxied IP addresses. Why our own? It is very easy to spoof but in my Varnish cache I can set any header I want to the real IP, tell XF the name of it, record the real IP and strip it out of any returned headers to the connecting IP.

For the majority of users simply allowing an input box and a checkbox (header to check for, check for headers) will suffice.

For now I shall have to modify the ZF source file to accomodate.

Btw, this will also fix the issues in this thread:


Well-known member
Having been looking at the source it seems that XenForo is not proxy friendly when it comes to recording IP addresses. There are multiple instances where the IP address is being set on the value of SERVER['REMOTE_ADDR'] which, when accessing through a proxy, is set to the address of the proxy.


XenForo developer
Staff member
That's why I recommend the config.php change to deal with your particular setup. :)