Linux sysctl.conf additions for security (CIS adjustments) and tweaks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CIS Benchmark Adjustments | |
# See: https://github.com/alanorth/securekickstarts | |
kernel.randomize_va_space = 2 | |
net.ipv4.ip_forward = 0 | |
net.ipv4.conf.all.send_redirects = 0 | |
net.ipv4.conf.default.send_redirects = 0 | |
net.ipv4.conf.all.accept_source_route = 0 | |
net.ipv4.conf.default.accept_source_route = 0 | |
net.ipv4.conf.all.accept_redirects = 0 | |
net.ipv4.conf.default.accept_redirects = 0 | |
net.ipv4.conf.all.secure_redirects = 0 | |
net.ipv4.conf.default.secure_redirects = 0 | |
net.ipv4.conf.all.log_martians = 1 | |
net.ipv4.conf.default.log_martians = 1 | |
net.ipv4.icmp_echo_ignore_broadcasts = 1 | |
net.ipv4.icmp_ignore_bogus_error_responses = 1 | |
net.ipv4.conf.all.rp_filter = 1 | |
net.ipv4.conf.default.rp_filter = 1 | |
net.ipv4.tcp_syncookies = 1 | |
# TCP stuff | |
# See: http://fasterdata.es.net/host-tuning/linux/ | |
# increase TCP max buffer size settable using setsockopt() | |
net.core.rmem_max = 16777216 | |
net.core.wmem_max = 16777216 | |
# increase Linux autotuning TCP buffer limit | |
net.ipv4.tcp_rmem = 4096 87380 16777216 | |
net.ipv4.tcp_wmem = 4096 65536 16777216 | |
# increase the length of the processor input queue | |
net.core.netdev_max_backlog = 30000 | |
# recommended default congestion control is htcp | |
net.ipv4.tcp_congestion_control=htcp | |
# recommended for hosts with jumbo frames enabled | |
#net.ipv4.tcp_mtu_probing=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment