summaryrefslogtreecommitdiff
path: root/puppet/modules/site_shorewall/manifests/couchdb/dnat.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-03-31 12:39:36 -0400
committerMicah Anderson <micah@riseup.net>2013-04-02 10:21:06 -0400
commit128c8ddfd4969a9b9b525cb4f4a34b1e98c2fe76 (patch)
treecf197012d4ae1d2ba4f3f616b6d65ce668646162 /puppet/modules/site_shorewall/manifests/couchdb/dnat.pp
parentbaf3ed5b6db4e8af052564864d8c3e426cf5d9d0 (diff)
shorewall:
create a macro for the bigcouch replication server stunnel to enable these connections pulling bigcouch_replication_clients, bigcouch_replication_server_port from hiera create site_shorewall::couchdb::dnat and create_resources to properly setup DNAT for bigcouch_replication_clients
Diffstat (limited to 'puppet/modules/site_shorewall/manifests/couchdb/dnat.pp')
-rw-r--r--puppet/modules/site_shorewall/manifests/couchdb/dnat.pp21
1 files changed, 21 insertions, 0 deletions
diff --git a/puppet/modules/site_shorewall/manifests/couchdb/dnat.pp b/puppet/modules/site_shorewall/manifests/couchdb/dnat.pp
new file mode 100644
index 00000000..85cea9d5
--- /dev/null
+++ b/puppet/modules/site_shorewall/manifests/couchdb/dnat.pp
@@ -0,0 +1,21 @@
+define site_shorewall::couchdb::dnat (
+ $source,
+ $connect,
+ $connect_port,
+ $accept_port,
+ $proto,
+ $destinationport )
+{
+
+
+ shorewall::rule {
+ "dnat_${name}_${destinationport}":
+ source => $source,
+ destination => "\$FW:127.0.0.1:${accept_port}",
+ destinationport => $destinationport,
+ originaldest => $connect,
+ proto => $proto,
+ order => 200,
+ action => 'DNAT';
+ }
+}