I just setup Unbound DNS on my home server (read: old laptop screaming for dear life next to my router). Everything is working well, I can access it and use it as my DNS server on my desktop which is connected to the same network as my server.
The issue is with trying to get my phone to use Unbound while connected to the same laptop through Wireguard. If I’m connected to the Wi-Fi and disconnected from Wireguard, I can nslookup on my phone using the Unbound server, but as soon as I’m connected through Wireguard it can’t access the DNS server.
I suspect it has something to do with the fact that I run Wireguard through Docker but Unbound is setup directly on the host machine, and the container isolation is what’s causing my issues. However, I tried adding
extra_hosts: - "host.docker.internal:host-gateway"
to my docker-compose.yml for Wireguard, and tried accessing the DNS using the host IP inside the docker interface, but it didn’t work.
Does anyone have any leads or tips on how to properly configure this? Thanks in advance!
just_another_person@lemmy.world 19 hours ago
I’m…totally lost here. You’re trying to use two different VPNs on your local network? If you want your Unbound device to be a VPN exit node for your network, why wouldn’t you just setup routes to make it your default gateway?
Using two different VPM tunnels like this is going to just cause routing issues all over the place if you’re already unfamiliar with how to setup the routing to begin with.
Evkob@lemmy.ca 19 hours ago
I think you misunderstood part of my post, because there’s only one VPN tunnel, from the WG client on my phone to the WG server on my laptop.
I want my phone to use the Unbound DNS server, which is hosted locally on the same laptop that runs my Wireguard server.
just_another_person@lemmy.world 19 hours ago
Ah, okay. If this is Android, just setup your Unbound host IP under ‘Private DNS’ on your phone then.
Note: this will cause issues once you leave your home network unless your WH tunnel is available from outside. Set the secondary DNS to Mullvad or another secure DNS provider if that’s the case and you shouldn’t have issues once leaving the house.