]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Adding icecast firewall rules
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 29 Jan 2010 16:42:10 +0000 (14:42 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 29 Jan 2010 16:42:10 +0000 (14:42 -0200)
manifests/init.pp

index 7f17331a681579c1044b1f83bdf95b9f20ebe231..f04efdab7e8b59f718c109ff3927e19f912ba9f8 100644 (file)
@@ -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',
+          }
+        }
       }
     }
   }