Forge Home


Manages OpenVPN


5,670 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
released Apr 13th 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 6.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'rfranzen-openvpn', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add rfranzen-openvpn
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install rfranzen-openvpn --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



rfranzen/openvpn — version 0.1.0 Apr 13th 2018


Table of Contents

  1. Overview
  2. Supported Platforms
  3. Installation
  4. Usage - Configuration options and additional functionality
  5. Author/Contributors


This module will install the latest OpenVPN in your system.

This module can also manage one or many server or client configuration files.

I'ts a very simple module. Still can't manage key files or generate new certificates.

Supported Platforms

This module was tested under these platforms:

  • Debian 8, 9
  • Ubuntu 16.04

This module use Hiera, so it's easy to add new platforms.


via git

# cd /etc/puppetlabs/code/environment/<environment>/modules
# git clone openvpn

via puppet

puppet module install rfranzen/openvpn

via puppetfile

mod 'rfranzen-openvpn'


Only install OpenVPN

class { 'openvpn::install': }


class { 'openvpn::install': }

openvpn::server { 'server-1':
  dh                    => undef,
  ca                    => undef,
  cert                  => undef,
  key                   => undef,
  client_to_client      => false,
  server                => '',
  port                  => '1194',
  protocol              => 'udp',
  dev                   => 'tap',
  persist_key           => true,
  persist_tun           => true,
  compression           => 'comp-lzo',
  log_append            => '/var/log/openvpn',
  status                => '/var/log/openvpn/openvpn-status.log',
  status_version        => '3',
  verbose               => '3',
  writepid              => '/var/run/',
  openvpn_group         => 'openvpn',
  openvpn_user          => 'openvpn',
  ifconfig_pool_persist => 'ipp.txt',
  keepalive             => '10 120',

Hiera example

Definition file:

class { 'openvpn::clients' }

yaml file:

    dev: tap
    protocol: udp
    port: 1194
    dh: /etc/openvpn/dh1024.pem
    ca: /etc/openvpn/certs/ca.pem
    cert: /etc/openvpn/my-conn.pem
    key: /etc/openvpn/keys/my-conn.pem
    crl_verify: /var/lib/puppet/ssl/crl.pem
    client_to_client: false


class { 'openvpn::install': }

openvpn::client { 'client-1':
  dev          => 'tap',
  protocol     => 'udp',
  server       => '',
  port         => '1194',
  persist_key  => true,
  persist_tun  => true,
  ca           => '/etc/openvpn/keys/',
  cert         => '/etc/openvpn/keys/',
  key          => '/etc/openvpn/keys/my-key.key',
  ns_cert_type => 'server',
  compression  => 'comp-lzo',
  verbose      => '3',
  status_dir   => '/var/log/openvpn',

Hiera example


    dev: tap
    protocol: udp
    port: 1194
    resolv_retry: infinite
    bind: nobind
    persist_key: true
    persist_tun: true
    mtu_test: false
    fast_io: false
    float: false
    ca: '/etc/openvpn/certs/ca.pem'
    cert: '/etc/openvpn/certs/my-conn.pem'
    key: '/etc/openvpn/keys/my-conn.pem'

Author / Contributors

Ricardo Franzen (rfranzen at gmail dot com)