-define firewall::virtual::munin($destination, $port_orig, $port_dest = '', $order = '400', $zone = 'fw') {
+define firewall::implementations::shorewall::virtual::munin($destination, $port_orig, $port_dest = '', $order = '400', $zone = 'fw') {
shorewall::rule { "munin-$name-1":
action => 'DNAT',
source => 'net',
-define firewall::virtual::ssh($destination, $port_orig = '22', $port_dest = '', $zone = 'vm') {
+define firewall::implementations::shorewall::virtual::ssh($destination, $port_orig = '22', $port_dest = '', $zone = 'vm') {
shorewall::rule { "ssh-$name-1":
action => 'DNAT',
source => 'net',
-define firewall::virtual::web(
+define firewall::implementations::shorewall::virtual::web(
$destination
) {
shorewall::rule { "web-route-${name}-1":
$destinationport,
) {
class { "firewall::implementations::${implementation}::redirect::ssh":
- destinationport = $destinationport,
+ destinationport => $destinationport,
}
}
$zone = 'fw'
$implementation = lookup('firewall::implementation', undef, undef, 'shorewall'),
) {
- class { "firewall::implementations::${implementation}::virtual::munin":
- destination => $destination,
- port_orig => $port_orig,
- port_dest => $port_dest,
- order => $order,
- zone => $zone,
+ if $implementation == 'shorewall' {
+ firewall::implementations::shorewall::virtual::munin { "${name}":
+ destination => $destination,
+ port_orig => $port_orig,
+ port_dest => $port_dest,
+ order => $order,
+ zone => $zone,
+ }
}
}
$destination,
$port_orig = '22',
$port_dest = '',
- $zone = 'vm'
+ $zone = 'vm',
$implementation = lookup('firewall::implementation', undef, undef, 'shorewall'),
) {
- class { "firewall::implementations::${implementation}::virtual::ssh":
- destination => $destination,
- port_orig => $port_orig,
- port_dest => $port_dest,
- zone => $zone,
+ if $implementation == 'shorewall' {
+ firewall::implementations::shorewall::virtual::ssh { "${name}":
+ destination => $destination,
+ port_orig => $port_orig,
+ port_dest => $port_dest,
+ zone => $zone,
+ }
}
}
$implementation = lookup('firewall::implementation', undef, undef, 'shorewall'),
$destination
) {
- class { "firewall::implementations::${implementation}::virtual::web":
- destination => $destination,
+ if $implementation == 'shorewall' {
+ firewall::implementations::shorewall::virtual::web { "${name}":
+ destination => $destination,
+ }
}
}