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/

  • Dataprolet@lemmy.dbzer0.comOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Thanks, but I have configured a dedicated IP range for my Wireguard network, so the devices have IPs like 10.0.0.1. But I still want to access services in my home network in the IP range 192.168.178.0/24.

    And in your example the AllowedIP = 192.168.178.2/32 of the VPS would still make it possible to route traffic from my smartphone via the VPS to my home server?

    • notabot@lemm.ee
      link
      fedilink
      English
      arrow-up
      4
      ·
      10 months ago

      Ah, ok. You’ll want to specify two allowedip ranges on the clients, 192.168.178.0/24 for your network, and 10.0.0.0/24 for the other clients. Then your going to need to add a couple of routes:

      • On the phone, a route to 192.168.178.0/24 via the wireguard address of your home server
      • On your home network router, a route to 10.0.0.0/24 via the local address of the machine that is connected to the wireguard vpn. (Unless it’s your router/gateway that is connected)

      You’ll also need to ensure IP forwarding is enabled on both the VPS and your home machine.

      • Dataprolet@lemmy.dbzer0.comOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        I actually don’t know. All I want to achieve is having access from my smartphone to my local network via the VPS, which is the only device with a public IP. So it’s basically a point-to-site connection from my smartphone to my home server with the VPS in between.

        And I just followed a tutorial and that’s why I set up the 10.0.0.0/24 IP range.