You need to apply kernel network hardening settings to all servers. Which sysctls and how?
IntermediateScenarioSecurity, hardening and incident response
Answer
Situation read → Persistent sysctl drop-in.
What I'd do →
/etc/sysctl.d/60-net-hardening.conf:
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.conf.all.log_martians = 1
kernel.kptr_restrict = 2
kernel.dmesg_restrict = 1
Apply with sudo sysctl --system.
Why → These stop spoofing, ICMP redirect attacks and SYN floods, and hide kernel pointers.
Interview tip → Don't disable ip_forward on Kubernetes nodes or routers; know your host's role.
More on Security, hardening and incident response
Monitoring shows a web server making outbound connections to an unknown IP on port 4444 at 2 AM. You suspect it is compromised. What do you do?AdvancedAfter the compromise you need to find how the attacker got in. Where do you look?AdvancedYour CISO asks you to harden a fresh Linux server baseline. What's on your list?IntermediateA developer says "SELinux keeps breaking my app, can we just disable it?" How do you respond and what do you do?IntermediateYou need to know when anyone modifies `/etc/sudoers`, `/etc/passwd` or SSH config. How?IntermediateA critical OpenSSL CVE is announced. How do you find and patch affected servers quickly?Intermediate