cyber-privacy.net » Cybersecurity » Server » How to use Pi-hole with OpenVPN on Raspi?

How to use Pi-hole with OpenVPN on Raspi?

  • Server
Raspberry Pi

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)

Share this post

Leave a Reply

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