alpha 0.1
This commit is contained in:
13
lib/sysctl.sh
Normal file
13
lib/sysctl.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
harden_sysctl() {
|
||||
CONF="/etc/sysctl.d/99-hardening.conf"
|
||||
SNAP=$(backup_create sysctl "$CONF")
|
||||
|
||||
cat > "$CONF" <<EOF
|
||||
net.ipv4.conf.all.accept_redirects = 0
|
||||
kernel.kptr_restrict = 2
|
||||
fs.protected_symlinks = 1
|
||||
EOF
|
||||
|
||||
sysctl --system || rm -f "$CONF"
|
||||
pause
|
||||
}
|
||||
Reference in New Issue
Block a user