RFC 2827: Ingress filtering against spoofed source addresses
Summary
In May 2000, Paul Ferguson and Daniel Senie called on all internet providers in RFC 2827 to drop packets with forged source addresses as soon as they enter the network. The trigger was denial-of-service attacks such as SYN floods, whose originators hid behind invented source addresses. The document is known as BCP 38 and is still considered one of the most effective and at the same time least universally implemented recommendations on the internet.
Filter where the truth is known
A provider knows which address ranges its customers use. If a packet arrives from a customer connection with a source address outside these ranges, it can only be forged. RFC 2827 recommends dropping such packets on ingress, as close to the source as possible.
The authors are honest about the reach: the filter does nothing at all against floods from valid addresses. But it prevents attackers within a network from faking other addresses, and it makes attacks traceable to their real source. As evidence, the text cites the CERT advisory on SYN flooding from September 1996 and a Wall Street Journal report on the attack on the New York provider Panix.
Why the problem has remained
Ingress filtering costs the provider effort and mainly benefits others. That is exactly why not all networks implement it even today, and reflection and amplification attacks via DNS, NTP or Memcached live off attackers being able to enter their victim’s address as the source.
In 2004 RFC 3704 added guidance for networks with several upstream connections, where strict checks can drop legitimate traffic. On Linux, reverse path filtering (rp_filter) performs the same task on individual hosts and routers.
Ideas
- Providers know the legitimate source ranges of their customers.
- Packets with foreign source addresses are dropped on ingress.
- Filters close to the source work best.
- Ingress filtering does not help against floods from valid addresses.
- Real source addresses make attacks traceable.
- Multihomed networks need more careful checks.
Insights
- Security on the internet often depends on measures whose benefit goes mainly to others; that slows their adoption.
- Reflection attacks are the bill for incomplete ingress filtering, paid by the victims, not by those who caused it.
Facts
- RFC 2827 appeared in May 2000 and is known as BCP 38.
- It replaces RFC 2267 and was supplemented by RFC 3704 in 2004.
- The text cites a Wall Street Journal report of 12 September 1996 on the attack on Panix.
- CERT advisory CA-96.21 of 24 September 1996 described SYN flooding with forged addresses.
References
- RFC 2827: Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing
- RFC 3704: Ingress Filtering for Multihomed Networks (2004)
Remarks
- RFC 2827 mentions that Bill Cheswick removed a chapter on this type of attack from his book Firewalls and Internet Security, because administrators had no defence at the time.
Recommendations
- Drop outgoing packets with foreign source addresses at your own internet connection.
- Set rp_filter deliberately on Linux: strict for simple connectivity, loose for asymmetric routing.
- Do not run your own services such as DNS resolvers or NTP open to the whole internet, so they cannot serve as amplifiers.
Read the RFC at the RFC Editor
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.