From b39b5c24910f8816c3b9e6d2a0211ad892b36aa6 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Fri, 17 Dec 2010 19:39:44 +0100 Subject: Add support for Tor-ified traffic. --- .../rules/torify/allow_tor_transparent_proxy.pp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 manifests/rules/torify/allow_tor_transparent_proxy.pp (limited to 'manifests/rules/torify/allow_tor_transparent_proxy.pp') diff --git a/manifests/rules/torify/allow_tor_transparent_proxy.pp b/manifests/rules/torify/allow_tor_transparent_proxy.pp new file mode 100644 index 0000000..3c18db6 --- /dev/null +++ b/manifests/rules/torify/allow_tor_transparent_proxy.pp @@ -0,0 +1,21 @@ +class shorewall::rules::torify::allow_tor_transparent_proxy { + + $rule = "allow-tor-transparent-proxy" + + if !defined(Shorewall::Rule["$rule"]) { + # A weirdness in shorewall forces us to explicitly allow traffic to + # net:$tor_transparent_proxy_host:$tor_transparent_proxy_port even + # if $FW->$FW traffic is allowed. This anyway avoids us special-casing + # the remote Tor transparent proxy situation. + shorewall::rule { + "$rule": + source => '$FW', + destination => "net:${shorewall::tor_transparent_proxy_host}", + proto => 'tcp', + destinationport => $shorewall::tor_transparent_proxy_port, + order => 100, + action => 'ACCEPT'; + } + } + +} -- cgit v1.2.3