diff options
Diffstat (limited to 'manifests/subsystems/firewall')
-rw-r--r-- | manifests/subsystems/firewall/router.pp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/manifests/subsystems/firewall/router.pp b/manifests/subsystems/firewall/router.pp index 242abbf..a8d18c5 100644 --- a/manifests/subsystems/firewall/router.pp +++ b/manifests/subsystems/firewall/router.pp @@ -327,7 +327,8 @@ class firewall::router::torrent($destination, $zone = 'loc') { define firewall::router::hairpinning($order = '5000', $proto = 'tcp', $port = 'www', $external_ip = '$ETH0_IP', $interface = 'eth1', $destination = '192.168.1.100', $source = 'eth1', - $source_zone = 'loc', $dest_zone = 'loc') { + $source_zone = 'loc', $dest_zone = 'loc', + $port_dest = '') { shorewall::masq { "routeback-$name": interface => "$interface:$destination", source => $source, @@ -340,7 +341,10 @@ define firewall::router::hairpinning($order = '5000', $proto = 'tcp', $port = 'w shorewall::rule { "routeback-$name": action => 'DNAT', source => $source_zone, - destination => "$dest_zone:$destination", + destination => $port_dest ? { + '' => "$dest_zone:$destination", + default => "$dest_zone:$destination:$port_dest", + }, proto => $proto, destinationport => $port, ratelimit => '-', |