- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with openvpn_client
- Usage Examples - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
This module attempts to manage client OpenVPN connections. It does not manage server configurations and it attempts to make no assumptions about client configurations. The goal for the module is simplicity and versatility.
This module installs the OpenVPN package and manages the OpenVPN service via its
default class. It also includes a defined type to create and manage OpenVPN
client configurations. The template file for creating the client configuration
attempts to make no assumptions about options. All options can be turned off by
declaring them undef
and custom options can be defined via a parameter.
- The OpenVPN default package manager package and its service impact, or execute on the system it's installed on.
All that is needed is to get started is to create an openvpn_client::client
defined type with the required parameters. Everything else should be handled
automatically with sane defaults.
openvpn_client::client { 'openvpn.server':
port => 1194,
ca => '/path/to/ca',
}
Install the openvpn package and manage its service.
-
openvpn_dir
The directory created by the package to store the openvpn configs. Should be an absolute path. Defaults differ according to OS. Seeparams.pp
. -
package_name
The name of the OpenVPN package. Should be a string. Defaults differ according to OS. Seeparams.pp
. -
service_name
The name of the OpenVPN service. Should be a string. Defaults differ according to OS. Seeparams.pp
.
Configure a client connection and restart the OpenVPN service. Not all OpenVPN
services are represented as parameters; however, the parameter array
custom_options
has been provided to provide extensibility.
custom_options
An array containing strings to be appended to the end of the client configuration. Defaults to an empty array.
All of the following parameters are taken directly from the OpenVPN man page where their descriptions can be found. Only default values and quirks will be noted here.
-
auth
String; defaults toSHA256
. -
auth_user_pass
Absolute path; defaults toundef
. -
ca
Absolute path; defaults toundef
. -
cipher
String; defaults toAES-256-CBC
. -
client
Bool; defaults totrue
. -
comp_lzo
String; defaults toadaptive
. -
dev
String; defaults totun
. -
nobind
Bool; defaults totrue
. -
persist_key
Bool; defaults totrue
. -
persist_remote_ip
Bool; defaults totrue
. -
persist_tun
Bool; defaults totrue
. -
port
Integer; defaults to1194
. -
proto
String; defaults toudp
. -
remote_cert_tls
String; defaults toserver
. -
resolv_retry
String; defaults toinfinite
. -
server
String; defaults to$name
. -
tls_client
Bool; defaults totrue
. -
verb
Integer; defaults to3
.
This module has really only been tested on Ubuntu 12.04 and 14.04. Compatability with EL6 and 7 has been attempted. Please send PRs for additional OSs or to fine tune existing support; which brings us to...
PRs are welcome. Keep in mind the stated goals of the module are simplicity and versatility while making no client configuration assumptions. Standard ground rules for contributing apply; namely test and document everything.
Most development information can be found in CONTRIBUTING.md.