Installs and configures OpenVPN and creates client .ovpn config files. This Charm uses the luxflux-openvpn Puppet module for the heavy lifting. After installation, you can find the client config files in /home/ubuntu/*.ovpn.
This charm provides OpenVPN Community VPN.
This Charm installs and configures the VPN service and creates client certificates. What can you do with this Charm?
Deploy the application and you're ready to go!
juju deploy openvpn
Please note that this charm must be deployed on physical or virtual machines. This Charm does not work in LXC/LXD containers. Also note that changing the key settings will cause existing client configs to fail.
This Charm exposes the number of connected clients using a juju metric.
$ juju metrics --all
UNIT TIMESTAMP METRIC VALUE
openvpn/0 2016-11-27T15:05:25Z users 1
You can find more detailed status information on the unit itself.
# On the openvpn unit
sudo cat /var/log/openvpn/openvpn-server1-status.log
An OpenVPN client needs a config file to connect to the OpenVPN server. This Charm generates these config files for each client and puts them in /home/ubuntu/<client-name>.ovpn. You can download these config files using the Juju CLI. See the clients config option for more info.
juju scp openvpn/0:~/<client-name>.ovpn .
The client config file works with any OpenVPN-compatible client on any OS. Use the instructions linked below or refer to the generic OpenVPN instructions for your OS.
Install OpenVPN client
Install the OpenVPN network-manager integration. This will add the "VPN connections" menu in the network applet.
sudo apt install network-manager-openvpn-gnome
Add VPN using config file
VPN connections > Configure VPN
Select the .ovpn config file, add the VPN, and connect using the network applet.
[Optional] Regardless of server configuration, NetworkManager uses the VPN as default gateway, effectively sending ALL traffic over the VPN. If you set push-default-gateway to False and want NetworkManager to respect that setting, you need extra configuration on the client. Edit the VPN connection > IPv4 Settings > Routes...'.
Use the following instructions to connect an Ubuntu server to the VPN.
sudo apt install openvpn
sudo openvpn --config <client-name>.ovpn
# Use the following command if you want to use the DNS settings that the OpenVPN server pushes
sudo openvpn --config <client-name>.ovpn --script-security 2 --up /etc/openvpn/update-resolv-conf --down /etc/openvpn/update-resolv-conf
Report bugs in the layer-openvpn Github repo.
This software was created in the IBCN research group of Ghent University in Belgium. This software is used in Tengu, a project that aims to make experimenting with data frameworks and tools as easy as possible.