# Nextcloud - Geoblocker

**URL:** <https://help.nextcloud.com/t/nextcloud-geoblocker/243855>\
**Category:** ℹ️ Support\
**Tags:** nc32, ubuntu, nextcloud, linux, geoblocker, infrastructure\
**Created:** [April 29, 2026, 9:16am UTC](https://help.nextcloud.com/t/nextcloud-geoblocker/243855 "2026-04-29T09:16:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Forest.328](https://help.nextcloud.com/user_avatar/help.nextcloud.com/forest.328/32/75833_2.png) [@Forest.328](https://help.nextcloud.com/u/Forest.328)\
**Post date:** [April 29, 2026, 9:16am UTC](https://help.nextcloud.com/t/nextcloud-geoblocker/243855/1 "2026-04-29T09:16:33Z")

</div>

Hello everyone,

I installed Nextcloud version 32.0.8 on Ubuntu 24.04.4 LTS. Several ports and other connections are blocked by the firewall, but I want to allow web access to Nextcloud only from the DACH region (Germany, Austria, Switzerland).

Does anyone here have experience with “geoblocking without a proxy” or with the Nextcloud app “Geoblocker” ([GeoBlocker - Apps - App Store - Nextcloud](https://apps.nextcloud.com/apps/geoblocker))?  
Maybe there are other options as well? 🙂

Thanks in advance!

Best regards,  
Forest

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [April 29, 2026, 1:42pm UTC](https://help.nextcloud.com/t/nextcloud-geoblocker/243855/2 "2026-04-29T13:42:08Z")

</div>

It’s common idea to allow connections from specific regions to “improve security” but at the end it’s no more than snake oil with no real security benefit. It only avoids connections from really dumb scanners which are not dangerous for applications with moderate security level and above..

Attackers could easily use VPN, VPS and other ways to initiate connections from allowed regions to overcome your restrictions, so relying on such measure only gives you wrong security feeling. you better invest into real security like MFA, monitoring and most important good backups.

---

<div class="post-metadata">

**Author:** ![Forest.328](https://help.nextcloud.com/user_avatar/help.nextcloud.com/forest.328/32/75833_2.png) [@Forest.328](https://help.nextcloud.com/u/Forest.328)\
**Post date:** [April 29, 2026, 2:03pm UTC](https://help.nextcloud.com/t/nextcloud-geoblocker/243855/3 "2026-04-29T14:03:45Z")

</div>

Hi @wwe,

thank you very much for your answer.  
MFA for all users, monitoring, and backups are already set up and working as expected. The firewall is also configured appropriately for access via the web and SSH (including MFA).

However, I’m still very interested in the topic of “geoblocking,” and of course I don’t want to “lock myself out.” 😅

---

<div class="post-metadata">

**Author:** ![mritzmann](https://help.nextcloud.com/user_avatar/help.nextcloud.com/mritzmann/32/43763_2.png) [@mritzmann](https://help.nextcloud.com/u/mritzmann)\
**Post date:** [April 29, 2026, 2:13pm UTC](https://help.nextcloud.com/t/nextcloud-geoblocker/243855/4 "2026-04-29T14:13:13Z")

</div>

> [@Forest.328](#):
>
> Maybe there are other options as well?

I know there are several third-party modules for Caddy that could be used to achieve this. But you would then need to use Caddy as a web server or as a frontproxy in front of it.

Search for `geo` on this page:

[https://caddyserver.com/docs/modules](https://caddyserver.com/docs/modules)

However, I have never used it and it may contravene the following requirement:

> [@Forest.328](#):
>
> geoblocking without a proxy

---

<div class="post-metadata">

**Author:** ![Forest.328](https://help.nextcloud.com/user_avatar/help.nextcloud.com/forest.328/32/75833_2.png) [@Forest.328](https://help.nextcloud.com/u/Forest.328)\
**Post date:** [April 29, 2026, 2:16pm UTC](https://help.nextcloud.com/t/nextcloud-geoblocker/243855/5 "2026-04-29T14:16:11Z")

</div>

Thank you. I will check this out. 🙂

---

<div class="post-metadata">

**Author:** ![mritzmann](https://help.nextcloud.com/user_avatar/help.nextcloud.com/mritzmann/32/43763_2.png) [@mritzmann](https://help.nextcloud.com/u/mritzmann)\
**Post date:** [April 29, 2026, 3:18pm UTC](https://help.nextcloud.com/t/nextcloud-geoblocker/243855/6 "2026-04-29T15:18:21Z")

</div>

> [@wwe](#):
>
> but at the end it’s no more than snake oil with no real security benefit

I agree with this statement and disagree with it at the same time.

That is a very controversial topic 😄

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_449c533f586939b6e5f246632a46421f.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [April 29, 2026, 3:44pm UTC](https://help.nextcloud.com/t/nextcloud-geoblocker/243855/7 "2026-04-29T15:44:55Z")

</div>

I have seen this more on the server side, that server ISP try to get ipv4 address space and the old location of this IP address remains quite some time in public databases (even google, cloudflare etc.).

> [@Forest.328](#):
>
> However, I’m still very interested in the topic of “geoblocking,” and of course I don’t want to “lock myself out.” 😅

Especially this is happening when you don’t expect it, you are on holidays, share files with someone outside the allowed ip range, security checks won’t work, to extend a letsencrypt certificate, …

---

<div class="post-metadata">

**Author:** ![scubamuc](https://help.nextcloud.com/user_avatar/help.nextcloud.com/scubamuc/32/63165_2.png) [@scubamuc](https://help.nextcloud.com/u/scubamuc)\
**Post date:** [May 1, 2026, 2:53pm UTC](https://help.nextcloud.com/t/nextcloud-geoblocker/243855/8 "2026-05-01T14:53:38Z")

</div>

> [@Forest.328](#):
>
> I don’t want to “lock myself out.” 😅

that’s nothing to laugh about… I just tested this more or less the same you’d suggested; white listing (DE, AT, CH)… and guess what, I was locked out 😲 → as long as you have access to the server, you can disable the app `occ app:disable <appname>` and all is well

> [@wwe](#):
>
> …it’s no more than snake oil with no real security benefit…

agree with @wwe 💯

instead use either TOTP, TOTP2Mail, or U2F or even cloud-notification… **but use MFA** ⁉

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [May 9, 2026, 2:54pm UTC](https://help.nextcloud.com/t/nextcloud-geoblocker/243855/9 "2026-05-09T14:54:26Z")

</div>

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.
