What do you guys use / recommend to set up your own VPN to access your LAN services remotely?

@[email protected]
link
fedilink
English
132Y

People seem to like and recommend Tailscale. I have not gotten to setting it up. My setup involves reverse proxy with treafik and my services in docker. Any suggestions on how what I need to do would be welcome.

@[email protected]
link
fedilink
English
12Y

I’ve been using it for maybe a year now and it’s been rock solid. Highly recommended.

@[email protected]
link
fedilink
English
122Y

This is the exact script I use to install tailscale on my VPN server

Installing Tailscale

 curl -fsSL https://tailscale.com/install.sh | sh 

Enable IP forwarding

 echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.conf 
 echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.conf 
 sudo sysctl -p /etc/sysctl.conf 

Advertise subenets and exit node

 tailscale up --advertise-exit-node --advertise-routes=192.168.0.0/24,192.168.2.0/28,192.168.5.0/24,192.168.10.0/24
@[email protected]
link
fedilink
English
2
edit-2
2Y

Thank you for message, i appreciate the effort.

Where I struggle is the part where i need to expose my subnet within Tailscale. I don’t have any machineip:port delegated to the services anymore.

I got a domain name through CF, and have traefik generate unique url links as *service.mydomain.com that routes it to the specific service running in docker on my localmachine. It also takes care of certificates. Calling that service url only works within the local network.

In my docker compose set up, I removed all the ports as I dont access the services via ip:port. I hope this makes sense to you.

So it seems I need to configure Tailscale in such a way I can tunnel to my home network and then make the service.mydomain.com call. And that is where it got too complicated for me right now.

I also fail to understand if I need to run Tailscale native or in (the same) docker env.

Appel
link
fedilink
English
5
edit-2
2Y

You can run tailscale client on the host, not in a container. Then for the domain names, create a DNS record either in the public DNS (or I think you can do it in the internal tailscale DNS) that points a wildcard for your subdomains (*.domain.com) to the IP of the container host within the tailnet. Do “tailscale --status” on any device joined to the tailnet to see the IP addresses inside the tailnet. Then all of the devices will make their DNS request to either your upstream DNS or the internal one, they get the response back that they need to send their http request to the container host within the tailnet, it sends on the default 80 or 443 ports for http and https respectively, and then your reverse proxy handles the rest.

@[email protected]
link
fedilink
English
42Y

PiVPN. single line install script. Couldn’t be easier. Now if you have a shitty ISP like yours truly that can prevent you from being able to.

@[email protected]
link
fedilink
English
-102Y

I use this one-liner to set up an IPsec VPN server:

wget https://get.vpnsetup.net -O vpn.sh && sudo sh vpn.sh

Rikudou_Sage
link
fedilink
English
222Y

Security 101: Never blindly run shell scripts from a random comment on the internet.

@[email protected]
link
fedilink
English
32Y

A good tip in itself, but you can also look at the source and feel good or bad about it. I didn’t expect so many downvotes

https://github.com/hwdsl2/setup-ipsec-vpn

@[email protected]
link
fedilink
English
12Y

Tbf, a lot of applications and tools provide installation scripts in lieu of more elaborate manual setup. Doesn’t make it safer, but if you want to install something, you have to trust the source with shell access at some point anyway.

@[email protected]
link
fedilink
English
92Y

It’s also piped to sudo so that’s super cool too

@[email protected]
link
fedilink
English
42Y

I sure hope there isn’t a rm -rf floating around in there somewhere… kind of like a certain past incident with major gaming client.

@[email protected]
link
fedilink
English
12Y

I want to know more 😳 do you have something? A link?

Rikudou_Sage
link
fedilink
English
72Y

In the Steam Linux client, there was this line: rm -rf "$STEAMROOT/"*.

If the variable $STEAMROOT isn’t defined (or is an empty string), it basically runs rm -rf "/"*, which means delete all subfolders of /.

@[email protected]
link
fedilink
English
22Y

😱😱😱😱😱😱😱😱😱 I don’t know how to express how much this shocked me

GreenDot 💚
link
fedilink
English
12Y

Check netmaker for wireguard vpn if you want a ui, but its straightforward to set it up manually.

@[email protected]
link
fedilink
English
5
edit-2
2Y

Was running Wireguard and am now in the process of changing over to Tailscale (Headscale).

