PiVPN with Wireguard and PiHole not working correctly Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
nilsacht
Posts: 19
Joined: Mon Jan 18, 2021 9:33 am

PiVPN with Wireguard and PiHole not working correctly

Post by nilsacht »

Hello there,

sorry for my english first.

Now I have a problem with my configuration. I have installed PiVPN and set it up with Wireguard and PiHole. My VPN connection works and I can access my DietPi vie SSH. But thats it. No other connection is working.

I set up PiHole via my Routers DNS entry. My Router is DHCP Server and give my clients my PiHole as first DNS.

When I connect via VPN now I have no internet connection and can not access my other Pi via SSH. The net.ipv4.ip_forward=1 option is enabled in my sysctl.conf.

Where can I configure this correctly or disable PiHole usage?

Thanks
User avatar
Joulinar
Posts: 3703
Joined: Sat Nov 16, 2019 12:49 am

Re: PiVPN with Wireguard and PiHole not working correctly

Post by Joulinar »

Hi,

Pihole is responsible for DNS resolution only. Means you should be able to access your local network via direct IP. If this is not working, it has nothing to do with PiHole. On your VPN clients, I would set your VPN serevr/PiHole as DNS. I guess they are running on same SBC. Inside Pihole > DNS settings, you would need to activate Listen on all interfaces
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
nilsacht
Posts: 19
Joined: Mon Jan 18, 2021 9:33 am

Re: PiVPN with Wireguard and PiHole not working correctly

Post by nilsacht »

Ok, so I changed on my Wireguard Android Client the DNS Server. PiHole and VPN are on the same machine (Pi 4). The settings are already set. But it still not working. Either internet nor ssh to another pi.
User avatar
Joulinar
Posts: 3703
Joined: Sat Nov 16, 2019 12:49 am

Re: PiVPN with Wireguard and PiHole not working correctly

Post by Joulinar »

if you connect to other systems using SSH, do you use DNS name or an IP address. If it is an IP address, this hast nothing to do with PiHole. Most probably a routing issue. can you shares output of sysctl net.ipv4.ip_forward
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
nilsacht
Posts: 19
Joined: Mon Jan 18, 2021 9:33 am

Re: PiVPN with Wireguard and PiHole not working correctly

Post by nilsacht »

I access them via ip adress.

The output of sysctl net.ipv4.ip_forward is:

net.ipv4.ip_forward = 1
Sibbefufzich
Posts: 11
Joined: Mon Jan 18, 2021 6:12 pm

Re: PiVPN with Wireguard and PiHole not working correctly

Post by Sibbefufzich »

Hey everyone,

I have a very similar, if not the exact same problem.

I hope this is not against some forum rules but to save me the time to type every detail of my problem, here is a Link to Reddit, where I already started a discussion which is not yet resolved: https://www.reddit.com/r/WireGuard/comm ... king_post/

Hope this helps a bit and I will keep you updated if I find the solution.
User avatar
Joulinar
Posts: 3703
Joined: Sat Nov 16, 2019 12:49 am

Re: PiVPN with Wireguard and PiHole not working correctly

Post by Joulinar »

just a stupid question. Does any of you is using Docker on your Wireguard server?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
nilsacht
Posts: 19
Joined: Mon Jan 18, 2021 9:33 am

Re: PiVPN with Wireguard and PiHole not working correctly

Post by nilsacht »

I had docker installed but uninstsalled it after I haven't the time to get used to it. Installation and uninstall are made through the software-dialogue.
Sibbefufzich
Posts: 11
Joined: Mon Jan 18, 2021 6:12 pm

Re: PiVPN with Wireguard and PiHole not working correctly

Post by Sibbefufzich »

Haven't had Docker installed. My Setup only consists of PiHole and Wireguard.
User avatar
trendy
Posts: 220
Joined: Tue Feb 25, 2020 2:54 pm

Re: PiVPN with Wireguard and PiHole not working correctly

Post by trendy »

Is it possible to get the following before and after you connect to the VPN?

Code: Select all

ip -4 addr; ip -4 ro li table all; ip -4 ru; iptables-save -c; netstat -lnp
and point out which service is not running after the vpn is up.
Post Reply