View file File name : sysctl.conf Content :# # /etc/sysctl.conf - Configuration file for setting system variables # See /etc/sysctl.d/ for additional system variables. # See sysctl.conf (5) for information. # #kernel.domainname = example.com # Uncomment the following to stop low-level messages on console #kernel.printk = 3 4 1 3 ################################################################### # Functions previously found in netbase # # Uncomment the next two lines to enable Spoof protection (reverse-path filter) # Turn on Source Address Verification in all interfaces to # prevent some spoofing attacks #net.ipv4.conf.default.rp_filter=1 #net.ipv4.conf.all.rp_filter=1 # Uncomment the next line to enable TCP/IP SYN cookies # See http://lwn.net/Articles/277146/ # Note: This may impact IPv6 TCP sessions too #net.ipv4.tcp_syncookies=1 # Uncomment the next line to enable packet forwarding for IPv4 #net.ipv4.ip_forward=1 # Uncomment the next line to enable packet forwarding for IPv6 # Enabling this option disables Stateless Address Autoconfiguration # based on Router Advertisements for this host #net.ipv6.conf.all.forwarding=1 ################################################################### # Additional settings - these settings can improve the network # security of the host and prevent against some network attacks # including spoofing attacks and man in the middle attacks through # redirection. Some network environments, however, require that these # settings are disabled so review and enable them as needed. # # Do not accept ICMP redirects (prevent MITM attacks) #net.ipv4.conf.all.accept_redirects = 0 #net.ipv6.conf.all.accept_redirects = 0 # _or_ # Accept ICMP redirects only for gateways listed in our default # gateway list (enabled by default) # net.ipv4.conf.all.secure_redirects = 1 # # Do not send ICMP redirects (we are not a router) #net.ipv4.conf.all.send_redirects = 0 # # Do not accept IP source route packets (we are not a router) #net.ipv4.conf.all.accept_source_route = 0 #net.ipv6.conf.all.accept_source_route = 0 # # Log Martian Packets #net.ipv4.conf.all.log_martians = 1 # ################################################################### # Magic system request Key # 0=disable, 1=enable all, >1 bitmask of sysrq functions # See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html # for what other values do #kernel.sysrq=438 kernel.pid_max=3072000 fs.file-max=6815744 kernel.sem=1000 128000 1028 2512 kernel.panic=30 vm.mmap_min_addr=65536 net.ipv4.tcp_syncookies=1 net.ipv4.tcp_timestamps=0 net.ipv4.conf.all.accept_redirects=0 net.ipv4.conf.all.log_martians=1 net.ipv4.conf.all.rp_filter=2 net.ipv4.conf.all.accept_source_route=0 net.ipv4.icmp_echo_ignore_broadcasts=1 net.ipv4.icmp_ignore_bogus_error_responses=1 net.ipv4.conf.all.promote_secondaries=1 vm.swappiness=40 net.ipv4.ip_nonlocal_bind=1 net.ipv4.conf.all.arp_announce=2 net.core.rmem_max=33554432 net.core.wmem_max=33554432 net.core.netdev_max_backlog=182757 net.ipv4.tcp_rmem=4096 87380 33554432 net.ipv4.tcp_wmem=4096 65536 33554432 vm.heap_stack_gap=1048576 net.netfilter.nf_conntrack_tcp_timeout_established=86400 fs.protected_hardlinks=0 fs.protected_symlinks=0 kernel.grsecurity.rwxmap_logging=0 kernel.grsecurity.exec_logging=0 kernel.grsecurity.resource_logging=1 kernel.grsecurity.chroot_execlog=1 kernel.grsecurity.audit_ptrace=1 kernel.grsecurity.signal_logging=1 kernel.grsecurity.forkfail_logging=1 kernel.grsecurity.timechange_logging=1 kernel.grsecurity.audit_mount=0 kernel.grsecurity.audit_chdir=0 kernel.grsecurity.chroot_caps=1 kernel.grsecurity.chroot_deny_bad_rename=1 kernel.grsecurity.chroot_deny_sysctl=1 kernel.grsecurity.chroot_restrict_nice=1 kernel.grsecurity.chroot_deny_unix=1 kernel.grsecurity.chroot_findtask=1 kernel.grsecurity.chroot_deny_shmat=1 kernel.grsecurity.chroot_deny_mknod=1 kernel.grsecurity.chroot_deny_fchdir=1 kernel.grsecurity.chroot_deny_chmod=1 kernel.grsecurity.chroot_enforce_chdir=1 kernel.grsecurity.chroot_deny_pivot=1 kernel.grsecurity.chroot_deny_chroot=1 kernel.grsecurity.fifo_restrictions=1 kernel.grsecurity.linking_restrictions=1 kernel.grsecurity.sysfs_restrict_bypass_gid=0 kernel.grsecurity.enforce_sysfs_restrict=1 kernel.grsecurity.harden_ptrace=1 kernel.grsecurity.ptrace_readexec=1 kernel.grsecurity.consistent_setxid=1 kernel.grsecurity.harden_ipc=1 kernel.grsecurity.harden_tty=1 kernel.grsecurity.dmesg=1 kernel.grsecurity.deter_bruteforce=0 kernel.grsecurity.tpe=0 kernel.grsecurity.tpe_invert=0 kernel.grsecurity.tpe_restrict_all=0 kernel.grsecurity.socket_all=5002 kernel.grsecurity.socket_client=5003 kernel.grsecurity.socket_server=5004 kernel.grsecurity.tpe_gid=5005 kernel.grsecurity.grsec_lock=0 user.max_user_namespaces=0 kernel.unprivileged_bpf_disabled=1