aboutsummaryrefslogtreecommitdiff
path: root/manifests/vserver.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/vserver.pp')
-rw-r--r--manifests/vserver.pp24
1 files changed, 23 insertions, 1 deletions
diff --git a/manifests/vserver.pp b/manifests/vserver.pp
index 72406ca..b8ae60e 100644
--- a/manifests/vserver.pp
+++ b/manifests/vserver.pp
@@ -31,7 +31,7 @@ class nodo::vserver inherits nodo {
# Define a vserver instance
define instance($context, $ensure = 'running', $proxy = false,
- $puppetmaster = false, $gitd = false,
+ $puppetmaster = false, $gitd = false, $mail = false,
$icecast = false, $sound = false, $ticket = false,
$memory_limit = false) {
@@ -308,6 +308,28 @@ class nodo::vserver inherits nodo {
order => '901',
}
}
+ if $mail {
+ shorewall::rule { 'mail-1':
+ action => 'DNAT',
+ source => 'net',
+ destination => "fw:192.168.0.$context:25",
+ proto => 'tcp',
+ destinationport => '25',
+ ratelimit => '-',
+ order => '1000',
+ }
+
+ shorewall::rule { 'mail-2':
+ action => 'DNAT',
+ source => '$FW',
+ destination => "fw:192.168.0.$context:25",
+ proto => 'tcp',
+ destinationport => '25',
+ originaldest => "$ipaddress",
+ ratelimit => '-',
+ order => '1001',
+ }
+ }
}
}
}