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

Situation

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 = 192.168.178.0/24

Files are accessible with and without VPN Tunnel

:frowning:

My VPN has internal the IP 192.168.178.151

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 192.168.178.xxx (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 192.168.178.xxx is allowed.

:slight_smile:

how to write command line on terminal ?