aboutsummaryrefslogtreecommitdiff
path: root/manifests/rules/torify.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/rules/torify.pp')
-rw-r--r--manifests/rules/torify.pp31
1 files changed, 31 insertions, 0 deletions
diff --git a/manifests/rules/torify.pp b/manifests/rules/torify.pp
new file mode 100644
index 0000000..b393a2a
--- /dev/null
+++ b/manifests/rules/torify.pp
@@ -0,0 +1,31 @@
+# shorewall::rules::torify
+#
+# Note: shorewall::rules::torify cannot be used several times with the
+# same user listed in the $users array. This restriction applies to
+# using this define multiple times without providing a $users
+# parameter.
+#
+# Parameters:
+#
+# - users: every element of this array must be valid in shorewall
+# rules user/group column.
+# - destinations: every element of this array must be valid in
+# shorewall rules original destination column.
+
+define shorewall::rules::torify(
+ $users = ['-'],
+ $destinations = ['-'],
+ $allow_rfc1918 = true
+){
+
+ include shorewall::rules::torify::non_torified_users
+
+ $originaldest = join($destinations,',')
+
+ shorewall::rules::torify::user {
+ $users:
+ originaldest => $originaldest,
+ allow_rfc1918 => $allow_rfc1918;
+ }
+
+}