this post was submitted on 25 Feb 2024
24 points (100.0% liked)

Selfhosted

40347 readers
397 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 1 year ago
MODERATORS
 

I got a bunch of self-hosted stuff and use a VPS that has a public IPv4 to access my services because my home network has only DS-Lite. My home server ist connected to the VPS using Wireguard.
Now I want to connect my Smartphone to my VPN to be able to access some local services remotely. I'm able to add a second peer to the Wireguard config on the VPS, but I'm struggeling to configure the AllowedIPs correctly.
The VPS apparently needs AllowedIPs 10.0.0.0/24 and 192.168.178.0/24, but the Smartphone as well for both to redirect request into my home network. But it's not possible to configure the same IP ranges for two peers. What do I do?

EDIT: Solved: https://iliasa.eu/wireguard-how-to-access-a-peers-local-network/

you are viewing a single comment's thread
view the rest of the comments
[–] atzanteol@sh.itjust.works 7 points 9 months ago (2 children)

The allowed IP range on each client indicates what private address the server can use

I really dislike this description - yet I see it everywhere. It caused me a ton of confusion initially.

It's the IP addresses that will be routed over the VPN. So if you wanted, say, all traffic to go through the VPN then you would use "0.0.0.0/0". Which is what I do for my phone.

[–] notabot@lemm.ee 4 points 9 months ago

Sort of. If you're using wg-quick then it serves two purposes, one, as you say, is to indicate what is routed over the link, and the second (and only if you're setting up the connection directly) is to limit what incoming packets are accepted.

It definitely can be a bit confusing as most people are using the wg-quick script to manage their connections and so the terminology isn't obvious, but it makes more sense if you're configuring the connection directly with wg.

[–] bobs_monkey@lemm.ee 1 points 9 months ago

I've always understood it as the x.x.x.0/x being the gateway designator and network identifier, followed by the range of allowable IP addresses