ICMP redirects: why hosts should ignore route hints from the LAN
ICMP redirect messages tell a host to use a different gateway, and a forged one can reroute traffic. How redirects look in a capture, which Linux and Windows settings ignore them, and why routers should not send them on user segments.
Diagram
A forged redirect
Step 1 of 4
Normal
The host sends traffic to its default gateway.
# Normal # The host sends traffic to its default gateway.
The example on the open step is one illustration, or the fix you can paste into an application you own.
What this page is made of
3 pieces. Each one says what fails, who is affected, what you would notice, and what you change.
Accepting redirects
- What fails
- Many systems accept redirects by default.
- Who is affected
- Hosts on shared segments.
- What you would notice
- accept_redirects = 1 on servers.
- What you change
- Disable through configuration management.
Routers sending them
- What fails
- Routers send redirects when a better next hop is on the same segment.
- Who is affected
- Networks where redirects are normal noise.
- What you would notice
- Frequent legitimate redirects masking forged ones.
- What you change
- Fix the routing design and disable redirects on user interfaces.
CIS benchmarks
- What fails
- Benchmarks include these settings.
- Who is affected
- Audited hosts.
- What you would notice
- Benchmark failures for redirect settings.
- What you change
- Apply the benchmark baseline.
Checking a fleet
Read the settings through your configuration tool, or with osquery’s system_controls table across hosts.
osquery> SELECT name, current_value FROM system_controls WHERE name LIKE '%accept_redirects%'; net.ipv4.conf.all.accept_redirects | 0 net.ipv4.conf.eth0.accept_redirects | 1
Check yourself
Recognition and the fix. Nothing here is a procedure.
ip route get shows <redirected> for a destination. What happened?
Sibling techniques
Pages at the same depth, plus a lab and a glossary card for this one.