Hi. Today I installed OpenVPN and PiHole on a fresh ubuntu 18.04 LTS VPS on DigitalOcean - I used the instructions here : Redirecting...
I created my .ovpn profiles and loaded them on my macbook pro (OSX) and iPhone (iOS). The blacklisted domain (google.com) loads without a problem on both devices when connected to OpenVPN. My guess was that I had screwed something up during install. I deleted VPS and spun up a new VPS, installed OpenVPN+PiHole again and I got the same results.
This time, on OSX, I forced computer to use PiHole address as DNS - when I did this, I was indeed blocked from google.com.
Has anyone experienced this issue too or did I miss something?
I looked over the page you linked. I think what you're referring to is the line :
push "dhcp-option DNS 10.9.0.1"
I had already included that equivalent line in my openvpn server.conf file. I have it set to the IP address listed under tun0 when entering console command (within ubuntu VPS) :
ifconfig
were you referring to the next instruction in the page you linked, the next instruction is to comment out a line :
# push "redirect-gateway def1 bypass-dhcp"`
that, I haven't done as it indicates my web traffic will not go through VPN.
Also, when I connect to OpenVPN from either one of my clients/devices, doing a google search on "what is my ip address" does in fact return the IP address of the VPS I've spun up.
update - I've been trying to get PiHole to work on Ubuntu 18 + OpenVPN with no luck (only worked if I manually updated the DNS server on the client). My understanding is that Ubuntu 18's introduction of Netplan (https://www.linuxincluded.com/install-pi-hole-on-ubuntu/) disrupts PiHole.
I've since spun up an instance of Ubuntu 16 + PiHole + OpenVPN and all works as intended without having to manually set DNS address on client.