move keyinfo to all hosts, as we want it for various other lookups
[mirror/dsa-puppet.git] / modules / ssh / manifests / init.pp
index 00ea2f9..e2248f8 100644 (file)
@@ -13,15 +13,31 @@ class ssh {
                require => Package["openssh-server"],
                 notify  => Exec["ssh restart"]
                 ;
-#              "/etc/ssh/userkeys/root":
-#               content => template("ssh/authorized_keys.erb" ],
-#               mode    => 444,
-#               require => Package["openssh-server"]
-#               ;
+              "/etc/ssh/userkeys":
+               ensure  => directory,
+               owner   => root,
+               group   => root,
+               mode    => 755,
+                ;
+              "/etc/ssh/userkeys/root":
+                content => template("ssh/authorized_keys.erb"),
+                mode    => 444,
+                require => Package["openssh-server"]
+                ;
        }
 
         exec { "ssh restart":
             path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
             refreshonly => true,
         }
+
+        @ferm::rule { "dsa-ssh":
+                description     => "Allow SSH from DSA",
+                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; }"
+        }
 }