strongswan

contributions requested
Puppet strongswan module

33,672 downloads

17,340 latest version

5.0 quality score

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.0.0 (latest)
  • 0.4.0
  • 0.3.0
released Mar 29th 2020
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
  • Puppet >= 5.5.8 < 7.0.0
  • RedHat
    ,
    CentOS
    ,
    Debian
    ,
    Ubuntu

Start using this module

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

Add this module to your Puppetfile:

mod 'puppet-strongswan', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-strongswan
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-strongswan --version 1.0.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.

Download

Documentation

puppet/strongswan — version 1.0.0 Mar 29th 2020

Build Status

This Puppet module contains configurations for Strongswan.

Example usage

StrongSwan default config:

include strongswan

Strongswan self-signed CA:

include strongswan::pki::ca

Strongswan certificates management:

strongswan::pki::certificate {'server':
  common_name => 'myvpn.local',
  san         => ['@strongswan-1','strongswan-1','192.168.33.42', '@192.168.33.42'],
}

strongswan::pki::certificate {'John Smith':
  common_name  => 'Jonh Smith',
  p12_password => 'mySuperStrongPass',
}

Example configuration ipsec.conf:

strongswan::conn { '%default':
  options => {
    "ike"         => "aes128gcm128-prfsha256-ecp256!",
    "esp"         => "aes128gcm128-ecp256!",
    "keyexchange" => "ikev2",
    "ikelifetime" => "60m",
    "lifetime"    => "20m",
    "margintime"  => "3m",
    "closeaction" => "restart",
    "dpdaction"   => "restart",
  }
}

strongswan::conn { 'IPsec-IKEv2':
  options => {
    "rekey"         => "no",
    "left"          => "%any",
    "leftsubnet"    => "0.0.0.0/0",
    "leftcert"      => "vpnHostCert.der",
    "right"         => "%any",
    "rightdns"      => "8.8.8.8,8.8.4.4",
    "rightsourceip" => "10.10.10.0/24",
    "auto"          => "add",
  }
}

strongswan::conn { 'IKEv2-EAP':
  options => {
    "also"          => "IPSec-IKEv2",
    "leftauth"      => "pubkey",
    "leftsendcert"  => "always",
    "rightauth"     => "eap-mschapv2",
    "rightsendcert" => "never",
    "eap_identity"  => "%any",
  }

ipsec.secrets

strongswan::secrets { '%any':
  options => {
    'RSA' => 'vpnHostKey.der keypass'
  }
}

strongswan::secrets { 'John':
  options => {
    'EAP' => 'SuperSecretPass'
  }
}

charon daemon configuration example:

strongswan::charon { 'dns':
  options => {
    'dns1' => '8.8.8.8',
    'dns2' => '8.8.4.4'
  }
}

charon logging configuration example:

strongswan::charon { '/var/log/vpn.log':
  options => {
    'filelog' => {
      '/var/log/vpn.log' => {
        'time_format' => '%b %e %T',
        'ike_name'    => 'yes',
        'append'      => 'no',
        'default'     => '1',
        'flush_line'  => 'yes',
      },
      'stderr' => {
        'ike' => '2',
        'knl' => '2',
      }
    }
  }
}

Setup configuration

The IPsec 'config setup' section in ipsec.conf:

class { 'strongswan::setup':
  options => {
    'charondebug' => '"ike 2, knl 2, cfg 2"'
  }
}

Compatibility

Supports:

  • RedHat
  • Debian/Ubuntu

License

MIT License