summaryrefslogtreecommitdiff
path: root/puppet/modules/site_shorewall/manifests/stunnel/server.pp
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-06-20 01:58:39 -0700
committerelijah <elijah@riseup.net>2014-06-25 18:17:22 -0700
commit49f0c54a05f6b542367f8ef4538316ba2eaac6cd (patch)
treec4d26dee9c7fb9f0056da062371ca30d292ce082 /puppet/modules/site_shorewall/manifests/stunnel/server.pp
parent6df59b9f579134a9521aafb71727a98fdc92e19a (diff)
new generic system for stunnel: just `include site_stunnel` and stunnel + needed shorewall will be automatically set up. requires new leap_cli
Diffstat (limited to 'puppet/modules/site_shorewall/manifests/stunnel/server.pp')
-rw-r--r--puppet/modules/site_shorewall/manifests/stunnel/server.pp22
1 files changed, 22 insertions, 0 deletions
diff --git a/puppet/modules/site_shorewall/manifests/stunnel/server.pp b/puppet/modules/site_shorewall/manifests/stunnel/server.pp
new file mode 100644
index 00000000..db3ecd3e
--- /dev/null
+++ b/puppet/modules/site_shorewall/manifests/stunnel/server.pp
@@ -0,0 +1,22 @@
+#
+# Allow all incoming connections to stunnel server port
+#
+
+define site_shorewall::stunnel::server($port) {
+
+ include site_shorewall::defaults
+
+ file { "/etc/shorewall/macro.stunnel_server_${name}":
+ content => "PARAM - - tcp ${port}",
+ notify => Service['shorewall'],
+ require => Package['shorewall']
+ }
+ shorewall::rule {
+ 'net2fw-couchdb':
+ source => 'net',
+ destination => '$FW',
+ action => "stunnel_server_${name}(ACCEPT)",
+ order => 200;
+ }
+
+} \ No newline at end of file