summaryrefslogtreecommitdiff
path: root/manifests/router
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/router')
-rw-r--r--manifests/router/hairpinning.pp24
-rw-r--r--manifests/router/mail.pp2
-rw-r--r--manifests/router/munin.pp16
-rw-r--r--manifests/router/rsync.pp3
-rw-r--r--manifests/router/ssh.pp15
-rw-r--r--manifests/router/tor.pp10
-rw-r--r--manifests/router/torrent.pp2
7 files changed, 39 insertions, 33 deletions
diff --git a/manifests/router/hairpinning.pp b/manifests/router/hairpinning.pp
index 96fac1e..7be71ca 100644
--- a/manifests/router/hairpinning.pp
+++ b/manifests/router/hairpinning.pp
@@ -12,16 +12,18 @@ define firewall::router::hairpinning(
$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,
+ }
}
}
diff --git a/manifests/router/mail.pp b/manifests/router/mail.pp
index 5efde58..6ae5662 100644
--- a/manifests/router/mail.pp
+++ b/manifests/router/mail.pp
@@ -1,4 +1,4 @@
-class firewall::router::mail(i
+class firewall::router::mail(
$implementation = lookup('firewall::implementation', undef, undef, 'shorewall'),
$destination, $zone = 'loc', $originaldest = $ipaddress
) {
diff --git a/manifests/router/munin.pp b/manifests/router/munin.pp
index 4fd33fd..e5d2fb9 100644
--- a/manifests/router/munin.pp
+++ b/manifests/router/munin.pp
@@ -7,12 +7,14 @@ define firewall::router::munin(
$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,
+ }
}
}
diff --git a/manifests/router/rsync.pp b/manifests/router/rsync.pp
index 9e36f85..8098e4a 100644
--- a/manifests/router/rsync.pp
+++ b/manifests/router/rsync.pp
@@ -3,7 +3,7 @@ class firewall::router::rsync(
$port_orig = '873',
$port_dest = '',
$zone = 'loc',
- $originaldest = $ipaddress
+ $originaldest = $ipaddress,
$implementation = lookup('firewall::implementation', undef, undef, 'shorewall'),
) {
class { "firewall::implementations::${implementation}::router::rsync":
@@ -11,7 +11,6 @@ class firewall::router::rsync(
port_orig => $port_orig,
port_dest => $port_dest,
zone => $zone,
- order => $order,
originaldest => $originaldest,
}
}
diff --git a/manifests/router/ssh.pp b/manifests/router/ssh.pp
index 6f1a640..5704fbb 100644
--- a/manifests/router/ssh.pp
+++ b/manifests/router/ssh.pp
@@ -6,12 +6,13 @@ define firewall::router::ssh(
$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,
+ }
}
}
diff --git a/manifests/router/tor.pp b/manifests/router/tor.pp
index b93ea05..e3c61fb 100644
--- a/manifests/router/tor.pp
+++ b/manifests/router/tor.pp
@@ -2,9 +2,11 @@ define firewall::router::tor(
$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,
+ }
}
}
diff --git a/manifests/router/torrent.pp b/manifests/router/torrent.pp
index b5ac97d..493bd4c 100644
--- a/manifests/router/torrent.pp
+++ b/manifests/router/torrent.pp
@@ -2,7 +2,7 @@ class firewall::router::torrent(
$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":