It’s entirely possible I’m just not understanding how this works and this is expected but maybe there’s a fix.
I’m using Dietpi-VPN with PIA, a pihole and Unbound. Everything works fine UNTIL I try to enable the VPN Killswitch. Then I get “DNS Cannot be Resolved” errors for every website. I turn off the Killswitch and the errors remain until I reboot the Pi.
Is this the expected behavior? Or is there some way to have this work?
Usually the killswitch blocks all traffic which doesn’t go through the VPN. If pihole and unbound run on a different device, it is not weird that the communication is blocked, especially if the killswitch is too tight.
If pihole and unbound run on the same dietpi, then it depends on which nameservers they are using. If for example you are using the ones provided from the ISP, they won’t work through the vpn.
Which scenario is yours?
It matters.
The problem with the DNS is when browsing on the dietpi or from another host in the lan? As @Joulinar mentioned, enabling killswitch cuts of all communication to the local lan.
That’s right (although it is better to add tcp/53 as well), but I guess you also need to allow the responses as well, either statefully or statelessly.
Also DHCP needs to be allowed.
Still having the same issue. If it’s not something that can be resolved it’s not a dealbreaker or anything, the VPN works fine and hasn’t had many disconnection issues. Just trying for that added layer of security if possible.
Jep definitely, UDP port 53 incoming and outgoing packages need to be allowed from/to LAN, similar like how we do it for TCP port 22 (SSH). The respective rules could be copied and applied via post-up script in dietpi-vpn.
For DHCP again the same for UDP port 67 incoming and 68 outgoing, of I’m not mistaken.