From fcebaa2a115de6b5b7c39d5712a9f5cb938ff250 Mon Sep 17 00:00:00 2001 From: Orazio Date: Thu, 23 Jul 2020 16:29:12 +0200 Subject: [PATCH] Updated WireGuard (markdown) --- WireGuard.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/WireGuard.md b/WireGuard.md index 9203433..b8e38cb 100644 --- a/WireGuard.md +++ b/WireGuard.md @@ -1,21 +1,19 @@ # 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=wg0` 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 PiVPN configuration with `sudo nano /etc/pivpn/setupVars.conf` -6. Remove the `pivpnDNS1=[...]` and `pivpnDNS2=[...]` lines -7. Add this line `pivpnDNS1=10.6.0.1` to point clients to the PiVPN IP -8. Save the file and exit +1. Edit the PiVPN configuration with `sudo nano /etc/pivpn/setupVars.conf` +2. Remove the `pivpnDNS1=[...]` and `pivpnDNS2=[...]` lines +3. Add this line `pivpnDNS1=192.168.23.211` to point clients to the PiVPN IP +4. Save the file and exit +5. Run `pihole -a -i all` to tell Pi-hole to listen on all interfaces New clients you generate will use Pi-hole but you need to manually edit existing clients: 1. Open your configuration, for example whatever.conf -2. Replace the line `DNS = [...], [...]` with this line `DNS = 10.6.0.1` +2. Replace the line `DNS = [...], [...]` with this line `DNS = 192.168.23.211` 4. Save the file and connect again ## How do I change the public IP/DNS name of the PiVPN after the install? @@ -34,7 +32,9 @@ Replace the following line in your client configuration: `AllowedIPs = 0.0.0.0/0 ## How do I upgrade WireGuard to the latest version? -Run `pivpn -wg` and follow the instructions. If you installed PiVPN on or after March 17th 2020 you don't really need to do this since WireGuard will be upgraded via the package manager (APT). +**If you installed PiVPN on or after March 17th 2020 WireGuard will be upgraded via the package manager (APT).** + +Run `pivpn -wg` and follow the instructions. ## How Can I Migrate my configs to another PiVPN Instance?