aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-06-08 10:55:56 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-06-08 10:55:56 -0300
commitb47941a36df3cd0e430a10387bd024a9d5028af3 (patch)
tree14f35df874d8ff3305298b904a993009ebe7b159
parentd86ab1f83be4574658cb4543e34093ace85e36a3 (diff)
downloadpuppet-nodo-b47941a36df3cd0e430a10387bd024a9d5028af3.tar.gz
puppet-nodo-b47941a36df3cd0e430a10387bd024a9d5028af3.tar.bz2
Adding firewall::router::gobby
-rw-r--r--manifests/subsystems/firewall/router.pp23
1 files changed, 23 insertions, 0 deletions
diff --git a/manifests/subsystems/firewall/router.pp b/manifests/subsystems/firewall/router.pp
index 7b01be6..3fc15da 100644
--- a/manifests/subsystems/firewall/router.pp
+++ b/manifests/subsystems/firewall/router.pp
@@ -326,6 +326,29 @@ class firewall::router::torrent($destination, $zone = 'loc', $originaldest = $ip
}
}
+class firewall::router::gobby($destination, $zone = 'loc', $originaldest = $ipaddress) {
+ shorewall::rule { 'gobby-route-1':
+ action => 'DNAT',
+ source => 'net',
+ destination => "$zone:$destination:6523",
+ proto => 'tcp',
+ destinationport => '6523',
+ ratelimit => '-',
+ order => '600',
+ }
+
+ shorewall::rule { 'gobby-route-2':
+ action => 'DNAT',
+ source => '$FW',
+ destination => "fw:$destination:6523",
+ proto => 'tcp',
+ destinationport => '6523',
+ originaldest => "$originaldest",
+ ratelimit => '-',
+ order => '601',
+ }
+}
+
# See http://www.shorewall.net/FAQ.htm#faq2
define firewall::router::hairpinning($order = '5000', $proto = 'tcp', $port = 'www',
$external_ip = '$ETH0_IP', $interface = 'eth1',