Hello, I currently have a computer with the specifications listed above.
Upon activating an institutional VPN (OpenVPN UDP), I mounted a Hetzner
network storage using the CIFS protocol (mounted via systemd). At that
point, it becomes unreachable both through the File Manager (Dolphin)
and from the terminal. This issue persists as long as the VPN connection
is active; naturally, once the connection ends, everything returns to
normal. I’m encountering the same situation on a relative’s computer
running Fedora 41 (KDE Wayland). Are there any ready-made solutions that
you’re aware of?
It sounds like a routing problem, when the VPN is active, the IP address you use changes, and you’re probably not allowed to access the NAS from that IP range.
I’ve never done this, perhaps someone here has, but I think you’ll have to specify a second gateway, one that bypassed the VPN and use that for the NAS conneection.
Let me clarify, I need the institutional VPN to access work services; however, the mounted resources are independent of it and I need them whether the VPN is active or not.
As per your suggestion I checked the gateways and indeed when I activate vpn another default gateway is added. But when I unmount the resource with umount , connect to the vpn and then re-mount it , the latter operation happens successfully.
After doing this, if I try to access the resource via terminal or file manager in either case the system hangs and only after I disconnect the vpn does the system respond again.
Then you’ll have to setup your routing to route all traffic for the IP through the first gateway and everything else will then go through the VPN gateway.
No, I’ve never done this, I only know because I spent quite some time researching VPNs and how they’d work for this type of situation.
What you are trying to achieve is split tunneling - allowing local services to be available while connected to a vpn.
If your institution provides internet access when connected using VPN - then you need to reconfigure your system,
unmount your share before changing network
mount when new network is up
This could possibly be achieved using some smart scripting and a systemd user service.
I revisited your initial post and realized you have mounted a network share using Samba over the internet - I expect that your connection is encrypted somehow - usually using SSH or VPN - otherwise that share is being bruteforced 24/7.
If you are using some kind of tunnel to access the share - then that tunnel is disconnected when you activate VPN.
Despite cifs being old and unmaintained - the linux mount type is still cifs and the utils is still named cifs-utils.
As your issue is availablitiy while on different networks - whereever you are - and your institutional workplace - the only thing I can suggest is to unmount before changing network - then remount when new network is up.
I cannot provide a turnkey solution, only ideas - like the gio mount utility script
The gio mount is more flexible than a systemd mount unit - and it should be possible to handle the network change in a flexible manner - but that is speculation; in fact I did a search and found that the scenario you describe is a common issue when switching networks.