summaryrefslogtreecommitdiff
path: root/manifests/router.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/router.pp')
-rw-r--r--manifests/router.pp13
1 files changed, 9 insertions, 4 deletions
diff --git a/manifests/router.pp b/manifests/router.pp
index e4b5795..7e0e13d 100644
--- a/manifests/router.pp
+++ b/manifests/router.pp
@@ -347,13 +347,18 @@ define firewall::router::munin($destination, $port_orig, $port_dest = '', $zone
}
}
-class firewall::router::torrent($destination, $zone = 'loc', $originaldest = $ipaddress) {
+class firewall::router::torrent(
+ $destination,
+ $zone = 'loc',
+ $originaldest = $ipaddress,
+ $range = hiera('firewall::router::torrent::range', '6881:6999')
+) {
shorewall::rule { "torrent-tcp-1":
action => 'DNAT',
source => 'net',
destination => "$zone:$destination",
proto => 'tcp',
- destinationport => "6881:6999",
+ destinationport => "$range",
ratelimit => '-',
order => 200,
}
@@ -363,7 +368,7 @@ class firewall::router::torrent($destination, $zone = 'loc', $originaldest = $ip
source => 'all',
destination => "$zone:$destination",
proto => 'tcp',
- destinationport => "6881:6999",
+ destinationport => "$range",
originaldest => "$originaldest",
ratelimit => '-',
order => 200,
@@ -374,7 +379,7 @@ class firewall::router::torrent($destination, $zone = 'loc', $originaldest = $ip
source => 'net',
destination => "$zone:$destination",
proto => 'udp',
- destinationport => "6881:6999",
+ destinationport => "$range",
ratelimit => '-',
order => 201,
}