aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-11-23 14:37:22 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-11-23 14:37:22 -0200
commit76361d11d53bc213ca0d0d7cf5b4e3c7bc7d0b44 (patch)
treefafbe35099b0e0d788f020f453d014da62756c04
parenta06667291a0fbfe1697aec2531bc1d00c4a949be (diff)
downloadpuppet-nodo-76361d11d53bc213ca0d0d7cf5b4e3c7bc7d0b44.tar.gz
puppet-nodo-76361d11d53bc213ca0d0d7cf5b4e3c7bc7d0b44.tar.bz2
Adds nodo::subsystem::vpn::pptp
-rw-r--r--manifests/subsystem/vpn/pptp.pp39
1 files changed, 39 insertions, 0 deletions
diff --git a/manifests/subsystem/vpn/pptp.pp b/manifests/subsystem/vpn/pptp.pp
new file mode 100644
index 0000000..16e8061
--- /dev/null
+++ b/manifests/subsystem/vpn/pptp.pp
@@ -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'],
+ }
+}