Create a virtual network (VPN?) between my home server and my VPS (Without routing any of my internet through the VPN) reddit / selfhosted ---------------------------------------------------------------------- mreggman6000 · 2023-10-01 08:18 So because of stuff my ISP started doing, I can't port forward my home server anymore. The solution I have right now is to tunnel every service manually with an SSH tunnel to my VPS, but it's very inconvenient and slow. I am looking for an alternative and I'm wondering if it's possible to set up a virtual network between my VPS and home server (and also possibly other servers I set up in the future) so they can access each other as if they're in the same network. I'm pretty sure I should set up a VPN, but I don't really know where to start. The thing is that I don't want to route any of my internet access through the VPN, I just want to be able to access services on my home server from my VPS. What software should I use and how should I configure it to fit my needs? I feel like this shouldn't be too complicated? (Hopefully) But I haven't been able to fully understand how to setup and configure VPNs like Wireguard or OpenVPN properly myself ---------------------------------------------------------------------- chaplin2 · 2023-10-01 08:26 Tailscale. If it can make direct connections, you are done. ---------------------------------------------------------------------- lowsodiumenergy · 2023-10-01 08:29 I had a similar problem and solved it with Tailscale: https://tailscale.com/kb/1151/what-is-tailscale/ ---------------------------------------------------------------------- gioco_chess_al_cess · 2023-10-01 08:40 I tried many services and I can give different recommendations in case of a mesh VPN but, if you just need to connect two peers, go for wireguard and call it a day. An alternative could be nebula which is maybe slightly easier and can become a mesh VPN later on. Nothing beats wireguard in terms of potential speed. ---------------------------------------------------------------------- marvelish · 2023-10-01 09:00 I use this too, op should try it out. It's pretty slick ---------------------------------------------------------------------- keechy1231 · 2023-10-01 09:37 Another vote here for tailscale. Its free, easy to set up and just works. ---------------------------------------------------------------------- ithakaa · 2023-10-01 11:14 Tailscale ---------------------------------------------------------------------- mreggman6000 · 2023-10-01 12:04 Okay, I tried Tailscale and it was very easy and does exactly what I was looking to do. But I still kinda want to try to set up Wireguard myself so I don't rely too much on third-party services. Do you know of any beginner- friendly Wireguard tutorial to replicate something similar to Tailscale? I'm decent at general Linux, but not really when it comes to Networking ---------------------------------------------------------------------- Apart_Ad_5993 · 2023-10-01 12:23 I mean, your VPS is a third party service.... ---------------------------------------------------------------------- Apart_Ad_5993 · 2023-10-01 12:25 Can't recommend Tailscale enough. No port forwarding, busts through CGNAT, and dead simple to set up with advertised routes or exit nodes. ---------------------------------------------------------------------- mreggman6000 · 2023-10-01 12:32 Well yeah but a VPS is just a simple server, there's many VPS providers and they basically provide the same service. But Tailscale is a bit more specific, and I have no idea where to move to if they shutdown or change/remove their free tier. And also I said that I don't want to rely *too much* on third-party services, not completely stop relying on third-party services. That would be wayyy too complicated for me. ---------------------------------------------------------------------- Apart_Ad_5993 · 2023-10-01 12:42 People bring up this longevity argument all the time. The cold truth is that it's a homelab - it's really just for tinkering, not an enterprise grade/production network. If it goes belly up, you really haven't lost anything. There are other mesh providers out there like ZeroTier which have been around for many years. They just expanded their free tier due to popularity, and I presume exposure. I don't think they're going to close up any time soon. I've set up Wireguard/OpenVPN tunnels. They're a pain in the ass that I really don't want the hassles with anymore. Especially if you have a dynamic IP. Once they're up and working nothing really changes. I'd much rather focus on other things than maintaining a VPN. Just my thoughts. If Tailscale dies tomorrow, meh. I'll move on to the next contender. But 3+ years in and it's getting better all the time. ---------------------------------------------------------------------- mreggman6000 · 2023-10-01 12:55 Well the reasons I gave wasn't *really* a real/serious concern, I just wanted to see if I can do it myself (with Wireguard) or if it would be too complicated (in that case I would just stay with Tailscale, which is perfectly fine). I just thought it would be relatively simple to do, just run a server on my VPS, configure some authentication stuff, run the client on my other servers and point it to the VPS, maybe change that one line of config or whatever so the internet access does get routed through, and then it would just work. Though that was obviously just my imagination, and the reality is going to be much more complicated. ---------------------------------------------------------------------- SammyDavidJuniorJr · 2023-10-01 13:55 You can set up Headscale if you dont want to rely on Tailscale. https://github.com/juanfont/headscale ---------------------------------------------------------------------- mreggman6000 · 2023-10-01 14:01 That looks interesting, I will check it out! ---------------------------------------------------------------------- wowkise · 2023-10-01 18:49 Depends on how large your home lab is. However for simple cases running a wg server on your VPS and connecting to it from your home lab is the easiest solution, Install caddy or nginx as frontend proxy and forward requests to your home lab wg ip. I just used this method to get aws region that was close to where i am traveling now and the speed gain is real i can actually stream my libraries now. ---------------------------------------------------------------------- PaulEngineer-89 · 2023-10-02 01:04 Wireguard by itself won’t get you where you want. On most ISPs, even those with CGNAT, you can still route packets out and once the outgoing port is open if the IP/port is known you can send packets from another source back to it. Even BitTorrent uses this trick.