Updated on 20 March, 2025
WP Activity Log support for Reverse Proxies & Web Application Firewalls
WP Activity Log can be configured to automatically retrieve a WordPress user’s originating IP address even if WordPress is running behind a reverse proxy, web application firewall, or load balancers. The originating IP will then be shown in the WordPress activity log as the userโs IP.
This article explains how WP Activity Log can retrieve the originating WordPress userโs IP Address, and not that of the proxy, firewall or load balancer.
WordPress and Reverse Proxy or Firewall Setup
In setups with a reverse proxy, load balancer, or web application firewall, the WordPress server typically sits behind the proxy. Therefore, users never communicate directly with WordPress. Instead, users communicate with the reverse proxy and the proxy communications with WordPress, as illustrated in the image below.

Hence, in such a setup, WP Activity Log sees all the requests originating from the reverse proxy, which in this case is 192.168.2.15.
In this example, all events in the activity log will list 192.168.2.15 as the originating IP address. To record the originating WordPress user IP address, enable the option in the Reverse Proxy/Firewall Options as explained below.
Recording the originating IP Address in the WordPress activity log
To configure WP Activity Log to record the true originating IP address:
- Navigate to WP Activity Log > Settings
- Click on the General tab
- Scroll down to the Is your website running behind a firewall or reverse proxy? section
- Check:
- Yes (select the HTTP header your proxy/firewall uses): Tick the Yes radio button, then select the HTTP header from the drop-down menu
- Custom (specify the name of the HTTP header): Tick this option if you would like to specify a custom header using the provided text box
- No: Tick this option if youโre not using a firewall, web application firewall, or proxy
Click on the Save Changes button at the end of the page.

Important note: Once the Reverse Proxy/Firewall setting is enabled, WP Activity Log will start recording the IP address from a specified HTTP header. As such, this setting cannot be applied retroactively to past activities.
How the WordPress running behind a firewall or reverse proxy setting works
When the reverse Proxy/Firewall Options setting is set to Yes, the plugin retrieves usersโ IP addresses from the specified headers. In doing so, it reports the IP address of the user and not that of the firewall or proxy. Available headers include:
- REMOTE_ADDR
- HTTP_CLIENT_IP
- HTTP_X_FORWARDED_FOR
- HTTP_X_FORWARDED
- HTTP_X_CLUSTER_CLIENT_IP
- X-ORIGINAL-FORWARDED-FOR
- HTTP_FORWARDED_FOR
- HTTP_FORWARDED
- HTTP_CF-CONNECTING-IP
- HTTP_CF_CONNECTING_IP
- CF-CONNECTING-IP
- CF_CONNECTING_IP
- HTTP_TRUE_CLIENT_IP
- TRUE_CLIENT_IP
These headers are used by proxy servers, firewalls, and load balancers to identify the originating IP address of a client. The below screenshot shows the headers of a connection being forwarded via a reverse proxy:

By default, when the setting is enabled, WP Activity Log reports the first IP address from the left as the originating one. This is in compliance with the relevant RFC standards.
Note: You can also specify a custom HTTP header. WP Activity Log still stores all IP addresses in the headers as explained in the section Retrieving all IP addresses reported in the HTTP Headers.
In some cases, however, the connection between a WordPress user and a WordPress website can be routed through several network hops. In such cases, the header will include multiple IP addresses. WP Activity Log can work around this, as explained in the next section.
Retrieving All IP Addresses Reported in HTTP Headers
When the Reverse Proxy/Firewall Option is enabled, WP Activity Log records all of the IP addresses specified in the HTTP header. However, it only displays the first one from the left since this should be the WordPress userโs originating IP address as per the RFCs.
That being said, there might be cases where some servers do not follow the RFC requirements and change the order of the IP addresses in the HTTP header. In such situations, should you wish to see all the IP addresses reported in the HTTP headers, follow the below procedure:
- Navigate to WP Activity Log > Log viewer
- Click on the More detailsโฆ button of the activity for which you would like to see all the data
- Look for the OtherIPs node as highlighted in the screenshot below

From the above screenshot, you can notice the HTTP_X_FORWARDED_FOR header, which tells us the originating IP. This is the same IP listed in the activity log. You can also notice the proxyโs IP address in the REMOTE_ADDR header, which in this example is 192.168.188.74.