Updated FAQ (OpenVPN) (markdown)

Orazio 2020-02-01 11:49:06 +01:00
parent 2302d351bd
commit af1be3c312

@ -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 <archive name>`
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: <https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos>
## 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).
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)