tickets #67279
closed
vBulletin - Admin/Moderator: Get IP Address function
Added by malcolmlewis almost 4 years ago.
Updated about 3 years ago.
Description
Hi
As part of our spam reporting, we log the IP address of the spammer, our expectation is to see the external IP Address, unfortunately it is showing up as an infrastructure IP Address, eg;
The IP Address is: 192.168.47.21
The host name is: daffy1.infra.opensuse.org
- Tracker changed from communication to tickets
Hi Malcolm,
I suspect this is because that function expects REMOTE_ADDR to be the client address. This is entirely reasonable, except we are not setting that variable correctly. I don't know who set it up, but it currently does not work:
RemoteIPHeader X-Forwarded-For
SetEnvIf X-Forwarded-Proto "^https$" HTTPS=on
SetEnvIf X-Forwarded-For "^.*?([0-9.]*)$" REMOTE_ADDR=$1
RequestHeader set X-Forwarded-For %{REMOTE_ADDR}e
I guess we are waiting for the proxy to set up X-Forwarded-For correctly.
Looking at the access log today, I have 165563 entries. Excluding accesses from 192.168.47.10[12], and it is 132249.
Number of entries with no address = 85618, with address 47725. We are logging REMOTE_ADDR, but why it is only set sometimes, I don't know.
According to the debug log I have set up, 'X-Forwarded-For' is always null.
- Status changed from New to Resolved
This should be fixed now I believe, I can see ip addresses on the forums. Reopen if I'm wrong :P
Also available in: Atom
PDF