diff --git a/easy-arch.sh b/easy-arch.sh index c179070..00f547c 100644 --- a/easy-arch.sh +++ b/easy-arch.sh @@ -186,6 +186,16 @@ arch-chroot /mnt /bin/bash -e </dev/null + + #Security kernel settings + echo "kernel.kptr_restrict = 2" > /etc/sysctl.d/51-kptr-restrict.conf + echo "kernel.kexec_load_disabled = 1" > /etc/sysctl.d/51-kexec-restrict.conf + echo << EOF >> /etc/sysctl.d/10-security.conf + fs.protected_hardlinks = 1 + fs.protected_symlinks = 1 + net.core.bpf_jit_harden = 2 + kernel.yama.ptrace_scope = 3 + EOF EOF