Extension Name: Trust X-Forwarded-For
Extension Description: Logging of user IPs from the
X-Forwarded-ForHTTP header when using a reverse proxy which is under your control (and can trust it sets the
X-Forwarded-Forheader value is a comma and space separated list of IP addresses, the left-most being the original client, and each successive proxy that passed the request adding the IP address where it received the request from.
This extension will set the user ip in your phpBB to the most trusted (most right) ip in the
X-Forwarded-Forheader instead of
REMOTE_ADDR(the direct client) Use this only with a reverse proxy which is under your control. This extension will block all ips which are not localhost (
::1) unless defined in the environment variable
MARTTIPHPBB_TRUSTXFORWARDEDFOR_IPSwhich can be a comma separated list of ip addresses.
If your reverse proxy has i.e the address
172.17.0.13, then set the environment variable
Extension Version: 0.1.5
- phpBB 3.2+
- PHP 7+
Github repository: https://github.com/marttiphpbb/phpbb-ex ... rwardedfor
Languages: no language files included
Templates: no template files included
In the admin log:
172.17.0.1is the address of my reverse proxy and
126.96.36.199was my own ip yesterday.
Without the extension every users' ip would always show
Note: I purged the cache and enabled the extension with the CLI, that's why the user is Anonymous there.