• Resolved CamZL1

    (@danishhaidri)


    Hi,

    We recently migrated to a new host and every time i log in to the website i am getting a wrong location notification. how do i fix this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @danishhaidri,

    This could be an issue with IP detection where a proxy or firewall is showing as your IP instead. GeoIP can also detect an alternative location if you use a VPN whilst web browsing.

    If you look up your public facing IP address at: https://www.whatsmyip.org/ and visit Wordfence > Dashboard > Global Options > General Wordfence Options > How does Wordfence get IPs, does your current IP match what the site is reporting? If not, cycle through the options, do any of the values match your IP address? If so, make sure to click SAVE if you have to change this.

    You may find the “How does Wordfence get IPs” section informative on: https://www.wordfence.com/help/dashboard/options/#general-wordfence-options

    Let me know how you get on!

    Thanks,

    Peter.

    Thread Starter CamZL1

    (@danishhaidri)

    So we are only Cloudflare and I saw one item on the list related to CF. I have selected that option. However on our servers we also have an option to decrypt CF IP Address at the NGINX settings. Hope this will not interfere with the WF option?

    Thread Starter CamZL1

    (@danishhaidri)

    I have also cycled through all options and none of the IP’s match? We are not using any VPN or anything. What do we do next?

    Plugin Support wfpeter

    (@wfpeter)

    Hi @danishhaidri,

    If you’re using Cloudflare, you will need to select “Use the Cloudflare “CF-Connecting-IP” HTTP header to get a visitor IP. Only use if you’re using Cloudflare.”, but why it’s wrongly reporting may be down to your host’s configuration of Cloudflare.

    As seen on: https://www.wordfence.com/help/dashboard/options/

    Note that Cloudflare has several configurations including their own web server module that takes care of detecting the visitor IP address, so be sure to work with their technical support staff and read their documentation to determine which configuration you’re using.

    I have seen the Cloudflare firewall needing your own site’s IP(s) adding to their whitelist. You may need to add these under Cloudflare’s “rules” and “tools” sections if you haven’t already. Your site’s IP can be found at Wordfence > Tools > Diagnostics > Connectivity > IP(s) used by this server.

    Sometimes, we also see the Cloudflare firewall requiring Wordfence IPs to be added to the whitelist. Our IPs for reference can be found here: https://www.wordfence.com/help/advanced/#servers-and-ip-range

    Let me know how looking into that goes.

    Peter.

    Thread Starter CamZL1

    (@danishhaidri)

    @wfpeter I have added all the IP Addresses from WF IP to our own IP’s used bu this server. How do I know if the problem is fixed?

    Plugin Support wfpeter

    (@wfpeter)

    Hi @danishhaidri,

    I would say that after clearing/purging any caching plugins or Cloudflare’s cache, if you’re no longer receiving the wrong location notification then that would be a positive outcome. This coupled with the IP detected by Wordfence matching the one you see in https://www.whatsmyip.org/ should prevent issues going forward. If something still isn’t right, you can provide screenshots of any errors/issues by using a service such as Snipboard. You could also email a Wordfence diagnostic report to wftest @ wordfence . com. You can find the link to do so at the top of the Wordfence Tools > Diagnostics page. Then click on “Send Report by Email”. Please add your forum username where indicated and respond here after you have sent it.

    Note: For the fastest response time, please make sure and add any information or questions directly to this topic and not the email address above unless asked.

    Thanks again,

    Peter.

    Thread Starter CamZL1

    (@danishhaidri)

    Email sent @wfpeter

    Plugin Support wfpeter

    (@wfpeter)

    Hi @danishhaidri, thanks for your email.

    So it seems that the IP being reported on your site is an IPv6 address, whereas your IP is a regular IPv4 so we can’t match those up. We saw issues a while ago where Cloudflare’s CF-Connecting-IP wasn’t correctly reporting visitor IPs, but this was resolved from their end.

    Thanks for your emailed screenshots, but ideally I need the diagnostic report itself so I can explore more around why the wp_remote_post() is returning a 403 error now. I see you sent a diagnostic report to us back in April, but it seems to totally pre-date this connectivity issue as everything is reporting OK on there. Can you think of anything that changed in terms of your hosting between then and now that might be significant?

    Instructions on mailing the report to us are in my previous response.

    Thanks,

    Peter.

    Plugin Support wfpeter

    (@wfpeter)

    Hi @danishhaidri, thank-you for sending over the diagnostic reports.

    I am not seeing any wp_remote_post() issues in either of those sent on 24 August, so connectivity seems good. The IPs reporting as in-use by your server and yourself are also now showing as IPv4, and do not match, so your IP reporting in Wordfence seems correct on the face of it.

    Reporting of location can, for a variety of reasons, report differently to your actual location from time to time. If your IP still doesn’t match the one seen when selecting an IP from Wordfence, I feel that the configuration at your host is passing the wrong IP to your site, such as a firewall/proxy instead of yours as the visitor. It could be worth speaking with their support channels to have this rectified.

    Thanks,

    Peter.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘wrong location’ is closed to new replies.