Is it possible to share files / folders only with VPN Users?


Nextcloud 12.0.3
ubuntu server
NGinx with PHP 7.1

File Access Controll App installed
External drive with “internal” documents is mounted (lokal folders on the same server but outer the www-root)

My intention is to allow users coming via VPN to the Server (https)
the access to these files.

Users from the internet (https: … Port 443 with public IP-Adress) shouldn’t access those files!

Wich rules should I use?

What I did:

Setting a rule
Tagged with … “via_VPN” (I set for a Testfolder the Tag “via_VPN”)
IP Adress request =

Files are accessible with and without VPN Tunnel


My VPN has internal the IP

So every request from the LAN or via VPN from the internet should be allowed.

Every request from outside the LAN (WAN) should be blocked.

OK figured it out :slight_smile:

Setting a VPN access only needs the following

New Ruleset
-> 1.) IP don’t fit (IP of my VPN Server)
-> 2.) Systemtag = has Tag = my_VPN

Tagging my Doc-Folder with Tag “my_VPN”

After that all access from the Internet is blocked; all access via is allowed.


how to write command line on terminal ?