Skip to content

Commit 5b247b6

Browse files
authored
Merge 89dfe22 into 690b5c9
2 parents 690b5c9 + 89dfe22 commit 5b247b6

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

manifests/modules.pp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
class os_hardening::modules (
1212
Array $disable_filesystems =
1313
['cramfs','freevxfs','jffs2','hfs','hfsplus','squashfs','udf'],
14+
Array $disable_network_protocol = ['dccp','sctp','rds','tipc'],
1415
) {
1516

1617
# Disable unused filesystems (os-10)
@@ -22,5 +23,12 @@
2223
content => template('os_hardening/disable_fs.erb'),
2324
}
2425

26+
file { '/etc/modprobe.d/dev-sec-net-protocols.conf':
27+
ensure => file,
28+
owner => 'root',
29+
group => 'root',
30+
mode => '0440',
31+
content => template('os_hardening/disable_net_protocols.erb'),
32+
}
2533
}
2634

templates/disable_net_protocols.erb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# MANAGED BY PUPPET
2+
# Puppet os_hardening:
3+
4+
<% @disable_network_protocol.each do |protocol| -%>
5+
install <%= protocol %> /bin/true
6+
<% end -%>
7+

0 commit comments

Comments
 (0)