Skip to content
Cybersecurity > Server

How to use Pi-hole with OpenVPN on Raspi?


PiVPN (OpenVPN) can work using the Pi-hole DNS server on a Raspberry Pi.

Coupling PiVNP and Pi-hole

Change of DNS server

You can change the DNS server in the OpenVPN settings file as follows:

sudo nano /etc/openvpn/server.conf

Then replace the current DNS adding the instructions, with the Raspi IP on the second line:

push "route 192.168.1.0 255.255.255.0"
push "dhcp-option DNS 192.168.1.47"

In case of problem, here is also the How to force PiHole to listen locally

pihole -a -i local

(pihole -a -i single to cancel)

Leave a Reply

Your email address will not be published. Required fields are marked *