From 4eead6b9bc3bb7eed1e9ef1b5b8fce2c965eb74d Mon Sep 17 00:00:00 2001 From: Orazio Date: Thu, 23 Jul 2020 16:29:15 +0200 Subject: [PATCH] Updated OpenVPN (markdown) --- OpenVPN.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/OpenVPN.md b/OpenVPN.md index 5de288d..eeef9d1 100644 --- a/OpenVPN.md +++ b/OpenVPN.md @@ -1,18 +1,16 @@ # FAQ (Frequently Asked Questions) ## How do I use Pi-hole with PiVPN? -You can safely install PiVPN on the same Raspberry Pi as your Pi-hole install, and point your VPN clients to the IP of your Pi-hole so they get ad blocking, etc. +You can safely install PiVPN on the same Raspberry Pi as your Pi-hole install, and point your VPN clients to the IP of your Pi-hole so they get ad blocking, etc. (replace `192.168.23.211` with the LAN IP of your Raspberry Pi). + Note that if you install PiVPN after Pi-hole, your existing Pi-hole installation will be detected and the script will ask if you want to use it as the DNS for the VPN, so you won't need to go through all these steps. -1. Create a new file `sudo nano /etc/dnsmasq.d/02-pivpn.conf` -2. Add `interface=tun0` inside to tell Pi-hole to listen on the VPN interface as well -3. Save the file end exit -4. Restart Pi-hole with `pihole restartdns` -5. Edit the server config with `sudo nano /etc/openvpn/server.conf` -6. Remove every `push "dhcp-option DNS [...]"` line -7. Add this line `push "dhcp-option DNS 10.8.0.1"` to point clients to the PiVPN IP -8. Save the file and exit -9. Restart openvpn with `sudo systemctl restart openvpn` +1. Edit the server config with `sudo nano /etc/openvpn/server.conf` +2. Remove every `push "dhcp-option DNS [...]"` line +3. Add this line `push "dhcp-option DNS 192.168.23.211"` to point clients to the PiVPN IP +4. Save the file and exit +5. Restart openvpn with `sudo systemctl restart openvpn` +6. Run `pihole -a -i all` to tell Pi-hole to listen on all interfaces ## How do I change the public IP/DNS name of the PiVPN after the install? You will need to change `/etc/openvpn/easy-rsa/pki/Default.txt` and your `.ovpn` files if you have already generated them. @@ -75,6 +73,8 @@ More information can be found here: