]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Adding gobby server routing for vservers
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 8 Jun 2012 12:57:12 +0000 (09:57 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 8 Jun 2012 12:57:12 +0000 (09:57 -0300)
manifests/subsystems/firewall/vserver.pp
manifests/vserver.pp

index 30f3c39f0a3a4260ac6025545a0e8bb10aed9b7f..fe96c40d92b262e85883e25451bffd687288203e 100644 (file)
@@ -453,3 +453,15 @@ class firewall::vserver::mumble($destination, $zone = 'fw') {
     order           => '2301',
   }
 }
+
+class firewall::vserver::gobby($destination, $zone = 'fw') {
+  shorewall::rule { 'gobby-0':
+    action          => 'DNAT',
+    source          => 'net',
+    destination     => "$zone:$destination:6523",
+    proto           => 'tcp',
+    destinationport => '6523',
+    ratelimit       => '-',
+    order           => '2400',
+  }
+}
index 938903a801445f0584c7b020dba88fb5e8fd2d9b..02cb1028a9d7db35ed42a3894c965c199d74b218 100644 (file)
@@ -48,7 +48,7 @@ class nodo::vserver inherits nodo {
                   $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) {
+                  $jabber = false, $mumble = false, $gobby = false) {
 
     # set instance id
     if $context <= 9 {
@@ -211,6 +211,12 @@ class nodo::vserver inherits nodo {
             "firewall::vserver::mumble": destination => "192.168.0.$context";
           }
         }
+
+        if $gobby {
+          class {
+            "firewall::vserver::gobby": destination => "192.168.0.$context";
+          }
+        }
       }
     }
   }