veilor-os/overlay/etc/sysctl.d/99-veilor-hardening.conf

25 lines
834 B
Text

# veilor-os — kernel sysctl hardening
# Mirrors scripts/20-harden-kernel.sh; ships in overlay so values present
# at first boot before scripts run.
kernel.kptr_restrict = 2
kernel.dmesg_restrict = 1
net.core.bpf_jit_harden = 2
kernel.perf_event_paranoid = 3
kernel.yama.ptrace_scope = 2
kernel.randomize_va_space = 2
kernel.modules_disabled = 0
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.default.log_martians = 1
fs.suid_dumpable = 0
dev.tty.ldisc_autoload = 0
kernel.sched_schedstats = 0
net.ipv4.tcp_syncookies = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.accept_source_route = 0
net.ipv6.conf.all.accept_source_route = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv6.conf.all.accept_redirects = 0