Wireguard + Pi-hole on Debian 10 DNS not resolving?

The issue I am facing: Can't resolve DNS when I set custom DNS to 10.7.0.1.

My network is on 192.168.0.1/24

Details about my system: Debian 10 VM

What I have changed since installing Pi-hole:
Followed this tutorial How to Setup Wireguard + Pi-hole on Debian 10 / Ubuntu 18.04 | Jason’s Notes
and got this when tested:

  [i] This can be changed using 'pihole -a -p'

  [i] View the web interface at http://pi.hole/admin or http://10.7.0.1/admin

  [i] You may now configure your devices to use the Pi-hole as their DNS server
  [i] Pi-hole DNS (IPv4): 10.7.0.1
  [i] If you set a new IP address, please restart the server running the Pi-hole

  [i] The install log is located at: /etc/pihole/install.log
Installation Complete! 
root@debianpiholewireguard:~# host google.com 10.7.0.1
Using domain server:
Name: 10.7.0.1
Address: 10.7.0.1#53
Aliases: 

google.com has address 172.217.14.206
google.com has IPv6 address 2607:f8b0:400a:809::200e
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
root@debianpiholewireguard:~# host pagead2.googlesyndication.com
pagead2.googlesyndication.com has address 0.0.0.0
pagead2.googlesyndication.com has IPv6 address ::
pagead2.googlesyndication.com has address 0.0.0.0
root@debianpiholewireguard:~# 

Here's output of ping on Windows

C:\Users\johnny>ping 1.1.1.1

Pinging 1.1.1.1 with 32 bytes of data:
Reply from 1.1.1.1: bytes=32 time=17ms TTL=57
Reply from 1.1.1.1: bytes=32 time=22ms TTL=57
Reply from 1.1.1.1: bytes=32 time=18ms TTL=57
Reply from 1.1.1.1: bytes=32 time=16ms TTL=57

Ping statistics for 1.1.1.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 16ms, Maximum = 22ms, Average = 18ms

C:\Users\johnny>ping google.com
Ping request could not find host google.com. Please check the name and try again.

C:\Users\johnny>

What am I doing wrong?

TIA

You've likely misconfigured WireGuard.
Without knowing the WireGuard configuration of all peers involved, advice can only be guessed for.

Even if those configuration details were known, it wouldn't be a Pi-hole issue.

You may improve your chances for a knowledgeable answer by also reaching out to the guy who wrote the instructions and/or to WireGuard's support.

Thanks for the reply. I will continue to search for the solution.

In general, you should stick with the recommendation of whatever guide you've used, but one quick thing you could try is to see whether switching Pi-hole's Interface listening behavior under Settings | DNS would make a difference for you.

You could also check out the official Pi-hole Wireguard guide and compare your configuration to our recommendations. So far, the guide is only available as draft but it should soon be added to the official documentation.

Got it to work with the help of guy who wrote the how-to!

My problem was that the port was not forwarded and DNS needed to be changed to 10.7.0.1

client.conf need to be updated to the following:

[Interface]
Address = 10.7.0.2/24
DNS = 10.7.0.1
PrivateKey = 4P1AacAvZY1hLqxqimiCxKK4Bwxl8Hu1B363mXXXXX

[Peer]
PublicKey = MYKEYHERE
PresharedKey = 0EoTIV1xuU5nmLiMP/Glxd+BkdkYrhHJ1A1XXXXX
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = MyPublicIP:51820
PersistentKeepalive = 25

Hope it helps someone!

What is exactly as explained here:

plus

:slight_smile:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.