Unifi Gateway WireGuard VPN with Private DNS?

jj2d2

New Member
I have a unifi gateway. I have successfully built and used some Wireguard servers on it. One cavate. it sets the DNS as the VPN gateway IP. I want to use my private DNS server on my network I am connecting to.

For example.
My WireGuard DNS creates a network of 192.168.5.0/24
My DNS is on my internal network which is 10.1.1.0/24 (dns ip is 10.1.1.2)

When I setup my wireguard and leave it as auto DNS, it sets the device dns address to 192.168.5.1

If I change it, and set it to use 10.1.1.2 I get no internet traffic. I can't go to any web pages, however, if I go to 10.1.1.2 in my web browser it pulls up the web interface of my DNS server just fine. Not sure why I can reach the device, but DNS won't work.

I can't figure out how to get it to use my private DNS... any ideas?
 
nevermind, I got it. my DNS was blocking it because it was a "different subnet", fixed that firewall rule and seems to be working!
 
Sounds like you got it, just permitting tcp/udp 53 across that boundary.

Packet capture also helps rule out tunnel vs filter such as like 'requests arrive through the tunnel but no response' .

We wireguard out our iot and guest segments to a foreign VPS with policy based routing, definitely a handy feature on unifi.
 
Back
Top