# See http://www.shorewall.net/FAQ.htm#faq2
-define firewall::router::hairpinning($order = '5000', $proto = 'tcp', $port = 'www',
+define firewall::implementations::shorewall::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',
-define firewall::router::munin($destination, $port_orig, $port_dest = '', $zone = 'loc',
+define firewall::implementations::shorewall::router::munin($destination, $port_orig, $port_dest = '', $zone = 'loc',
$order = '400', $originaldest = $ipaddress) {
shorewall::rule { "munin-$name-1":
action => 'DNAT',
-define firewall::router::ssh($destination, $port_orig = '22', $port_dest = '', $zone = 'loc',
+define firewall::implementations::shorewall::router::ssh($destination, $port_orig = '22', $port_dest = '', $zone = 'loc',
$originaldest = $ipaddress) {
shorewall::rule { "ssh-$name-1":
action => 'DNAT',
-define firewall::router::tor($destination, $zone = 'loc', $originaldest = $ipaddress) {
+define firewall::implementations::shorewall::router::tor($destination, $zone = 'loc', $originaldest = $ipaddress) {
shorewall::rule { "tor-$name-1":
action => 'DNAT',
source => 'net',
$dest_zone = 'loc',
$port_dest = ''
) {
- class { "firewall::implementations::${implementation}::router::hairpinning":
- order => $order,
- proto => $proto,
- port => $port,
- external_ip => $external_ip,
- interface => $interface,
- destination => $destination,
- source => $source,
- source_zone => $source_zone,
- dest_zone => $dest_zone,
- port_dest => $port_dest,
+ if $implementation == 'shorewall' {
+ firewall::implementations::shorewall::router::hairpinning { "${name}":
+ order => $order,
+ proto => $proto,
+ port => $port,
+ external_ip => $external_ip,
+ interface => $interface,
+ destination => $destination,
+ source => $source,
+ source_zone => $source_zone,
+ dest_zone => $dest_zone,
+ port_dest => $port_dest,
+ }
}
}
-class firewall::router::mail(i
+class firewall::router::mail(
$implementation = lookup('firewall::implementation', undef, undef, 'shorewall'),
$destination, $zone = 'loc', $originaldest = $ipaddress
) {
$originaldest = $ipaddress
$implementation = lookup('firewall::implementation', undef, undef, 'shorewall'),
) {
- class { "firewall::implementations::${implementation}::router::munin":
- destination => $destination,
- port_orig => $port_orig,
- port_dest => $port_dest,
- zone => $zone,
- order => $order,
- originaldest => $originaldest,
+ if $implementation == 'shorewall' {
+ firewall::implementations::shorewall::router::munin { "${name}":
+ destination => $destination,
+ port_orig => $port_orig,
+ port_dest => $port_dest,
+ zone => $zone,
+ order => $order,
+ originaldest => $originaldest,
+ }
}
}
$port_orig = '873',
$port_dest = '',
$zone = 'loc',
- $originaldest = $ipaddress
+ $originaldest = $ipaddress,
$implementation = lookup('firewall::implementation', undef, undef, 'shorewall'),
) {
class { "firewall::implementations::${implementation}::router::rsync":
port_orig => $port_orig,
port_dest => $port_dest,
zone => $zone,
- order => $order,
originaldest => $originaldest,
}
}
$originaldest = $ipaddress,
$implementation = lookup('firewall::implementation', undef, undef, 'shorewall'),
) {
- class { "firewall::implementations::${implementation}::router::ssh":
- destination => $destination,
- port_orig => $port_orig,
- port_dest => $port_dest,
- zone => $zone,
- order => $order,
- originaldest => $originaldest,
+ if $implementation == 'shorewall' {
+ firewall::implementations::shorewall::router::ssh { "${name}":
+ destination => $destination,
+ port_orig => $port_orig,
+ port_dest => $port_dest,
+ zone => $zone,
+ originaldest => $originaldest,
+ }
}
}
$implementation = lookup('firewall::implementation', undef, undef, 'shorewall'),
$destination, $zone = 'loc', $originaldest = $ipaddress
) {
- class { "firewall::implementations::${implementation}::router::tor":
- destination => $destination,
- zone => $zone,
- originaldest => $originaldest,
+ if $implementation == 'shorewall' {
+ firewall::implementations::shorewall::router::tor { "${name}":
+ destination => $destination,
+ zone => $zone,
+ originaldest => $originaldest,
+ }
}
}
$destination,
$zone = 'loc',
$originaldest = $ipaddress,
- $range = lookup('firewall::torrent::range', undef, undef, '6881:6999')
+ $range = lookup('firewall::torrent::range', undef, undef, '6881:6999'),
$implementation = lookup('firewall::implementation', undef, undef, 'shorewall'),
) {
class { "firewall::implementations::${implementation}::router::torrent":