this post was submitted on 27 Oct 2023
16 points (94.4% liked)

Selfhosted

40728 readers
314 users here now

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:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

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

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Is there any possibility to get wireguard working to access my raspberry pi from outside my home? I've port forwarded the wireguard udp port and it doesn't work... Likely because I'm behind a NAT. My wan public ip is like 10.x.x.x which is most likely a private ip. Running tailscale for now

top 13 comments
sorted by: hot top controversial new old
[–] SK4nda1@lemmy.ml 19 points 1 year ago (1 children)

I'd advise to use headscale on a vps somewhere. Its tailscale but selfhosted.

[–] biscoot@lemmy.getmeotter.work 8 points 1 year ago

Not OP, but thanks for sharing about headscale. I wasn't aware this existed. Probably won't make a switch to it anytime soon, personally. I have way too much connected on tailscale right now.

[–] Schmeckinger@feddit.de 6 points 1 year ago

Another thing is if where you want to access it from has a IPv6 then you can just connect via IPv6.

[–] vzq@lemmy.blahaj.zone 5 points 1 year ago

Tailscale or zerotier or a similar tool is the right one for the job.

[–] DevoidWisdom@sh.itjust.works 4 points 1 year ago (2 children)

I'm in the same boat so I setup a $2.50/mo VPS and that's my gateway. It took a little bit to get the nftables on vps to work right. I'd recomemned tailscale or similar if you want easy, though I've not ever used them myself.

[–] parim19532@lemmy.dbzer0.com 1 points 1 year ago (1 children)

Can you point me to your vps provider?

[–] DevoidWisdom@sh.itjust.works 1 points 1 year ago

I sent you a message They are bit bare bones compared to other host but I haven't had any issues with them in over a year. On the wireguard side you're looking for a spoke and hub setup.

This covers it fairly well. https://www.procustodibus.com/blog/2020/11/wireguard-hub-and-spoke-config/

Good luck.

[–] Schmeckinger@feddit.de 1 points 1 year ago* (last edited 1 year ago) (1 children)

What would be the added latency. I was thinking of doing something like this and I could get a 3$ month VPS about 30km from where I live. I was thinking of doing something like that for remote gaming on my powerful desktop. Annoyingly I have cgnat and a IPv6 from where I live and no IPv6 from where I want to access it.

[–] DevoidWisdom@sh.itjust.works 0 points 1 year ago (1 children)

At best it will add whatever the extra hop is and any network congestion. My VPS host is 2200km away. I should find a closer one.... but it adds 160ms with some spikes in the 200-300 range. This is round trip 4400km roughly All things considered not too bad. My VPS is a 1vCPU, 1GB ram, 1Gbit unmetered, only as wireguard server. Hope that helps.

[–] Schmeckinger@feddit.de 1 points 1 year ago

The VPS I would book would be the same and the CPU is a unnamed intel 2.6 ghz, so that sounds good.

[–] Knusper@feddit.de 3 points 1 year ago (1 children)

It is definitely possible, yeah. Tailscale and similar don't do magic either.

I'm not sure on the specifics, though. I think, you want a TURN server or a STUN server.

[–] vzq@lemmy.blahaj.zone 1 points 1 year ago

I’ve gotten decent results with NAT traversal tricks, but the only way I’ve gotten it to perform reliably is with a relay fall back.

This is exactly what you get with tailscale.

[–] pyt0xic@lemmy.world 1 points 1 year ago

You need to expose the ports you want to access on an external, publicly accessible server like a cheap vps. Then you can use wireguard to forward the traffic to your Pi.

I haven't done it in a long while, so I can't explain it well enough, try searching for "vps wireguard gateway". That should bring up some blog posts that will explain the process better. I used a VPS I got on the AWS free tier, you really don't need anything expensive.