mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-20 03:40:17 +00:00
Updated OpenVPN (markdown)
parent
24dfe27264
commit
7d0c7511bd
1 changed files with 4 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
## 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.
|
||||
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 is as the DNS for the VPN, so you won't need to go through all these steps.
|
||||
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
|
||||
|
@ -19,7 +19,7 @@ You will need to change `/etc/openvpn/easy-rsa/pki/Default.txt` and your `.ovpn`
|
|||
|
||||
## How do I allow clients access to my home network but not the internet through my PiVPN?
|
||||
|
||||
Replace the following line in `/etc/openvpn/server.conf`: `push "redirect-gateway def1"` with `push "192.168.23.0 255.255.255.0"` (assuming that 192.168.23.0 and 255.255.255.0 are respectively the network IP and netmask of your LAN). Then restart the openvpn service: `sudo systemcl restart openvpn`.
|
||||
Replace the following line in `/etc/openvpn/server.conf`: `push "redirect-gateway def1"` with `push "192.168.23.0 255.255.255.0"` (assuming that 192.168.23.0 and 255.255.255.0 are respectively the network IP and netmask of your LAN). Then restart the openvpn service: `sudo systemctl restart openvpn`.
|
||||
|
||||
## How Can I Migrate my configs to another PiVPN Instance?
|
||||
|
||||
|
@ -34,7 +34,7 @@ example using scp on linux:
|
|||
1. Backup the current install: `sudo cp -r /etc/openvpn /etc/openvpn_backup`
|
||||
2. Extract the backup archive: `tar xzpfv <archive name>`
|
||||
3. Copy the extracted content: `sudo cp -r etc/openvpn /etc/openvpn`
|
||||
4. Restart the openvpn service: `sudo systemcl restart openvpn`
|
||||
4. Restart the openvpn service: `sudo systemctl restart openvpn`
|
||||
|
||||
**OBS:** Please be aware of the difference between `/etc/` and `etc/`!
|
||||
/etc with the starting slash is a system directory
|
||||
|
@ -43,7 +43,7 @@ etc/ without starting slash and tailing slash means its a directory in your curr
|
|||
## How to resolve local hostnames?
|
||||
|
||||
All you have to do is to use your router as DNS Server instead of using other public DNS providers.
|
||||
If you have already a working installation of OpenVPN, all you need to do is to edit `/etc/openvpn/server.conf` and replace every `push "dhcp-option DNS [...]"` line, with A SINGLE `push "dhcp-option DNS 192.168.23.1"` (assuming 192.168.23.1 is your gateway IP). Then restart the openvpn service: `sudo systemcl restart openvpn`.
|
||||
If you have already a working installation of OpenVPN, all you need to do is to edit `/etc/openvpn/server.conf` and replace every `push "dhcp-option DNS [...]"` line, with A SINGLE `push "dhcp-option DNS 192.168.23.1"` (assuming 192.168.23.1 is your gateway IP). Then restart the openvpn service: `sudo systemctl restart openvpn`.
|
||||
|
||||
Alternatively you can change `/etc/hosts` file and add `<IPAddress> <hostname>`
|
||||
Example:
|
||||
|
|
Loading…
Reference in a new issue