Restrict by IP address except Shared Links

I have NextCloud[nc] behind a reverse proxy [nginx]

The Reverse Proxy has a whitelist of IP addresses.

Sometimes I want to share documents with others outside my whitelist - eg Mortgage Advisor.

If I set up nginx to allow all IPs for :

https://my.nexcloud.domain/**s**/*
https://my.nexcloud.domain/**public.php**/*

Would that allow 3rd parties to access shared files without exposing anything private?

hi @lordy we had similar discussions in the past, please use search e.g. Restrict Nextcloud over VPN except Talk

IMHO this will not work as you still block scripts, CSS and other elements required for basic functionality. I would recommend you follow basic security guidelines How to maintain, check and improve the security of your Nextcloud installation and your system will be safe enough to keep script kiddies away…