From af1be3c3123ddb36efad69bb1f86fe5c559c93d8 Mon Sep 17 00:00:00 2001 From: Orazio Date: Sat, 1 Feb 2020 11:49:06 +0100 Subject: [PATCH] Updated FAQ (OpenVPN) (markdown) --- FAQ-(OpenVPN).md => OpenVPN.md | 39 ++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) rename FAQ-(OpenVPN).md => OpenVPN.md (68%) diff --git a/FAQ-(OpenVPN).md b/OpenVPN.md similarity index 68% rename from FAQ-(OpenVPN).md rename to OpenVPN.md index 42468e3..7507188 100644 --- a/FAQ-(OpenVPN).md +++ b/OpenVPN.md @@ -31,7 +31,7 @@ example using scp on linux: **Install OpenVPN on the new pi/server** -1. Backup the current install:`sudo cp -r /etc/openvpn /etc/openvpn_backup` +1. Backup the current install: `sudo cp -r /etc/openvpn /etc/openvpn_backup` 2. Extract the backup archive: `tar xzpfv ` 3. Copy the extracted content: `sudo cp -r etc/openvpn /etc/openvpn` 4. Restart the openvpn service: `sudo systemcl restart openvpn` @@ -54,6 +54,37 @@ Example: 192.168.1.4 CatPC 192.168.1.5 DogPC ``` +## Updating OpenVPN to newer version (PC/Desktop only, no SBCs) + +If you installed an earlier version of PiVPN and wish to update OpenVPN to a newer version just do the following steps: + +``` +sudo -s +wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add - +echo "deb http://build.openvpn.net/debian/openvpn/stable [osrelease] main" > /etc/apt/sources.list.d/openvpn-aptrepo.list +exit +``` + +Where [osrelease] should be replaced with: +- **stretch** (Debian 9.x) +- **buster** (Debian 10.x) +- **xenial** (Ubuntu 16.04) +- **bionic** (Ubuntu 18.04) + +More information can be found here: + +## Setting up static IP for clients + +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` +4. Adding clients: `sudo nano /etc/openvpn/ccd/exampleuser` (Add clients with their common name, in this case `exampleuser.ovpn`) +5. Configuring static IP: add this line `ifconfig-push 10.8.0.3 255.255.255.0` to `/etc/openvpn/ccd/exampleuser` +6. Restart openvpn with `sudo systemctl restart openvpn` + +(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** ## How to kick a connected client @@ -67,4 +98,8 @@ From issue [#577](https://github.com/pivpn/pivpn/issues/577) To connect to the management interface, use `nc 127.0.0.1 PORT`, then disconnect a client with `kill CLIENTNAME`, use CTRL-C to exit. -More info [here](https://openvpn.net/community-resources/management-interface/). Consider also setting a password on the management interface as suggested on the [manual](https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage). \ No newline at end of file +More info [here](https://openvpn.net/community-resources/management-interface/). Consider also setting a password on the management interface as suggested on the [manual](https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage). + +## Connecting over mobile data + +Trouble connecting over mobile data? Try [this](https://github.com/pivpn/pivpn/issues/54) \ No newline at end of file