I've got pihole running on a raspberry pi no problem, but unlike the tutorials, I've put openvpn on an Intel NUC running Ubuntu for increased throughput. The plan is that the pihole should work whether or not a device is connected to openvpn, and it should work for both internal vpn connections and external vpn connections via a ddns service. An even larger plan is to have openvpn connect to a paid VPN service, but one step at a time.
This used to work on the same hardware but broke after reinstalling. I've been struggling for weeks to rebuild this setup with no luck. Whenever I connect to openvpn, internally or externally, I lose connectivity to the internet on that device. I'm novice with linux so please bear with me as I try to remember the changes I made. I primarily followed this tutorial and this post as my starting points and altered IP addresses where I thought appropriate to allow for two devices.
The pihole's IP is 192.168.17.3:53, the NUC openvpn is 192.168.17.4:1101.
Openvpn is running on TUN0 and I've added this line to /etc/dnsmasq.d/99-overrides.conf.
interface=eth0
interface=tun0
This didn't work so I also tried both of the "listen on all interfaces" options in the pihole GUI to no avail. Currently the GUI is set to listen on all interfaces at most one hop away.
I start to really lose the shape of the networking puzzle when configuring openvpn on the NUC. The tutorial section for LAN & VPN at the same time (which is what I'm aiming for) had me push a route and a dns IP in openvpn/server.conf. I presume that this is in addition to the routes that already exist, so here's that entire section of the file:
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig 10.8.0.1 10.8.0.2
push "route 10.8.0.1 255.255.255.255"
push "route 10.8.0.0 255.55.255.0"
push "route 0.0.0.0 "
#push "dhcp-option DNS 208.67.222.222"
#push "dhcp-option DNS 208.67.222.220"
#push "dhcp-option DNS 10.8.0.1"
push "dhcp-option DNS 192.168.17.3"
push "redirect-gateway def1"
I don't yet understand what routes are all about so I hope those are correct at their defaults. I also hope one of those two DNS IPs is the right one. The LAN+WAN tutorial directs me to use the pihole IP, but neither seems to work. Note that I commented out the default opendns servers since the pihole should be handling that on its own.
That tutorial finishes up by telling me to change the pi-holes interfaces from eth0 to tun0. I deviated from the instructions here since tun0 is on the openvpn device and left it alone at eth0.
I'm probably forgetting some change I made while following along in various tutorials and posts and I apologize in advance for any complications.
I'm at my wits end here. Please, if you can, help me put this puzzle together.