Using WireGuard is the easiest method as I just spent an inordinate amount of time getting this to work on Tuesday. If you set it to Autostart it starts with UnRAID so that your entire server connects to the remote network.
Settings → Network Services → VPN Manager
Export the config from your WireGuard server and use the Import Tunnel button to bring it into UnRAID.
Use “VPN tunneled access for system” as the “Peer type of access” value.
Change the port to use what your WireGuard server uses…generally it’s 51820 for reference.
“Peer allowed IP’s” is the subnet you want to access on the remote network (ie 192.168.5.0/24).
I do this through pfsense, so I get total control. This is advanced but probably the way with the most control.
You can also run a docker as a proxy and then forward all your other dockers through that. And there are some dockers with VPN built in.
I’m not sure If the entire machine or only specific dockers can’t be linked in this way.
You can do either
If you do it in the Wireguard settings and set it to auto-start, the whole server will connect to the VPN
Or you can setup a specific docker container to connect to the VPN, and then have other containers use that container for their own connection. The nice thing about this is that you can point containers at the VPN without having to get a version that has the VPN built in, and you can share one VPN connection with multiple dockers if you don’t want the whole server to connect
I set up tailscale recently between my phone and server but haven’t been able to access my server remotely. Shows they’re connected but no luck. Ended up just using wireguard, but that has had its own issues over the past few weeks.
Really feel like I’m going crazy at this point lol
Would this make the entire Unraid server connect through the wireguard connection? And would the Unraid server still be locally accessible through the lan IP?
If you want to use a full tunnel (all internet traffic goes through the VPN) then you can set the “Peer allowed IP’s” to 0.0.0.0/24, otherwise, while the server will be able to see the remote networks like 192.168.5.0/24 only traffic destined for the remote network will traverse the VPN.
I’m not sure about the “full tunnel” and I can’t test right now as I’m not where that machine is should I screw it up, however, with the split-tunnel approach of using 192.168.5.0/24 it’s accessible via the local network IP as that’s how I’m using it currently.
Avec PFsense tu as un appareil physique supplémentaire?
Yes I do have a separate device. It can be a low power PC (mini PC). You can run it as a VM on Unraid. But it makes it more fragile. Because every time you reboot unraid, or make changes to the Array/Settings, you will disconnect the VM and lose DNS & DHCP on your entire network.
In my phone app (android) I hit the dropdown and there’s a run exit node option. I started that but still was unable to access my server using the ip address copied from the tailscale app.