aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/subsystems/firewall/vserver.pp12
-rw-r--r--manifests/vserver/instance.pp8
2 files changed, 19 insertions, 1 deletions
diff --git a/manifests/subsystems/firewall/vserver.pp b/manifests/subsystems/firewall/vserver.pp
index 97571a9..702acc9 100644
--- a/manifests/subsystems/firewall/vserver.pp
+++ b/manifests/subsystems/firewall/vserver.pp
@@ -510,3 +510,15 @@ class firewall::vserver::rsync($destination, $zone = 'fw') {
order => 2600,
}
}
+
+class firewall::vserver::mdns($destination, $zone = 'fw') {
+ shorewall::rule { 'mdns-0':
+ action => 'DNAT',
+ source => 'net',
+ destination => "$zone:$destination:5353",
+ proto => 'tcp',
+ destinationport => '5353',
+ ratelimit => '-',
+ order => 2700,
+ }
+}
diff --git a/manifests/vserver/instance.pp b/manifests/vserver/instance.pp
index dba9abb..28dd85d 100644
--- a/manifests/vserver/instance.pp
+++ b/manifests/vserver/instance.pp
@@ -4,7 +4,7 @@ define nodo::vserver::instance($context, $ensure = 'running', $proxy = false,
$icecast = false, $sound = false, $tor = false,
$ticket = false, $memory_limit = false, $distro = 'squeeze',
$dns = false, $munin_port = false, $monkeysphere_ssh_port = false,
- $jabber = false, $mumble = false, $gobby = false, $yacy = false, $rsync = false) {
+ $jabber = false, $mumble = false, $gobby = false, $yacy = false, $rsync = false, $avahi = false) {
# set instance id
if $context <= 9 {
@@ -175,6 +175,12 @@ define nodo::vserver::instance($context, $ensure = 'running', $proxy = false,
"firewall::vserver::rsync": destination => "192.168.0.$context";
}
}
+
+ if $avahi {
+ class {
+ "firewall::vserver::mdns": destination => "192.168.0.$context";
+ }
+ }
}
}
}