summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-06-16 19:23:14 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-06-16 19:23:14 -0300
commite7bc66295e08f443c504257463ffde6c381ddfe5 (patch)
tree0c43bda43371ec4e8ab59ba48efe93a70f786a44
parent8e2a0e205fafd0d1a287e9dc8c11f1366d0bcbe3 (diff)
downloadpuppet-firewall-e7bc66295e08f443c504257463ffde6c381ddfe5.tar.gz
puppet-firewall-e7bc66295e08f443c504257463ffde6c381ddfe5.tar.bz2
Adding firewall::router::tor
-rw-r--r--manifests/router.pp44
1 files changed, 44 insertions, 0 deletions
diff --git a/manifests/router.pp b/manifests/router.pp
index 7fa2db3..32f9359 100644
--- a/manifests/router.pp
+++ b/manifests/router.pp
@@ -273,6 +273,50 @@ define firewall::router::ssh($destination, $port_orig = '22', $port_dest = '', $
}
}
+define firewall::router::tor($destination, $zone = 'loc', $originaldest = $ipaddress) {
+ shorewall::rule { "tor-$name-1":
+ action => 'DNAT',
+ source => 'net',
+ destination => "$zone:$destination:9001",
+ proto => 'tcp',
+ destinationport => "9001",
+ ratelimit => '-',
+ order => "29001",
+ }
+
+ shorewall::rule { "tor-$name-2":
+ action => 'DNAT',
+ source => '$FW',
+ destination => "$zone:$destination:9001",
+ proto => 'tcp',
+ destinationport => "9001",
+ originaldest => "$originaldest",
+ ratelimit => '-',
+ order => "29001",
+ }
+
+ shorewall::rule { "tor-$name-3":
+ action => 'DNAT',
+ source => 'net',
+ destination => "$zone:$destination:9030",
+ proto => 'tcp',
+ destinationport => "9030",
+ ratelimit => '-',
+ order => "29030",
+ }
+
+ shorewall::rule { "tor-$name-4":
+ action => 'DNAT',
+ source => '$FW',
+ destination => "$zone:$destination:9030",
+ proto => 'tcp',
+ destinationport => "9030",
+ originaldest => "$originaldest",
+ ratelimit => '-',
+ order => "29030",
+ }
+}
+
define firewall::router::munin($destination, $port_orig, $port_dest = '', $zone = 'loc',
$order = '400', $originaldest = $ipaddress) {
shorewall::rule { "munin-$name-1":