X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fssh%2Fmanifests%2Finit.pp;h=452ce5dfbaaa24e91e047650d03b00e9dc4aceee;hb=131d1d904fb3e556c4b46ac3c00c9861ae95e0c1;hp=c802efe831d8b8351b4c29a8c84bb8e51f685c53;hpb=ed76c9c3f076ecdc37bd84405e8c2e6e64e1f898;p=mirror%2Fdsa-puppet.git diff --git a/modules/ssh/manifests/init.pp b/modules/ssh/manifests/init.pp index c802efe83..452ce5dfb 100644 --- a/modules/ssh/manifests/init.pp +++ b/modules/ssh/manifests/init.pp @@ -4,6 +4,13 @@ class ssh { openssh-server: ensure => installed; } + case $hostname { + bartok, beethoven: { + $keyinfo = allnodeinfo("sshRSAHostKey", "ipHostNumber") + } + } + + file { "/etc/ssh/ssh_config": source => [ "puppet:///ssh/ssh_config" ], require => Package["openssh-client"] @@ -30,4 +37,14 @@ class ssh { 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; }" + } }