Support » Plugin: Wordfence Security - Firewall & Malware Scan » Error warning for HTTP headers

  • Resolved clubafterlifeq


    We are using the default X-REAL-IP setting to resolve IPs, however all of our ‘attack’ emails from Wordfence list the server’s IP as the attacker.

    I’ve heard that changing the setting to X-Forwarded-for fixes this problem but I’m getting a warning when I do that. The warning is a bit confusing:

    Your ‘How does Wordfence get IPs’ setting is misconfigured. This site is currently using the X-Forwarded-For HTTP header, which should only be used when the site is behind a front-end proxy that outputs this header. This site appears to be behind a front-end proxy

    Not really sure what the issue is, here? Can I ignore this warning?


Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @clubafterlifeq

    May you please share a screenshot showing “IP Detection” section in (Wordfence > Tools > Diagsnotics)?

    You can email it at (alaa “at” wordfence “dot” com) if you like.


    Hi @wfalaa

    We have already discussed something similar here:

    I don’t think your suggestion that it was someone inside the network (turns out that’s impossible) attacking the sites was accurate. So we did some more Googling, and found this thread:

    Which suggests switching to x-forwarded-for (as mentioned in the OP)

    CF-Connecting-IP 	(not set) 	
    X-Forwarded-For	In use
    Trusted Proxies

    It is now working and we are seeing the actual IPs of the attackers and therefore can block them. There’s no internal hacker, it’s a glitch in the way WF detects IPs. Just thought I’d follow up. We’ve decided to ignore the warning mentioned in OP.

    Hi @clubafterlifeq

    Thanks for the update, please bear with me so I can understand the situation better and investigate if there is something needs to be improved over here:
    – From the old thread, I understand that “X-Real-IP” was used in “How Does Wordfence get IPs” option, and it was reporting the same IP address as “x-forwarded-for” and that was the correct IP address.
    – Now, you are saying that you set “How Does Wordfence get IPs” option to “X-Forwarded-For” which seems to resolve your issue, however I can see the same IP address is being reported in “X-Real-IP” header.

    In both cases, “REMOTE_ADDR” header isn’t reporting the correct IP address, and that’s fine, it depends on how your server is configured and that’s why we have “How Does Wordfence get IPs” option so you can choose the header that works best with your current server environment.


    – From the old thread, I understand that “X-Real-IP” was used in “How Does Wordfence get IPs” option, and it was reporting the same IP address as “x-forwarded-for” and that was the correct IP address.

    No, from ALL the threads, including the other person’s, we are saying that the IP reported in WF emails is the server IP when using X-Real-IP. We are not getting hacked by anyone inside the network. As soon as we (me and person in the second example) changed all of our sites to X-Forwarded-For, the email warnings for attacks display the correct IPs of the attackers (ie, not our server IP).

    I don’t really know how else to explain or simplify it. It has nothing to do with the IP displaying in Wordfence > Tools > Diagnostics and everything to do with the IP shown in attack emails. I’m just trying to give you the information in case anyone else has the same problem, not attack Wordfence, which we use on all of our sites and clearly appreciate!

    Emails showing the wrong IP/location of attackers as our server IP (every single attack across all sites every day apparently):

    After switching to X-Forwarded-For in the settings, correct IP and location shown in emails:

    • This reply was modified 2 years, 3 months ago by clubafterlifeq. Reason: 2 of the same attacks used in the second screencap. Fixed to show all different ones

    Thanks for the clarification @clubafterlifeq I appreciate your time, this has been noted.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error warning for HTTP headers’ is closed to new replies.