projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
231f3f2
)
Add address masks
author
Tollef Fog Heen
<tfheen@err.no>
Sat, 13 Apr 2019 20:06:31 +0000
(22:06 +0200)
committer
Tollef Fog Heen
<tfheen@err.no>
Sat, 13 Apr 2019 20:06:31 +0000
(22:06 +0200)
modules/ssh/templates/sshd_config.erb
patch
|
blob
|
history
diff --git
a/modules/ssh/templates/sshd_config.erb
b/modules/ssh/templates/sshd_config.erb
index
8463fe6
..
e51a8f6
100644
(file)
--- a/
modules/ssh/templates/sshd_config.erb
+++ b/
modules/ssh/templates/sshd_config.erb
@@
-54,7
+54,11
@@
Match Address <%=
dbs = []
allnodeinfo.keys.sort.each do |node|
next unless allnodeinfo[node].has_key?('ipHostNumber')
- dbs << allnodeinfo[node]['ipHostNumber']
+ if allnodeinfo[node]['ipHostNumber'] =~ ":"
+ dbs << "#{allnodeinfo[node]['ipHostNumber']}/128"
+ else
+ dbs << "#{allnodeinfo[node]['ipHostNumber']}/32"
+ end
end
dbs.flatten.join(',')
%>