It uses Wireguard for the actual connections but manages all the wireguard configs for you.

@[email protected]
link
fedilink
English
42Y

Why have you decided to switch?

@[email protected]
link
fedilink
English
6
edit-2
2Y

Getting the configs to work with my personal devices was already a little finicky but doing that for not-so-technical family members was starting to be a bit too much work for me.

I’m hoping that Headscale will cut that down to pointing their app at the server and having them enter their username and password.

@[email protected]
link
fedilink
English
52Y

I came here to say exactly this - WireGuard is great and easy to set up, but it gets harder as you add more people, especially less technical ones, as getting them to make keys and move them around etc becomes a headache. Tailscale also minimizes the role of the central server, so if your box goes down the VPN can still function. Tailscale can also do some neat stuff with DNS that’s pretty nifty.

@[email protected]
link
fedilink
English
22Y

One thing that helped a ton with that for Wireguard (for either you or anyone else reading this) is: You can generate QR codes for a peer’s full Wireguard config! So you can create the images on your computer and then a non-technical user can just scan the code to get configured.

@[email protected]
link
fedilink
English
72Y

tailscale 100 times over

@[email protected]
link
fedilink
English
42Y

My MikroTik has built in WireGuard functionality so it was an easy pick 😁

Giddy
link
fedilink
English
52Y

i have pivpn (wireguard+pihole) running on a pi zero and it is rock solid

varaki
link
fedilink
English
4
edit-2
2Y

I installed OpenWrt on my home router and set up wireguard on it. If you have dinamic IP address assigned by your ISP, like me, you also have to setup a dynamic dns updater on the router. I use duckdns.org. Then you have to open the port for wireguard on the router. Here’s a video guide on how to do it: https://www.youtube.com/watch?v=Bo2AsW4BMOo

@[email protected]
bot account
link
fedilink
English
72Y

Here is an alternative Piped link(s): https://piped.video/watch?v=Bo2AsW4BMOo

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I’m open-source, check me out at GitHub.

@[email protected]
link
fedilink
English
22Y

I use this too. It is excellent

@Coldus12 I got wireguard hosted on my openwrt router. Straightforward and no fuss.

@[email protected]
link
fedilink
English
02Y

While I’ve never used it personally I’ve heard good things about cloudflare tunnel.

@[email protected]
link
fedilink
English
22Y

Depends on the use case. Cloudflare tunnels are great for accessing services, but not your network. I have a dockerised vscode instance behind a cloudflare tunnel attached to a personal domain that uses white listed emails as authorisation. Fantastic set up, can access my coding environment from anywhere with an internet connection as long as I can click the verification link in my emails.

To access my network itself though, wireguard is better. I just use pivpn (coupled with pihole for on the go adblock) on a rpi.

@[email protected]
bot account
link
fedilink
English
46
edit-2
2Y

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

Fewer Letters More Letters
CF CloudFlare
DNS Domain Name Service/System
VPN Virtual Private Network
VPS Virtual Private Server (opposed to shared hosting)

4 acronyms in this thread; the most compressed thread commented on today has 14 acronyms.

[Thread #6 for this sub, first seen 19th Jul 2023, 10:30] [FAQ] [Full list] [Contact] [Source code]

Lodion 🇦🇺
link
fedilink
English
122Y

Good bot.

Dandroid
link
fedilink
English
72Y

great bot

@[email protected]
link
fedilink
English
42Y

THE BEST bot

@[email protected]
link
fedilink
English
22Y

MVP bot

@[email protected]
link
fedilink
English
452Y

Wireguard (if you can open udp ports)

@[email protected]
link
fedilink
English
5
edit-2
2Y

deleted by creator

@[email protected]
link
fedilink
English
102Y

That’s what I’m using, though I’ve used wg-easy, which made the setup, well, easy.

@[email protected]
link
fedilink
English
32Y

Yup, WG easy works pretty well

kalipike
link
fedilink
English
32Y

Tailscale all the way.

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  • Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.
  • No spam posting.
  • Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.
  • Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
  • No trolling.

Resources:

> Any issues on the community? Report it using the report flag.

> Questions? DM the mods!

  • 1 user online
  • 218 users / day
  • 9 users / week
  • 244 users / month
  • 841 users / 6 months
  • 0 subscribers
  • 542 Posts
  • 8.93K Comments
  • Modlog