Pi-hole and Pivpn DNS behaviour

hi,

Currently I run pivpn and pihole (all-round DNS solution setup) together on raspberry pi. Prior to running this setup I used to change the DNS ip address on the openvpn server.conf to raspberry pi local address so that I can block ads whilst using my pivpn when away from home network.

Following my new setup where I used the recursive DNS resolver aka all-round DNS solution, I have noticed that I don't need to change the DNS ip address on the openvpn server.conf anymore as it already blocks the adverts. Now one plausible reason for this to work as it is because its using pi DNS resolver rather than going to google and others DNS providers.

A question for those who run similar setup.

If i wasn't running the all-round DNS setup, is it a requirement to change the DNS ip address on the openvpn server.conf or was it unnecessary? reading the pivpn setup guide it mentions that we should change the DNS ip address in the server.conf but I am not too sure.

I cannot go back to test as don't want to rebuild my pi but I wondered if i just added an extra step in my previous setup.

Look forward to your comments.

Thanks,
V

The reason that step is there is due to during a setup of piVPN or almost all others it will ask what DNS you want to use we remove the chance of error or a non Pi-hole DNS by having ti be set directly in the server.conf file. also for reference if you wish to change anything in the server.conf file all you need to do is restart the openVPN service and the client will use the updated settings

hi,
thanks for getting back to me.
so if I am running all-round DNS solution setup. should the ip address on openvpn server.conf for dns be the local ip address of the raspberry pi or should i be using 127.0.0.1 which ftldns recursive resolver is running on?
thanks
V

you should be using something like 10.8.0.1 as that is what pivpn uses in place of 127.0.0.1 as explained in this guide