Trying to install wireguard - Checking DNS resolver failed Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Totila
Posts: 56
Joined: Sun Aug 04, 2019 8:29 am

Re: Trying to install wireguard - Checking DNS resolver failed

Post by Totila »

That was it.

I entered a forwarding rule into the router that is in bridgemode to forward requests on 51820 to the fritzbox IP.

Wireguard now works, I can access my PI in LAN and via mobile connection.
User avatar
Joulinar
Posts: 4783
Joined: Sat Nov 16, 2019 12:49 am

Re: Trying to install wireguard - Checking DNS resolver failed

Post by Joulinar »

:) great
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Totila
Posts: 56
Joined: Sun Aug 04, 2019 8:29 am

Re: Trying to install wireguard - Checking DNS resolver failed

Post by Totila »

Joulinar wrote: Tue Jun 01, 2021 1:58 pm if not really needed go for IPv4 only. This will make thinks easier. Personally I'm using a FritzBox behind a Speedport. WireGuard is installed on myRPi4B and working without issues. I completely disabled IPv6 :)
Let me pick your brain here if you don't mind.

Something I don't quite understand is:
When I am connected via WiFi (being at home), all works as expected (ads are blocked, VPN works)

But when I am on mobile data, ads are no longer blocked as my Fritzbox takes the DNS from my bridged router which of course isn't my pi so my ISP resolves things and bypasses the pihole.

How would I need to setup things (i.e. the Fritzbox) to also have ad blocking when on the go? Is that possible when the Fritzbox is behind a router in bridgemode?

I tried to give my Fritzbox a static IP (under internet settings) that matches the he gets via DHCP at the moment (i.e. 192.168.0.2 with the bridged router having 192.168.0.1 by default) and setting the DNS server to my PI IP address. But this blocks Internet connection so something is wrong with how I approach things.

Could you support here as well? That would be great.
User avatar
Joulinar
Posts: 4783
Joined: Sat Nov 16, 2019 12:49 am

Re: Trying to install wireguard - Checking DNS resolver failed

Post by Joulinar »

No need to change anything on your FritzBox or another router. You need to set correct DNS server inside the Wireguard client app. What is the current DNS on the client?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Totila
Posts: 56
Joined: Sun Aug 04, 2019 8:29 am

Re: Trying to install wireguard - Checking DNS resolver failed

Post by Totila »

Current DNS in the wireguard client is 10.9.0.1
User avatar
Joulinar
Posts: 4783
Joined: Sat Nov 16, 2019 12:49 am

Re: Trying to install wireguard - Checking DNS resolver failed

Post by Joulinar »

Is this the server where PiHole is running on? Usually your Wireguard client will use Pihole and you should see the clients.as well in PiHole. At least as long as you pass the entire traffic to the VPN tunnel.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Totila
Posts: 56
Joined: Sun Aug 04, 2019 8:29 am

Re: Trying to install wireguard - Checking DNS resolver failed

Post by Totila »

Yes, that is the server the pihole is running on.

I can try to change that IP to the static PI address 192.168.200.2 and see if that helps.

Your comment re the full tunnel might be the challenge here.

If I pass all traffic through the tunnel, speed is super slow

So what I have entered into 'allowed IPs' is
'192.168.200.0/24, 10.9.0.0/24' assuming this would cover the VPN interface range as well as the Fritzbox Lan internal range.
I did this to not pass all traffic through VPN but only the DNS traffic (split tunnel)
User avatar
Joulinar
Posts: 4783
Joined: Sat Nov 16, 2019 12:49 am

Re: Trying to install wireguard - Checking DNS resolver failed

Post by Joulinar »

you could go for the local network only and change DNS in your clients to the local lan address of your DietPi system. This ways your clients should be able to reach PiHole as well.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Totila
Posts: 56
Joined: Sun Aug 04, 2019 8:29 am

Re: Trying to install wireguard - Checking DNS resolver failed

Post by Totila »

Change the DNS in the clients: where would you change that? Are you referring to change the DNS for every client on the client?

I would like to avoid this fiddling around and have it sorted automatically for very client that connects via wireguard VPN.

Any other idea why things (pihole ad blocking) don't work when out of home and connected via mobile data and active VPN tunnel?
Does that work with your setup?

I am a little clueless having so many places to change things (router in bridge mode, Fritzbox behind, pihole, wireguard server, smartphone).
User avatar
Joulinar
Posts: 4783
Joined: Sat Nov 16, 2019 12:49 am

Re: Trying to install wireguard - Checking DNS resolver failed

Post by Joulinar »

You are playing way to much on various devices. ;)
Just concentrate on a single mobile device and on the VPN connection to use PiHole.
No need to perform any setting on any router.

Yes, for me AdBlocking is working if I'm away from home as my WireGuard clients use PiHole as DNS server

You need to ensure for Pihole to be configured to LISTEN on all local interfaces

Code: Select all

pihole -a -i local
Below you can see my client config on a mobile device

Screenshot_20210603-135238.png

And next screen is showing my client using PiHole, including blocked request

picture.png
Important is to see WireGuard clients in PiHole dashboard.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply