sysctl -w net.ipv4.conf.default.accept_redirects=0

Category: Security & Hardening

sysctl -w net.ipv4.conf.default.accept_redirects=0

Ignore ICMP redirect messages

Stops the kernel from accepting ICMP redirects, which an attacker can abuse to reroute traffic on a LAN. Setting it to 0 on default covers future interfaces. Many hardening guides also disable secure_redirects and apply the same to IPv6.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.