2024-07-15 00:00:00 +00:00
|
|
|
|
# Name: K4YT3X's Hardened & Optimized Linux Kernel Parameters
|
2020-10-05 17:52:08 -04:00
|
|
|
|
# Author: K4YT3X
|
2021-06-07 22:03:11 +00:00
|
|
|
|
# Contributor: IceCodeNew
|
|
|
|
|
|
# Contributor: HorlogeSkynet
|
2022-08-04 16:22:59 +00:00
|
|
|
|
# Contributor: shenzhui007
|
2020-10-05 17:52:08 -04:00
|
|
|
|
# Date Created: October 5, 2020
|
2025-10-19 00:00:00 +00:00
|
|
|
|
# Last Updated: October 19, 2025
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
# Licensed under the GNU General Public License Version 3 (GNU GPL v3),
|
|
|
|
|
|
# available at: https://www.gnu.org/licenses/gpl-3.0.txt
|
2025-10-31 00:00:00 +00:00
|
|
|
|
# Copyright 2020-2025 K4YT3X and contributors.
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
# Multiple sources have been consulted while writing this configuration
|
2024-07-15 00:00:00 +00:00
|
|
|
|
# file (e.g., nixCraft's sysctl.conf). Some sources may not have been cited.
|
|
|
|
|
|
# Please refer to Linux's kernel documentations or reach out to the author
|
|
|
|
|
|
# should you have any questions or recommendations.
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
########## Kernel ##########
|
|
|
|
|
|
|
|
|
|
|
|
# enable ExecShield protection
|
|
|
|
|
|
# 2 enables ExecShield by default unless applications bits are set to disabled
|
|
|
|
|
|
# uncomment on systems without NX/XD protections
|
|
|
|
|
|
# check with: dmesg | grep --color '[NX|DX]*protection'
|
|
|
|
|
|
#kernel.exec-shield = 2
|
|
|
|
|
|
|
|
|
|
|
|
# enable ASLR
|
|
|
|
|
|
# turn on protection and randomize stack, vdso page and mmap + randomize brk base address
|
|
|
|
|
|
kernel.randomize_va_space = 2
|
|
|
|
|
|
|
|
|
|
|
|
# controls the System Request debugging functionality of the kernel
|
|
|
|
|
|
kernel.sysrq = 0
|
|
|
|
|
|
|
|
|
|
|
|
# controls whether core dumps will append the PID to the core filename
|
|
|
|
|
|
# useful for debugging multi-threaded applications
|
|
|
|
|
|
kernel.core_uses_pid = 1
|
|
|
|
|
|
|
|
|
|
|
|
# restrict access to kernel address
|
|
|
|
|
|
# kernel pointers printed using %pK will be replaced with 0’s regardless of privileges
|
|
|
|
|
|
kernel.kptr_restrict = 2
|
|
|
|
|
|
|
|
|
|
|
|
# Ptrace protection using Yama
|
2024-05-02 00:00:00 +00:00
|
|
|
|
# - 0 (classic): allows any process to trace any other process under the same UID
|
|
|
|
|
|
# - 1 (restricted): only a parent process can be debugged
|
|
|
|
|
|
# - 2 (admin-only): only admins can use ptrace (CAP_SYS_PTRACE capability required)
|
|
|
|
|
|
# - 3 (no attach): disables ptrace completely, reboot is required to re-enable ptrace
|
|
|
|
|
|
# the general recommendation for this setting is:
|
|
|
|
|
|
# - if you do not need to debug programs, set it to 3
|
|
|
|
|
|
# - if you need to debug programs (e.g., GDB, LLDB, strace), set it to 1
|
|
|
|
|
|
# setting it to 3 will also break LXC v6+ procfs emulation for unprivileged containers
|
|
|
|
|
|
# (see GitHub issue https://github.com/lxc/lxcfs/issues/636)
|
2020-10-05 17:52:08 -04:00
|
|
|
|
kernel.yama.ptrace_scope = 3
|
|
|
|
|
|
|
2020-10-06 14:20:18 -04:00
|
|
|
|
# restrict kernel logs to root only
|
|
|
|
|
|
kernel.dmesg_restrict = 1
|
|
|
|
|
|
|
|
|
|
|
|
# restrict BPF JIT compiler to root only
|
|
|
|
|
|
kernel.unprivileged_bpf_disabled = 1
|
|
|
|
|
|
|
|
|
|
|
|
# disables kexec as it can be used to livepatch the running kernel
|
|
|
|
|
|
kernel.kexec_load_disabled = 1
|
|
|
|
|
|
|
2025-10-19 00:00:00 +00:00
|
|
|
|
# disable unprivileged user namespaces to reduce attack surface
|
|
|
|
|
|
# breaks unprivileged containers and sandboxing applications (e.g., Firefox and Docker)
|
|
|
|
|
|
#kernel.unprivileged_userns_clone = 0
|
|
|
|
|
|
#user.max_user_namespaces = 0
|
2020-10-06 14:20:18 -04:00
|
|
|
|
|
2023-07-06 23:24:49 +00:00
|
|
|
|
# disable the loading of kernel modules
|
|
|
|
|
|
# this can be used to prevent runtime insertion of malicious modules
|
|
|
|
|
|
# could break the system if enabled within sysctl.conf
|
|
|
|
|
|
# consider setting this manually after system is up
|
|
|
|
|
|
# sudo sysctl -w kernel.modules_disabled=1
|
|
|
|
|
|
#kernel.modules_disabled = 1
|
|
|
|
|
|
|
2020-10-05 17:52:08 -04:00
|
|
|
|
# allow for more PIDs
|
2020-10-07 17:29:29 -04:00
|
|
|
|
# this value can be up to:
|
|
|
|
|
|
# - 32768 (2^15) on a 32-bit system
|
|
|
|
|
|
# - 4194304 (2^22) on a 64-bit system
|
|
|
|
|
|
kernel.pid_max = 4194304
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
# reboot machine after kernel panic
|
|
|
|
|
|
#kernel.panic = 10
|
|
|
|
|
|
|
2025-10-19 00:00:00 +00:00
|
|
|
|
# reboot after just one kernel warning/oops
|
|
|
|
|
|
#kernel.warn_limit = 1
|
|
|
|
|
|
#kernel.oops_limit = 1
|
|
|
|
|
|
|
2021-06-06 14:08:57 +02:00
|
|
|
|
# restrict perf subsystem usage
|
2021-06-07 22:03:11 +00:00
|
|
|
|
kernel.perf_event_paranoid = 3
|
2021-06-06 14:08:57 +02:00
|
|
|
|
kernel.perf_cpu_time_max_percent = 1
|
2021-06-07 08:21:17 +00:00
|
|
|
|
kernel.perf_event_max_sample_rate = 1
|
2021-06-06 14:08:57 +02:00
|
|
|
|
|
2022-08-04 16:22:59 +00:00
|
|
|
|
# prevent unprivileged attackers from loading vulnerable line disciplines with the TIOCSETD ioctl
|
|
|
|
|
|
dev.tty.ldisc_autoload = 0
|
|
|
|
|
|
|
2025-10-19 00:00:00 +00:00
|
|
|
|
# disable TIOCSTI which can be used to inject keypresses
|
|
|
|
|
|
# breaks screen readers
|
|
|
|
|
|
dev.tty.legacy_tiocsti = 0
|
|
|
|
|
|
|
2025-10-19 00:00:00 +00:00
|
|
|
|
# block all newly connected USB devices
|
|
|
|
|
|
#kernel.deny_new_usb=1
|
|
|
|
|
|
|
2020-10-05 17:52:08 -04:00
|
|
|
|
########## File System ##########
|
|
|
|
|
|
|
|
|
|
|
|
# disallow core dumping by SUID/SGID programs
|
|
|
|
|
|
fs.suid_dumpable = 0
|
|
|
|
|
|
|
|
|
|
|
|
# protect the creation of hard links
|
|
|
|
|
|
# one of the following conditions must be fulfilled
|
|
|
|
|
|
# - the user can only link to files that he or she owns
|
|
|
|
|
|
# - the user must first have read and write access to a file, that he/she wants to link to
|
|
|
|
|
|
fs.protected_hardlinks = 1
|
|
|
|
|
|
|
|
|
|
|
|
# protect the creation of symbolic links
|
|
|
|
|
|
# one of the following conditions must be fulfilled
|
|
|
|
|
|
# - the process following the symbolic link is the owner of the symbolic link
|
|
|
|
|
|
# - the owner of the directory is also the owner of the symbolic link
|
|
|
|
|
|
fs.protected_symlinks = 1
|
|
|
|
|
|
|
2020-10-06 14:20:18 -04:00
|
|
|
|
# enable extended FIFO protection
|
|
|
|
|
|
fs.protected_fifos = 2
|
|
|
|
|
|
|
|
|
|
|
|
# similar to protected_fifos, but it avoids writes to an attacker-controlled regular file
|
|
|
|
|
|
fs.protected_regular = 2
|
|
|
|
|
|
|
2020-10-05 17:52:08 -04:00
|
|
|
|
# increase system file descriptor limit
|
2020-10-07 17:29:29 -04:00
|
|
|
|
# this value can be up to:
|
|
|
|
|
|
# - 2147483647 (0x7fffffff) on a 32-bit system
|
|
|
|
|
|
# - 9223372036854775807 (0x7fffffffffffffff) on a 64-bit system
|
2020-10-07 17:39:07 -04:00
|
|
|
|
# be aware that the Linux kernel documentation suggests that inode-max should be 3-4 times
|
|
|
|
|
|
# larger than this value
|
2020-10-07 17:29:29 -04:00
|
|
|
|
fs.file-max = 9223372036854775807
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
2020-10-19 17:31:10 -04:00
|
|
|
|
# increase the amount of files that can be watched
|
|
|
|
|
|
# each file watch handle takes 1080 bytes
|
|
|
|
|
|
# up to 540 MiB of memory will be consumed if all 524288 handles are used
|
|
|
|
|
|
fs.inotify.max_user_watches = 524288
|
|
|
|
|
|
|
2020-10-06 14:20:18 -04:00
|
|
|
|
########## Virtualization ##########
|
|
|
|
|
|
|
2021-06-06 14:08:57 +02:00
|
|
|
|
# do not allow mmap in lower addresses
|
|
|
|
|
|
vm.mmap_min_addr = 65536
|
|
|
|
|
|
|
2022-07-02 10:19:10 +02:00
|
|
|
|
# improve mmap ASLR effectiveness
|
|
|
|
|
|
vm.mmap_rnd_bits = 32
|
|
|
|
|
|
vm.mmap_rnd_compat_bits = 16
|
2020-10-06 14:20:18 -04:00
|
|
|
|
|
2022-08-04 16:22:59 +00:00
|
|
|
|
# prevent unprivileged users from accessing userfaultfd
|
|
|
|
|
|
# restricts syscall to the privileged users or the CAP_SYS_PTRACE capability
|
|
|
|
|
|
vm.unprivileged_userfaultfd = 0
|
|
|
|
|
|
|
2020-10-06 14:20:18 -04:00
|
|
|
|
########## Networking ##########
|
|
|
|
|
|
|
|
|
|
|
|
# increase the maximum length of processor input queues
|
|
|
|
|
|
net.core.netdev_max_backlog = 250000
|
|
|
|
|
|
|
|
|
|
|
|
# enable BPF JIT hardening for all users
|
|
|
|
|
|
# this trades off performance, but can mitigate JIT spraying
|
|
|
|
|
|
net.core.bpf_jit_harden = 2
|
|
|
|
|
|
|
2024-07-15 00:00:00 +00:00
|
|
|
|
# increase TCP max buffer size settable using setsockopt()
|
2021-10-12 18:14:09 +00:00
|
|
|
|
net.core.rmem_default = 8388608
|
|
|
|
|
|
net.core.wmem_default = 8388608
|
2024-07-15 00:00:00 +00:00
|
|
|
|
net.core.rmem_max = 536870912
|
|
|
|
|
|
net.core.wmem_max = 536870912
|
|
|
|
|
|
net.core.optmem_max = 40960
|
2020-10-06 14:20:18 -04:00
|
|
|
|
|
2020-10-05 17:52:08 -04:00
|
|
|
|
########## IPv4 Networking ##########
|
|
|
|
|
|
|
2025-10-31 00:00:00 +00:00
|
|
|
|
# enable BBR congestion control and FQ-CoDel queuing discipline
|
2020-10-05 17:52:08 -04:00
|
|
|
|
net.ipv4.tcp_congestion_control = bbr
|
2025-10-31 00:00:00 +00:00
|
|
|
|
net.core.default_qdisc = fq_codel
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
# disallow IPv4 packet forwarding
|
|
|
|
|
|
net.ipv4.ip_forward = 0
|
|
|
|
|
|
|
|
|
|
|
|
# enable SYN cookies for SYN flooding protection
|
|
|
|
|
|
net.ipv4.tcp_syncookies = 1
|
|
|
|
|
|
|
|
|
|
|
|
# number of times SYNACKs for a passive TCP connection attempt will be retransmitted
|
|
|
|
|
|
net.ipv4.tcp_synack_retries = 5
|
|
|
|
|
|
|
|
|
|
|
|
# do not send redirects
|
|
|
|
|
|
net.ipv4.conf.default.send_redirects = 0
|
|
|
|
|
|
net.ipv4.conf.all.send_redirects = 0
|
|
|
|
|
|
|
|
|
|
|
|
# do not accept packets with SRR option
|
|
|
|
|
|
net.ipv4.conf.default.accept_source_route = 0
|
|
|
|
|
|
net.ipv4.conf.all.accept_source_route = 0
|
|
|
|
|
|
|
2020-10-21 23:37:04 -04:00
|
|
|
|
# enable reverse path source validation (BCP38)
|
|
|
|
|
|
# refer to RFC1812, RFC2827, and BCP38 (http://www.bcp38.info)
|
2020-10-05 17:52:08 -04:00
|
|
|
|
net.ipv4.conf.default.rp_filter = 1
|
|
|
|
|
|
net.ipv4.conf.all.rp_filter = 1
|
|
|
|
|
|
|
|
|
|
|
|
# log packets with impossible addresses to kernel log
|
|
|
|
|
|
net.ipv4.conf.default.log_martians = 1
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv4.conf.all.log_martians = 1
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
# do not accept ICMP redirect messages
|
|
|
|
|
|
net.ipv4.conf.default.accept_redirects = 0
|
|
|
|
|
|
net.ipv4.conf.default.secure_redirects = 0
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv4.conf.all.accept_redirects = 0
|
2020-10-05 17:52:08 -04:00
|
|
|
|
net.ipv4.conf.all.secure_redirects = 0
|
|
|
|
|
|
|
|
|
|
|
|
# disable sending and receiving of shared media redirects
|
|
|
|
|
|
# this setting overwrites net.ipv4.conf.all.secure_redirects
|
|
|
|
|
|
# refer to RFC1620
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv4.conf.default.shared_media = 0
|
2020-10-05 17:52:08 -04:00
|
|
|
|
net.ipv4.conf.all.shared_media = 0
|
|
|
|
|
|
|
|
|
|
|
|
# always use the best local address for announcing local IP via ARP
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv4.conf.default.arp_announce = 2
|
2020-10-05 17:52:08 -04:00
|
|
|
|
net.ipv4.conf.all.arp_announce = 2
|
|
|
|
|
|
|
|
|
|
|
|
# reply only if the target IP address is local address configured on the incoming interface
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv4.conf.default.arp_ignore = 1
|
2020-10-05 17:52:08 -04:00
|
|
|
|
net.ipv4.conf.all.arp_ignore = 1
|
|
|
|
|
|
|
2020-10-06 14:20:18 -04:00
|
|
|
|
# drop Gratuitous ARP frames to prevent ARP poisoning
|
|
|
|
|
|
# this can cause issues when ARP proxies are used in the network
|
|
|
|
|
|
net.ipv4.conf.default.drop_gratuitous_arp = 1
|
|
|
|
|
|
net.ipv4.conf.all.drop_gratuitous_arp = 1
|
|
|
|
|
|
|
|
|
|
|
|
# ignore all ICMP echo requests
|
|
|
|
|
|
#net.ipv4.icmp_echo_ignore_all = 1
|
|
|
|
|
|
|
|
|
|
|
|
# ignore all ICMP echo and timestamp requests sent to broadcast/multicast
|
|
|
|
|
|
net.ipv4.icmp_echo_ignore_broadcasts = 1
|
|
|
|
|
|
|
|
|
|
|
|
# ignore bad ICMP errors
|
|
|
|
|
|
net.ipv4.icmp_ignore_bogus_error_responses = 1
|
|
|
|
|
|
|
2020-10-05 17:52:08 -04:00
|
|
|
|
# mitigate TIME-WAIT Assassination hazards in TCP
|
|
|
|
|
|
# refer to RFC1337
|
|
|
|
|
|
net.ipv4.tcp_rfc1337 = 1
|
|
|
|
|
|
|
|
|
|
|
|
# disable TCP window scaling
|
|
|
|
|
|
# this makes the host less susceptible to TCP RST DoS attacks
|
2023-07-03 18:20:40 +00:00
|
|
|
|
# could drastically reduce throughput if latency is high
|
|
|
|
|
|
#net.ipv4.tcp_window_scaling = 0
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
# increase system IP port limits
|
2020-10-07 17:31:14 -04:00
|
|
|
|
net.ipv4.ip_local_port_range = 1024 65535
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
2020-10-29 10:44:10 -04:00
|
|
|
|
# TCP timestamps could provide protection against wrapped sequence numbers,
|
|
|
|
|
|
# but the host's uptime can be calculated precisely from its timestamps
|
|
|
|
|
|
# it is also possible to differentiate operating systems based on their use of timestamps
|
|
|
|
|
|
# - 0: disable TCP timestamps
|
|
|
|
|
|
# - 1: enable timestamps as defined in RFC1323 and use random offset for
|
|
|
|
|
|
# each connection rather than only using the current time
|
|
|
|
|
|
# - 2: enable timestamps without random offsets
|
2020-10-05 17:52:08 -04:00
|
|
|
|
net.ipv4.tcp_timestamps = 0
|
|
|
|
|
|
|
2025-08-24 00:00:00 +00:00
|
|
|
|
# enabling SACK can improve congestion control and throughput
|
|
|
|
|
|
# but it could also be leveraged to exhaust system resources
|
|
|
|
|
|
# re-enable SACK if you experience performance issues transferring large files
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv4.tcp_sack = 0
|
2021-10-12 18:14:09 +00:00
|
|
|
|
net.ipv4.tcp_dsack = 0
|
|
|
|
|
|
net.ipv4.tcp_fack = 0
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
2021-10-12 17:17:31 +00:00
|
|
|
|
# SSR could impact TCP's performance on a fixed-speed network (e.g., wired)
|
|
|
|
|
|
# but it could be helpful on a variable-speed network (e.g., LTE)
|
|
|
|
|
|
# uncomment this if you are on a fixed-speed network
|
2021-10-12 18:14:09 +00:00
|
|
|
|
net.ipv4.tcp_slow_start_after_idle = 0
|
2021-10-12 17:17:31 +00:00
|
|
|
|
|
|
|
|
|
|
# enabling MTU probing helps mitigating PMTU blackhole issues
|
|
|
|
|
|
# this may not be desirable on congested networks
|
2021-10-12 18:14:09 +00:00
|
|
|
|
net.ipv4.tcp_mtu_probing = 1
|
2021-10-15 15:50:23 +00:00
|
|
|
|
net.ipv4.tcp_base_mss = 1024
|
2021-10-12 17:17:31 +00:00
|
|
|
|
|
2020-10-05 17:52:08 -04:00
|
|
|
|
# increase memory thresholds to prevent packet dropping
|
2024-07-15 00:00:00 +00:00
|
|
|
|
# the maximum buffer size is 536870912 bytes (512 MiB)
|
|
|
|
|
|
net.ipv4.tcp_rmem = 8192 262144 536870912
|
|
|
|
|
|
net.ipv4.tcp_wmem = 4096 16384 536870912
|
|
|
|
|
|
|
|
|
|
|
|
# reduce the maximum window size to 128 MiB to reduce TCP receive queue collapse
|
|
|
|
|
|
# (see https://blog.cloudflare.com/optimizing-tcp-for-high-throughput-and-low-latency)
|
|
|
|
|
|
net.ipv4.tcp_adv_win_scale = -2
|
|
|
|
|
|
|
|
|
|
|
|
# limit the size of unsent bytes in the write queue to prevent bufferbloat
|
|
|
|
|
|
net.ipv4.tcp_notsent_lowat = 131072
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
########## IPv6 Networking ##########
|
|
|
|
|
|
|
|
|
|
|
|
# disallow IPv6 packet forwarding
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv6.conf.default.forwarding = 0
|
2020-10-05 17:52:08 -04:00
|
|
|
|
net.ipv6.conf.all.forwarding = 0
|
|
|
|
|
|
|
|
|
|
|
|
# number of Router Solicitations to send until assuming no routers are present
|
|
|
|
|
|
net.ipv6.conf.default.router_solicitations = 0
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv6.conf.all.router_solicitations = 0
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
# do not accept Router Preference from RA
|
|
|
|
|
|
net.ipv6.conf.default.accept_ra_rtr_pref = 0
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv6.conf.all.accept_ra_rtr_pref = 0
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
# learn prefix information in router advertisement
|
|
|
|
|
|
net.ipv6.conf.default.accept_ra_pinfo = 0
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv6.conf.all.accept_ra_pinfo = 0
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
# setting controls whether the system will accept Hop Limit settings from a router advertisement
|
|
|
|
|
|
net.ipv6.conf.default.accept_ra_defrtr = 0
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv6.conf.all.accept_ra_defrtr = 0
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
# router advertisements can cause the system to assign a global unicast address to an interface
|
|
|
|
|
|
net.ipv6.conf.default.autoconf = 0
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv6.conf.all.autoconf = 0
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
# number of neighbor solicitations to send out per address
|
|
|
|
|
|
net.ipv6.conf.default.dad_transmits = 0
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv6.conf.all.dad_transmits = 0
|
2020-10-05 17:52:08 -04:00
|
|
|
|
|
|
|
|
|
|
# number of global unicast IPv6 addresses can be assigned to each interface
|
|
|
|
|
|
net.ipv6.conf.default.max_addresses = 1
|
2020-10-06 14:20:18 -04:00
|
|
|
|
net.ipv6.conf.all.max_addresses = 1
|
|
|
|
|
|
|
|
|
|
|
|
# enable IPv6 Privacy Extensions (RFC3041) and prefer the temporary address
|
|
|
|
|
|
net.ipv6.conf.default.use_tempaddr = 2
|
|
|
|
|
|
net.ipv6.conf.all.use_tempaddr = 2
|
|
|
|
|
|
|
2021-06-07 22:03:11 +00:00
|
|
|
|
# ignore IPv6 ICMP redirect messages
|
|
|
|
|
|
net.ipv6.conf.default.accept_redirects = 0
|
|
|
|
|
|
net.ipv6.conf.all.accept_redirects = 0
|
|
|
|
|
|
|
|
|
|
|
|
# do not accept packets with SRR option
|
|
|
|
|
|
net.ipv6.conf.default.accept_source_route = 0
|
|
|
|
|
|
net.ipv6.conf.all.accept_source_route = 0
|
|
|
|
|
|
|
2020-10-06 14:20:18 -04:00
|
|
|
|
# ignore all ICMPv6 echo requests
|
|
|
|
|
|
#net.ipv6.icmp.echo_ignore_all = 1
|
|
|
|
|
|
#net.ipv6.icmp.echo_ignore_anycast = 1
|
|
|
|
|
|
#net.ipv6.icmp.echo_ignore_multicast = 1
|