Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Can install from test branch via
curl -L http://install-test.pivpn.io | TESTING=1 bash
Updating OpenVPN to newer version
If you installed an earlier version of pivpn and wish to update OpenVPN to a newer version (> 2.4.3) 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
where [osrelease] should be replaced with:
- wheezy (Debian 7.x)
- jessie (Debian 8.x)
- precise (Ubuntu 12.04)
- trusty (Ubuntu 14.04)
- xenial (Ubuntu 16.04)
More information can be found here: https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos
Setting up static IP for clients
Add this line
Create client config directory
sudo mkdir /etc/openvpn/ccd
sudo chown -R pi:nogroup /etc/openvpn/ccd(Make sure to enter correct username, in this case it was pi)
sudo nano /etc/openvpn/ccd/exampleuser(Add clients with their common name, in this case
Configuring static IP. Add this line
ifconfig-push 10.8.0.3 255.255.255.0to
sudo service openvpn restart
(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
Refer to: https://help.dyn.com/ddclient/
apt-get install ddclient
and then this is my example conf in /etc/ddclient.conf
# Configuration file for ddclient generated by debconf # # /etc/ddclient.conf ssl=yes protocol=dyndns2 use=web, web=checkip.dyndns.com, web-skip='IP Address' server=members.dyndns.org login=username password='password' mydyn.domain.com
If you use a namecheap domain your ddclient setup can be found here.
OpenVPN Technical Information
Info on TLS
'Modern' OpenVPN (2.x, using the TLS mode) basically sets up two connections:
The 'control channel'. This is a low bandwidth channel, over which e.g. network parameters and key material for the 'data channel' is exchanged'. OpenVPN uses TLS to protect control channel packets. The 'data channel'. This is the channel over which the actual VPN traffic is sent. This channel is keyed with key material exchanged over the control channel. Both these channels are duplexed over a single TCP or UDP port.
--tls-cipher controls the cipher used by the control channel. --cipher together with --auth control the protection of the data channel.
And regarding security, OpenVPN uses encrypt-then-mac for its data channel, rather than mac-then-encrypt like TLS. All the CBC-related issues you hear about are due to the combination mac-then-encrypt + CBC. This means that AES-CBC for the data channel is perfectly fine from a security perspective.
(And there is no GCM support for the data channel yet. That will arrive in OpenVPN 2.4.)
If I wanted to specify ciphers, this is the list I'd use (I think):
Here is a decent video tutorial. Note: I don't think you'd have to do anything with iptables as he shows. This shows connecting with Windows client.
Trouble connecting over mobile data? Try this
Check any closed issues with the information label!