only tested on Ubuntu 19.04 but should theoretically work on any Ubuntu system
wget https://raw.githubusercontent.com/ComputeHole/setup.sh/master/setup.sh
chmod +x setup.sh
sudo ./setup.sh
setup.sh will install and configure Pi-hole, unbound, and pivpn on your Ubuntu machine (real metal or VM).
the original idea was to assist myself (and others) with setting up Pi-hole and pivpn on Google Compute Engine but it should also work for running this setup in other places.
-
Pi-hole will use unbound on
127.0.0.1#5353
&&::1#5353
-
openVPN will be configured as a split tunnel (only DNS traffic) on
Pu.bl.ic.ip:8080
with subnet10.80.80.x
-
openVPN will be configured as a full tunnel on
Pu.bl.ic.ip:443
with subnet10.4.43.x