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.

Lesson 11 of 17 · 9 min read · practice only with authorization

Diagram

A forged redirect

Follow the path. One example at a time.

Step 1 of 4

Normal

The host sends traffic to its default gateway.

Illustration: Normal
# 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.

  1. 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.
  2. 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.
  3. 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.

1 / 3

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.

  1. MapNetwork protocols for defenders: what each layer tells you in a captureEthernet, IP, TCP, UDP, DNS, TLS, and HTTP as they appear in a packet capture: the fields worth reading at each layer, a worked tcpdump trace of one web request, and which protocols leak what.

Practice

  1. LabControl benchA failure is described. Choose the control that changes the outcome.