mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-20 11:50:17 +00:00
Updated OpenVPN (markdown)
parent
fcebaa2a11
commit
4eead6b9bc
1 changed files with 11 additions and 11 deletions
22
OpenVPN.md
22
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: <https://community.openvpn.net/openvpn/wiki/
|
|||
|
||||
## Setting up static IP for clients
|
||||
|
||||
**If you installed PiVPN on or after Feb 17th 2020 static IPs are set by default.**
|
||||
|
||||
1. Add this line `client-config-dir /etc/openvpn/ccd` in `/etc/openvpn/server.conf`
|
||||
2. Create client config directory: `sudo mkdir /etc/openvpn/ccd`
|
||||
3. Fix permissions: `sudo chown -R openvpn:openvpn /etc/openvpn/ccd`
|
||||
|
@ -84,7 +84,7 @@ More information can be found here: <https://community.openvpn.net/openvpn/wiki/
|
|||
|
||||
(Here 10.8.0.3 is going to be static IP for user `exampleuser`, if you want to configure additional users, repeat from step 4)
|
||||
|
||||
**Note: You have to assign static IP for all clients in order to avoid IP address conflict**
|
||||
**Note: You have to assign static IP for all clients in order to avoid IP address conflict.**
|
||||
|
||||
## How to kick a connected client
|
||||
|
||||
|
|
Loading…
Reference in a new issue