add v6, possibly not brokenly this time
[mirror/dsa-puppet.git] / modules / ferm / manifests / init.pp
index 0d93d3a..75b8f55 100644 (file)
@@ -6,6 +6,7 @@ class ferm {
                        group   => root,
                        mode    => 0600,
                        content => template("ferm/ferm-rule.erb"),
+                        notify  => Exec["ferm restart"],
                }
        }
 
@@ -26,11 +27,20 @@ class ferm {
                         content => template("ferm/me.conf.erb"),
                         require => Package["ferm"],
                         notify  => Exec["ferm restart"];
+                "/etc/ferm/conf.d/defs.conf":
+                        source  => "puppet:///ferm/defs.conf",
+                        require => Package["ferm"],
+                        notify  => Exec["ferm restart"];
         }
 
         ferm::rule { "dsa-ssh":
                 description     => "Allow SSH from DSA",
-                rule            => "proto tcp dport ssh ACCEPT"
+                rule            => "proto tcp mod state state (NEW) dport (ssh) @subchain 'ssh' { saddr (\$SSH_SOURCES) ACCEPT; }"
+        }
+        ferm::rule { "dsa-ssh-v6":
+                description     => "Allow SSH from DSA",
+                domain          => "ip6",
+                rule            => "proto tcp mod state state (NEW) dport (ssh) @subchain 'ssh' { saddr (\$SSH_V6_SOURCES) ACCEPT; }"
         }
 
         exec { "ferm restart":