summaryrefslogtreecommitdiff
path: root/manifests/rules/torify/user.pp
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-12-17 19:39:44 +0100
committerintrigeri <intrigeri@boum.org>2010-12-17 19:39:44 +0100
commitb39b5c24910f8816c3b9e6d2a0211ad892b36aa6 (patch)
treee0b7d6044597a4dc4a70c377274bc0075667ea21 /manifests/rules/torify/user.pp
parent3691f9c09adbb9dbde9bb945b0f4da0e5a525ced (diff)
Add support for Tor-ified traffic.
Diffstat (limited to 'manifests/rules/torify/user.pp')
-rw-r--r--manifests/rules/torify/user.pp27
1 files changed, 27 insertions, 0 deletions
diff --git a/manifests/rules/torify/user.pp b/manifests/rules/torify/user.pp
new file mode 100644
index 0000000..5caccfd
--- /dev/null
+++ b/manifests/rules/torify/user.pp
@@ -0,0 +1,27 @@
+define shorewall::rules::torify::user(
+ $originaldest = '-',
+ $allow_rfc1918 = true
+){
+
+ $user = $name
+
+ include shorewall::rules::torify::allow_tor_transparent_proxy
+
+ if $originaldest == '-' and $user == '-' {
+ include shorewall::rules::torify::allow_tor_user
+ }
+
+ shorewall::rules::torify::redirect_tcp_to_tor {
+ "redirect-to-tor-user=${user}-to=${originaldest}":
+ user => $user,
+ originaldest => $originaldest
+ }
+
+ shorewall::rules::torify::reject_non_tor {
+ "reject-non-tor-user=${user}-to=${originaldest}":
+ user => "$user",
+ originaldest => $originaldest,
+ allow_rfc1918 => $allow_rfc1918;
+ }
+
+}