azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
2.97k stars 105 forks source link

[BUG]: Geo-Blocking doesn't work #192

Closed Seeker14491 closed 4 months ago

Seeker14491 commented 4 months ago

What happened?

Geo-Blocking doesn't seem to be working at all.

What should have happened?

Geo-Blocking should prevent connecting to the server from certain countries.

How to reproduce the bug?

I set the Geo-Blocking to whitelist mode, and set "United States" as the only country to allow. However, testing through a VPN, I can successfully log into the server from Japan and the Netherlands. I also tried using blacklist mode instead, but again it didn't have any effect in preventing me from logging into the server.

Relevant log output

No response

Other details

No response

System details

azukaar commented 4 months ago

Geo Blocking definitely work (just retested it to be sure :) ) if yours doesnt:

Check the cosmos logs to make sure the IP / country incoming is what you expect

Seeker14491 commented 4 months ago

Ah, I am running Cosmos inside WSL2, so that must be the issue. I think adding this information to the Geo-Blocking docs is a good idea.