Signed-off-by: Stephen Gran <steve@lobefin.net>
@def $HOST_MUNIN = (192.25.206.57 192.25.206.33);
@def $HOST_NAGIOS = (192.25.206.57 192.25.206.33);
-@def $sgran = (91.103.132.25 2001:4b10:100b::dead:f00d);
-@def $weasel = ();
-@def $zobel = ();
-@def $luca = ();
+@def $sgran = (91.103.132.25);
+@def $weasel = ();
+@def $zobel = ();
+@def $luca = ();
@def $DSA_IPS = ($sgran $weasel $zobel $luca);
+
+@def $sgran6 = (2001:4b10:100b::dead:f00d);
+@def $weasel6 = ();
+@def $zobel6 = ();
+@def $luca6 = ();
+@def $DSA_V6_IPS = ($sgran6 $weasel6 $zobel6 $luca6);
ferm::rule { "dsa-ssh":
description => "Allow SSH from DSA",
- domain => "(ip ip6)",
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":
path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
sshallowed.join(' ')
%>);
+
+@def $SSH_V6_SOURCES = (<%=
+
+sshallowed = []
+
+case hostname
+ when 'logtest01' then sshallowed << [ '$DSA_V6_IPS' ]
+end
+
+if sshallowed.length == 0
+ sshallowed = [ ':::' ]
+end
+
+sshallowed.join(' ')
+%>);