1

I am trying to learn WireGuard. I see many tutorials online for how to have internet and local network access over WireGuard. However, what I would like is a connection where the peer can access my home network, but still uses the peer's own internet connection. Not sure if I just need to modify the iptables in wg.0 or what is needed to do this.

My side question is if I can setup 2 different connection types on the same WireGuard server, ideally I would like to have one connection LAN Only, and another LAN + Internet (and using my pihole as DNS). Is this doable, do I just need a wg.0 and a wg.1 and then assign the peers to the appropriate wg.x connections? I am running Proxmox and can certainly make 2 WireGuard LXC containers but if I can do it from the same server that is ideal.

Boosted1g
  • 11
  • 3
  • The "peer" decides what is routed through wireguard using allowed IP's – Jaromanda X Apr 08 '23 at 02:13
  • Ok thanks. Set the allowed IPs to the subnet and dns to cloudflare and works like a charm. Setup one profile on peer for web+lan, and one for lan only – Boosted1g Apr 11 '23 at 03:24
  • @Boosted1g Can You please share the config, how You did it? Are You using any UI for the configuration? – SzakiLaci May 24 '23 at 08:58
  • 1
    @SzakiLaci The setting is on the client side not the server. FOR LAN + INTERNET: [Interface] DNS = (ip of home DNS server or home router) [Peer] AllowedIPs=0.0.0.0/0 FOR LAN ONLY [Interface] DNS = (your preferred DNS, so 8.8.8.8 for google, or 1.1.1.1 for cloudflare, etc,) [Peer] AllowedIPs = (your home subnet in CDIR, so for example 192.168.1.0/24) -- By setting the AllowedIPs to only be your home subnet, it causes all public internet IPs to be excluded from the VPN connection and thus it will use your native internet connection on the client. – Boosted1g May 26 '23 at 22:15

0 Answers0