}
}
-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,
}
source => 'all',
destination => "$zone:$destination",
proto => 'tcp',
- destinationport => "6881:6999",
+ destinationport => "$range",
originaldest => "$originaldest",
ratelimit => '-',
order => 200,
source => 'net',
destination => "$zone:$destination",
proto => 'udp',
- destinationport => "6881:6999",
+ destinationport => "$range",
ratelimit => '-',
order => 201,
}
-class firewall::torrent {
+class firewall::torrent(
+ $range = hiera('firewall::torrent::range', '6881:6999')
+) {
shorewall::rule { "torrent-tcp":
action => 'ACCEPT',
source => 'net',
destination => '$FW',
proto => 'tcp',
- destinationport => "6881:6999",
+ destinationport => "$range",
ratelimit => '-',
order => 200,
}
source => 'net',
destination => '$FW',
proto => 'udp',
- destinationport => "6881:6999",
+ destinationport => "$range",
ratelimit => '-',
order => 201,
}