Hi all,
I'm pretty new to unix/command line, so my apologies for that.
I installed a vpn server using pivpn without too much trouble, so a great git. However if I want to change/configure something that was prompted during installation, I seem to have to reinstall the vpn server. This time I installed pi-hole in addition to pivpn and I'd like to change my DNS from google's DNS to the local DNS installed on my pi, for example '192.168.1.100'
--sorry, accidently sent above comment before finishing--
...This time I installed pi-hole in addition to pivpn and I'd like to change my DNS from google's DNS to the local DNS installed on my pi, for example from '8.8.8.8' to my local ip of the Rpi '192.168.1.100'.
Is there a way to change this without a reinstall? I've found some suggestions using the 'push' command [ push "dhcp-option DNS 10.x.x.x" ] but that does not work for me (maybe a windows command instead of unix?).
To expand this question, is it possible to configure all pivpn configuration after installation?
Follow this guys manual, use CTRL+F and search for DNS, there you find it :)
https://www.loganmarchione.com/2014/10/openwrt-with-openvpn-client-on-tp-link-tl-mr3020/
I changed the DNS on my server by editing /etc/openvpn/server.conf. Around line 18 you'll find a line like push "dhcp-option DNS 8.8.8.8", just change that and restart the openvpn service.
I set mine to 10.8.0.1, since that was the ip of my raspberry on the VPN.
besides the above also do this
https://github.com/pivpn/pivpn/wiki/FAQ#installing-with-pi-hole
I have a slightly different configuration, with pi-hole running on one RPi3B+ and PiVPN on another but are both on the same network. The pi-hole is the DNS for entire network, so I set the DNS for OpenVPN to point to the pi-hole IP. Do I still need to muck around with my dnsmasq.conf? Note both Pis are running dietpi.
there is a configration file in /etc/pivpn/
Most helpful comment
I changed the DNS on my server by editing
/etc/openvpn/server.conf. Around line 18 you'll find a line likepush "dhcp-option DNS 8.8.8.8", just change that and restart the openvpn service.I set mine to
10.8.0.1, since that was the ip of my raspberry on the VPN.