From b47941a36df3cd0e430a10387bd024a9d5028af3 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 8 Jun 2012 10:55:56 -0300 Subject: Adding firewall::router::gobby --- manifests/subsystems/firewall/router.pp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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', -- cgit v1.2.3