]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Adds nodo::subsystem::vpn::pptp
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 23 Nov 2017 16:37:22 +0000 (14:37 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 23 Nov 2017 16:37:22 +0000 (14:37 -0200)
manifests/subsystem/vpn/pptp.pp [new file with mode: 0644]

diff --git a/manifests/subsystem/vpn/pptp.pp b/manifests/subsystem/vpn/pptp.pp
new file mode 100644 (file)
index 0000000..16e8061
--- /dev/null
@@ -0,0 +1,39 @@
+# Yeah, it's very insecure, but sometimes it's the only
+# thing a system provides :(
+class nodo::subsystem::vpn::pptp(
+  $chap_secrets = '',
+) {
+  include nodo::utils::network::pptp
+
+  # Secrets
+  # Example content:
+  #
+  # #Secrets for authentication using CHAP
+  # #client        server         secret                  IP addresses
+  # user           remoteserver   password                *
+  file { '/etc/ppp/chap-secrets':
+    ensure  => present,
+    owner   => root,
+    group   => root,
+    mode    => '0600',
+    content => $chap_secrets,
+    require => Package['pptp-linux'],
+  }
+  # Custom peers
+  # Example content:
+  #
+  # pty "pptp vpn.example.org --nolaunchpppd"
+  # name user
+  # remotename remoteserver
+  # require-mppe-128
+  # file /etc/ppp/options.pptp
+  file { '/etc/ppp/peers/custom':
+    ensure  => present,
+    owner   => root,
+    group   => dip,
+    mode    => '0660',
+    source  => 'puppet:///modules/nodo/etc/ppp/peers/custom',
+    require => Package['pptp-linux'],
+  }
+}