From b669231b3bac4bfa8081b75d774752c155c5d493 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 29 Jan 2010 14:42:10 -0200 Subject: Adding icecast firewall rules --- manifests/init.pp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'manifests/init.pp') diff --git a/manifests/init.pp b/manifests/init.pp index 7f17331..f04efda 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -168,7 +168,8 @@ class nodo::vserver inherits nodo { #Nodo::vserver::munin <| tag == $name |> # Define a vserver instance - define instance($context, $ensure = 'running', $proxy = false, $puppetmaster = false, $gitd = false, $munin = 'client') { + define instance($context, $ensure = 'running', $proxy = false, $puppetmaster = false, $gitd = false, + $munin = 'client', $icecast = false, $sound = false) { # set instance id if $context < 9 { @@ -308,6 +309,28 @@ class nodo::vserver inherits nodo { order => '307', } } + + if $icecast { + shorewall::rule { 'icecast-1': + action => 'DNAT', + source => 'net', + destination => "fw:192.168.0.$context:8000", + proto => 'tcp', + destinationport => '8000', + ratelimit => '-', + order => '308', + } + + shorewall::rule { 'icecast-2': + action => 'DNAT', + source => '$FW', + destination => "vm:192.168.0.$context:8000", + proto => 'tcp', + destinationport => '8000', + ratelimit => '-', + order => '309', + } + } } } } -- cgit v1.2.3