aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems/firewall
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2012-01-07 22:04:34 -0200
committerdrebs <drebs@riseup.net>2012-01-07 22:04:34 -0200
commit9321d901c5a5c251b16df7b793affda4141b512f (patch)
treed2bf4783597b9530b7333fa93a7c691c4516127a /manifests/subsystems/firewall
parent1dee3ec7ea2f149ac78215f81333d8d01c658d22 (diff)
downloadpuppet-nodo-9321d901c5a5c251b16df7b793affda4141b512f.tar.gz
puppet-nodo-9321d901c5a5c251b16df7b793affda4141b512f.tar.bz2
adding tor port support
Diffstat (limited to 'manifests/subsystems/firewall')
-rw-r--r--manifests/subsystems/firewall/vserver.pp23
1 files changed, 23 insertions, 0 deletions
diff --git a/manifests/subsystems/firewall/vserver.pp b/manifests/subsystems/firewall/vserver.pp
index e914fc6..623e6f1 100644
--- a/manifests/subsystems/firewall/vserver.pp
+++ b/manifests/subsystems/firewall/vserver.pp
@@ -331,3 +331,26 @@ class firewall::vserver::dns($destination, $zone = 'vm') {
order => '2004',
}
}
+
+class firewall::vserver::tor($destination, $zone = 'fw') {
+ shorewall::rule { 'tor-1':
+ action => 'DNAT',
+ source => 'net',
+ destination => "$zone:$destination:9001",
+ proto => 'tcp',
+ destinationport => '9001',
+ ratelimit => '-',
+ order => '2100',
+ }
+
+ shorewall::rule { 'tor-2':
+ action => 'DNAT',
+ source => '$FW',
+ destination => "$zone:$destination:9001",
+ proto => 'tcp',
+ destinationport => '9001',
+ originaldest => "$ipaddress",
+ ratelimit => '-',
+ order => '2101',
+ }
+}