Android phones with VPN providing mapped network drives?

Hello all,

Our Android based telephones are supposed to receive/provide a hotspot to the Internet via a WireGuard VPN to the company network in the field.

Tools on site should use this hotspot and/or these connections. Among other things for storing pictures and videos on Windows network drives in the company.

Can I somehow provide the Windows network drives available through the VPN connection to the company network directly to the tools and use them at least via the Android?

I would be very grateful for hints or tutorial tips/links!

Yes, you set smb share on server where the drives are and you buy solid explorer for all clients. Cheap and powerfull explorer. You setup accounts and password,permissions and thats it.
You need to set firewall rule for smb only through wireguard.
All of this you can easily google out.
1.setup wh server on share server
2.set wg clients
3.setup server firewall to limit ip
4.set explorer accounts on the devices

What are the tools you describe? Android or windows clients that will be using the hotspot? I use windows networked drives all the time over wireguard. Specifically windows clients to a windows server. If that is the case, wireguard is a layer 3 VPN so you need to specify the drive map by IP address or use DNS. it can look something like this: \\192.168.1.55\shared-folder or \\share.intranet.domain.com\shared-folder.

So, If I understand correctly, You have Android phones acting as the wireguard client.

You take this phone in the field and you want the machines that’ll connect to this android phone’s hotspot to be able to access network mapped drives. Am I getting this right?

If I get what you are trying to do correctly, Then, I have some bad news for you. This is not possible on android. Traffic generated by hotspot clients is not pushed through the VPN tunnel.

If my understanding is wrong, Then sure, This’ll work just fine. Linux/Windows server doesn’t matters much. Just use SMBv2(or newer) or SFTP/NFS whatever floats your boat and this’ll work just fine.

Yes, you set smb share on server where the drives are and you buy solid explorer for all clients.

Unfortunately, these servers a real Windows server not Linux machines. :-/

How do you manage those/your Android phones setups (user/passwords etc.) remotely?

Unfortunately you understood me right. Anyway, thank you very much for your really great answer, I appreciate that!

couldnt you:

use the phone to provide internet access.

The laptop connects to your vpn server.

run a mapped drive script after connection.

Very easy. Well how to share you can google. How to setup WG you can google. How to set firewall on specific lan you can google. The solid explorer is recomended for android as i am using it. In solid explorer you setup accounts on smb share. Very easy.
Just google “how to share files from windows 2008 R2 on lan” for exaple

Hey, I don’t know if you are still looking for a solution to this problem but I just found this out.

In Android 10, Under Hotspot & Tethering settings, There is a option called “Allow clients to use VPNs”. This setting will let you do what you are trying to do. I saw this in Lineage OS 17.1(aka android 10). I don’t know if this is available in other roms.

Yes, This would work just fine. I dont know if OP is allowed to do this as they didnt say so in the post.