Hello guys,
Why it shows my location as the UK while I am in India? Am I missing something in the settings?
AI-generated summary
User Pravi reports an issue with the Security tab displaying their location as the UK, despite being in India. fhe suggests checking if a VPN is being used, which Pravi denies. Pravi mentions using Cloudflare for their site, which may be the cause of the issue. fhe recommends checking MaxMind for the IP address, but Pravi finds their exact location on MaxMind.
Further discussion with itsbhanusharma and Pravi confirms that the site is behind Cloudflare. itsbhanusharma asks if the Cloudflare template is included in the yml file, which Pravi denies. gerhard suggests checking the last used devices list for the correct IP address, but Pravi finds an incorrect IP address.
nbianca suggests checking the IP address in the admin panel to rule out Cloudflare, which Pravi finds does not match their real IP. gerhard concludes itās a configuration problem due to the missing Cloudflare template in the yml file and recommends following the setup guide. Pravi requests clarification on the setup process.
Are you using some kind of VPN? I think the Location is based on the IP that is used for the particular login.
No I am not using any VPN service. But I am using cloudflare for my site. Is that a problem?
I donāt know if Cloudflare is affecting the lookup. Discourse is using MaxMind, so you can try for yourself by entering your IP address at
So Your site is behind cloudflare?
Yes..for almost 1 year without any problem.
Did You include the cloudflare template in your yml file?
I donāt think it has anything to do with Cloudflare, but just to be sure, can you go to your profile and look at the list of last used devices? The locations in that list have a tooltip with the IP address. Is it showing the correct IP address?
My guess is that the MaxMind DB with IP addresses is out of date. You could try rebuilding the container.
@nbianca Correct me if Iām wrong, but I believe there is no background job for regularly updating that database and Iām not sure if Discourse picks up the changes when the maxminddb:get rake task is executed without a restart.
No, I havenāt included the cloudflare template in yml file.
Did the ip address that Discourse reports match your ip address? It is likely that Discourse is seeing the address of the cloudflare data center that is requesting the data. See if your logs are correctly logging up address or only those of cloudflare data centers.
Hey,
This could be a problem with MaxMindDb (old or not precise) or Cloudflare.
To rule out Cloudflare, can you please check if the IP shown in the admin panel (Admin > Users > your username) under āLast IP Addressā matches your real IP? If yes, it might be a problem with MaxMindDb being too old.
Yes, that is true. There is no background job for regularly updating the database or hot-reloading the MaxMindDb.
No, itās a configuration problem.
You really should follow the steps in Full site CDN acceleration for Discourse in order to get a working Cloudflare setup.
I didnāt get most of the part mentioned in that link. Can you tell me what exactly I have to do get maximum out of my free Cloudflare account? What changes do I have to make?
Follow the link already provided above.



