(RTBH) Filtering
(RTBH) Filtering
INFORMATIONAL
Abstract
Copyright Notice
Copyright (c) 2009 IETF Trust and the persons identified as the
document authors. All rights reserved.
Table of Contents
1. Introduction ....................................................2
2. Terminology .....................................................3
3. Destination Address RTBH Filtering ..............................3
3.1. Overview ...................................................3
3.2. Detail .....................................................4
4. Source Address RTBH Filtering ...................................7
4.1. Steps to Deploy RTBH Filtering with uRPF for Source
Filtering ..................................................8
5. Security Considerations .........................................9
6. Acknowledgments .................................................9
7. References ......................................................9
7.1. Normative References .......................................9
7.2. Informative References ....................................10
Appendix A. Cisco Router Configuration Sample .....................11
Appendix B. Juniper Configuration Sample ..........................12
Appendix C. A Brief History of RTBH ...............................14
1. Introduction
One method that the service provider can use to implement this
filtering is to deploy access control lists on the edge of their
network. While this technique provides a large amount of flexibility
in the filtering, it runs into scalability issues, both in terms of
the number of entries in the filter and the packet rate.
Most routers are able to forward traffic at a much higher rate than
they are able to filter, and they are able to hold many more
forwarding table entries and routes than filter entries. RTBH
filtering leverages the forwarding performance of modern routers to
filter more entries and at a higher rate than access control lists
would otherwise allow.
2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119].
3.1. Overview
While this does "complete" the attack in that the target address(es)
are made unreachable, collateral damage is minimized. It may also be
possible to move the host or service on the target IP address(es) to
another address and keep the service up, for example, by updating
associated DNS resource records.
3.2. Detail
192.0.2.1 = Incident #1
192.0.2.2 = Incident #2
192.0.2.3 = Incident #3
192.0.2.4 = Incident #4
192.0.2.5 = Incident #5
Customer #1, who has a DDoS (Distributed DoS) attack can be pointed
to discard route 192.0.2.1. Customer #2 can be pointed to discard
route 192.0.2.2. If capable, the router can then count the drops for
each, providing some level of telemetry on the volume of drops as
well as status of an ongoing attack. A consistent address schema
facilitates operations.
Kumari & McPherson Informational [Page 4]
A BGP policy is configured on all routers that have the discard route
so that routes announced with a chosen community will have their
next-hop set to the discard address. The BGP policy should be made
restrictive so that only BGP routes covering a defined number of
hosts addresses will be accepted. That is, typically, only specific
/32s are necessary. Shorter prefix blocks may also be required or
desirable, for example, if larger numbers of attack targets are
located within a single prefix, or the employment of this mechanism
is to drop traffic bound for specific networks. When filtering based
on shorter prefixes, extreme caution should be used as to avoid
collateral damage to other hosts that reside within those address
blocks. Full implementations will have multiple communities, with
each community used for different parts of a provider's network and
for different security incidents.
There is always a chance that the triggering BGP update could leak
from the network and so egress prefix filters are strongly
recommended. These egress prefix filter details may vary, but
experience has demonstrated that the following works:
- Deny all prefixes longer than the longest prefix that you expect
to announce. For example, if the longest prefix that you expect
to announce is /24, deny all prefixes of length /25 though /32.
If your triggering BGP update is only /32s, then this egress
prefix filter will add a safe measure in case the NO_EXPORT
community does not work.
A common policy for this type of setup would first permit any
longer prefix within an authorized prefix only if the black
hole communities are attached, append NO_EXPORT,
NO_ADVERTISE, or similar communities, and then also accept
from the customer the original aggregate prefix that will be
advertised as standard policy permits.
- Strict mode will cause the router to drop all ingress traffic if
the best path back to the source address of the traffic is not the
interface from which the traffic was received. Asymmetric routing
will cause strict mode uRPF to drop legitimate traffic.
- Loose mode causes the router to check if a route for the source
address of the traffic exists. This may also cause legitimate
traffic to be discarded.
While administrators may choose to drop traffic from any prefix they
wish, it is recommended when employing source-based RTBH filtering
inter-domain that explicit policy be defined that enables peers to
only announce source-based RTBH routes for prefixes that they
originate.
4.1. Steps to Deploy RTBH Filtering with uRPF for Source Filtering
5. Security Considerations
6. Acknowledgments
I would like to thank Joe Abley, Ron Bonica, Rodney Dunn, Alfred
Hoenes, Donald Smith, Joel Jaeggli, and Steve Williams for their
assistance, feedback and not laughing *too* much at the quality of
the initial versions.
The authors would also like to thank Steven L Johnson and Barry
Greene for getting this implemented and Chris Morrow for publicizing
the technique in multiple talks.
7. References
Announcing router:
! The discard route
ip route 192.0.2.1 255.255.255.255 Null0
!
! Matches and empty AS-PATH only.
ip as-path access-list 10 permit ^$
!
! This route-map matches routes with tag 666 and sets the next-hop
! to be the discard route.
route-map remote-trigger-black-hole permit 10
match tag 666
set ip next-hop 192.0.2.1
set local-preference 200
set community no-export
! The community used internally to tag RTBH announcements.
set community 65505:666
set origin igp
!
route-map remote-trigger-black-hole permit 20
!
router bgp 65505
no synchronization
bgp log-neighbor-changes
redistribute static route-map remote-trigger-black-hole
no auto-summary
!
! An example IP that we are applying RTBH filtering to.
! All traffic destined to 10.0.0.1 will now be dropped!
ip route 10.0.0.1 255.255.255.255 null0 tag 666
!
Filtering router:
!
! The discard route
ip route 192.0.2.1 255.255.255.255 Null0
!
! Matches and empty AS-PATH only.
ip as-path access-list 10 permit ^$
!
route-map black-hole-filter permit 10
match ip address prefix-list only-host-routes
match as-path 10
Announcing router:
routing-options {
static {
/* EXAMPLE ATTACK SOURCE */
route 10.11.12.66/32 {
next-hop 192.0.2.1;
resolve;
tag 666;
}
/* EXAMPLE ATTACK DESTINATION */
route 10.128.0.2/32 {
next-hop 192.0.2.1;
resolve;
tag 666;
}
}
autonomous-system 100;
}
protocols {
bgp {
group ibgp {
type internal;
export rtbh;
neighbor 172.16.0.2;
}
}
}
policy-options {
policy-statement rtbh {
term black-hole-filter {
from {
tag 666;
route-filter 0.0.0.0/0 prefix-length-range /32-/32;
}
then {
local-preference 200;
origin igp;
community set black-hole;
community add no-export;
next-hop 192.0.2.1;
accept;
}
}
}
community black-hole members 100:666;
community no-export members no-export;
}
Filtering router:
policy-statement black-hole-filter {
from {
protocol bgp;
as-path LocalOnly;
community black-hole;
route-filter 0.0.0.0/0 prefix-length-range /32-/32;
}
then {
community set no-export;
next-hop 192.0.2.1;
}
}
community black-hole members 100:666;
community no-export members no-export;
routing-options {
forwarding-table {
unicast-reverse-path feasible-paths;
}
static {
route 192.0.2.1/32 discard;
}
}
interfaces {
xe-1/0/0 {
vlan-tagging;
mtu 9192;
unit 201 {
vlan-id 201;
family inet {
rpf-check;
address 10.11.12.1/24;
}
}
}
}
Unicast RPF Loose Check (uRPF Loose Check) was created by Neil Jarvis
and Barry Greene to be used with destination-based RTBH as a rapid
reaction tool to DDoS attacks. The requirements for this rapid
reaction tool was based on post mortem conversation after the
February 2000 attacks on several big content hosting companies. The
summary of the requirement became the "Exodus Requirement" which
stated:
To clarify and restate, uRPF loose check was created as one part of a
rapid reaction tool to DDoS attacks that "drop packets based on
source IP address that can be pushed out to over 60 routers with in
60 seconds, be longer than a thousand lines, be modified on the fly,
and work in all your platforms filtering at line rate". The
secondary benefits of using uRPF Loose Check for other functions is a
secondary benefit -- not the primary goal for its creation.
To facilitate the adoption to the industry, uRPF Loose Check was not
patented. It was publicly published and disclosed in "Unicast
Reverse PathForwarding (uRPF) Enhancements for the ISP-ISP Edge"
[Greene2001].
Authors' Addresses
Warren Kumari
Google
1600 Amphitheatre Parkway
Mountain View, CA 94043
EMail: [email protected]
Danny McPherson
Arbor Networks, Inc.
EMail: [email protected]
Kumari & McPherson Informational [Page 15]