DDoS Damage Control Cheap & effec3ve



Similar documents
APNIC elearning: BGP Basics. Contact: erou03_v1.0

Module 12 Multihoming to the Same ISP

Understanding MPLS Hashing

Transitioning to BGP. ISP Workshops. Last updated 24 April 2013

Bell Aliant. Business Internet Border Gateway Protocol Policy and Features Guidelines

DESTINATION BASED RTBH FILTERING AT ATTACK ORIGINATING INTERNET SERVICE PROVIDER

Scalable DDoS mitigation using BGP Flowspec

Tutorial: Options for Blackhole and Discard Routing. Joseph M. Soricelli Wayne Gustavus NANOG 32, Reston, Virginia

Advanced BGP Policy. Advanced Topics

BGP Attributes and Path Selection

BGP DDoS Mitigation. Gunter Van de Velde. Sr Technical Leader NOSTG, Cisco Systems. May Cisco and/or its affiliates. All rights reserved.

Administra0via. STP lab due Wednesday (in BE 301a!), 5/15 BGP quiz Thursday (remember required reading), 5/16

- Route Filtering and Route-Maps -

How To Set Up Bgg On A Network With A Network On A Pb Or Pb On A Pc Or Ipa On A Bg On Pc Or Pv On A Ipa (Netb) On A Router On A 2

BGP Multihoming. Why Multihome? Why Multihome? Why Multihome? Why Multihome? Why Multihome? Redundancy. Reliability

Using the Border Gateway Protocol for Interdomain Routing

ISP Case Study. UUNET UK (1997) ISP/IXP Workshops. ISP/IXP Workshops. 1999, Cisco Systems, Inc.

Multihomed BGP Configurations

BGP1 Multihoming and Traffic Engineering

Simple Multihoming. ISP/IXP Workshops

Methods of interconnecting MPLS Networks

MPLS VPN Route Target Rewrite

Community tools to fight against DDoS

netkit lab bgp: prefix-filtering Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group

DDOS Mi'ga'on in RedIRIS. SIG- ISM. Vienna

Fireware How To Dynamic Routing

BGP Multihoming Techniques

APNIC elearning: BGP Attributes

Traffic Diversion Techniques for DDoS Mitigation using BGP Flowspec. Leonardo Serodio May 2013

BGP4 Case Studies/Tutorial

Simple Multihoming. ISP Workshops. Last updated 30 th March 2015

Module 7. Routing and Congestion Control. Version 2 CSE IIT, Kharagpur

DDoS attacks in CESNET2

Building a small Data Centre

BGP Multihoming Techniques

The Naughty port Project

HP Networking BGP and MPLS technology training

DEFENSE NETWORK FAQS DATA SHEET

Anycast Rou,ng: Local Delivery. Tom Daly, CTO h<p://dyn.com Up,me is the Bo<om Line

BGP Communities: A Guide for Service Provider Networks. Tom Scholl <tscholl@att.com>

BGP Multihoming Techniques

Cisco Configuring Basic MPLS Using OSPF

BGP Best Practices for ISPs Prefix List, AS PATH filters, Bogon Filters, Anycast, Mailing Lists, INOC DBA

Outline. EE 122: Interdomain Routing Protocol (BGP) BGP Routing. Internet is more complicated... Ion Stoica TAs: Junda Liu, DK Moon, David Zats

BGP Multihoming Techniques. Philip Smith APRICOT 2013 Singapore 19 th February 1 st March 2013

Internetworking II: MPLS, Security, and Traffic Engineering

IPv6 and 4-byte ASN Update

How To Import Ipv4 From Global To Global On Cisco Vrf.Net (Vf) On A Vf-Net (Virtual Private Network) On Ipv2 (Vfs) On An Ipv3 (Vv

Approaches for DDoS an ISP Perspective.

Border Gateway Protocol Best Practices

How To Understand Bg

BGP Multihoming Techniques

Multihoming and Multi-path Routing. CS 7260 Nick Feamster January

Visualizing Traffic on Network Topology

netkit lab bgp: multi-homed Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group

BGP-4 Case Studies. Nenad Krajnovic.

BGP Support for Next-Hop Address Tracking

BGP Multihoming Techniques

Internet inter-as routing: BGP

Firewall-on-Demand. GRNET s approach to advanced network security services management via bgp flow-spec and NETCONF. Leonidas Poulopoulos

MPLS VPN over mgre. Finding Feature Information. Prerequisites for MPLS VPN over mgre

Exterior Gateway Protocols (BGP)

The benefits of BGP for every service provider

Chapter 49 Border Gateway Protocol version 4 (BGP-4)

MPLS for ISPs PPPoE over VPLS. MPLS, VPLS, PPPoE

Building A Cheaper Peering Router. (Actually it s more about buying a cheaper router and applying some routing tricks)

How More Specifics increase your transit bill (and ways to avoid it)

Effective BGP Load Balancing Using "The Metric System" A real-world guide to BGP traffic engineering

IPv6 over IPv4/MPLS Networks: The 6PE approach

Hunting down a DDOS attack

The Case for Source Address Routing in Multihoming Sites

BGP Multihoming Techniques

pmacct: introducing BGP na2vely into a NetFlow/sFlow collector

Measuring IP Network Routing Convergence. A new approach to the problem

WHITEPAPER. Bringing MPLS to Data Center Fabrics with Labeled BGP

Border Gateway Protocol BGP4 (2)

How To Stop A Malicious Dns Attack On A Domain Name Server (Dns) From Being Spoofed (Dnt) On A Network (Networking) On An Ip Address (Ip Address) On Your Ip Address On A Pc Or Ip Address

Effective BGP Load Balancing Using "The Metric System" A real-world guide to BGP traffic engineering

SEC , Cisco Systems, Inc. All rights reserved.

Exam Name: BGP + MPLS Exam Exam Type Cisco Case Studies: 3 Exam Code: Total Questions: 401

BGP Operations and Security. Training Course

IPv6 Addressing. ISP Training Workshops

BGP Advanced Routing in SonicOS

Configuring and Testing Border Gateway Protocol (BGP) on Basis of Cisco Hardware and Linux Gentoo with Quagga Package (Zebra)

BGP and Traffic Engineering with Akamai. Christian Kaufmann Akamai Technologies MENOG 14

BGP Multihoming: An Enterprise View BRKRST , Cisco Systems, Inc. All rights reserved. Presentation_ID.scr

Layer 2 Networking. Overview. VLANs. Tech Note

Analyzing Capabilities of Commercial and Open-Source Routers to Implement Atomic BGP

basic BGP in Huawei CLI

JUNOS Secure BGP Template

State of Texas. TEX-AN Next Generation. NNI Plan

MPLS VPN - Route Target Rewrite

Supporting Document PPP

Table of Contents. Cisco How Does Load Balancing Work?

Active measurements: networks. Prof. Anja Feldmann, Ph.D. Dr. Nikolaos Chatzis Georgios Smaragdakis, Ph.D.

Transcription:

DDoS Damage Control Cheap & effec3ve Job Snijders job@ins3tuut.net RIPE68

Who am I? Job Snijders Independent Network Architect Founder of NLNOG RING TwiPer: @JobSnijders Email: job@ins3tuut.net Hobbies: IP Rou3ng, LISP, MPLS, IPv6, RPSL Shoe size: 45/EU 2

Agenda What is selec&ve blackholing? Defini3on Examples based on RIPE ATLAS How to set up selec3ve blackholing as a carrier Defining scopes Route- maps Some python 3

What is selec3ve blackholing? Selec%ve blackholing ~ selec%ve discarding 1. Use BGP communi3es to instruct your Service Provider to discard packets when certain condi0ons are met. 2. A region of space- 3me from which gravity prevents anything, including light, from escaping, except the colour purple. 4

What does it maper? Content is most ocen the vic3m (webshop, gameserver, webserver) Most prefixes/content have a geographical significance which decreases as distance between the sender and receiver increases. (theorem stems from sflow data gathered at global ISP). In other words: Chances are a Polish web- shop owner cares most about Polish eyeballs. 5

What s wrong with normal blackholing? Classic blackholing is an all or nothing proposi0on: you throw away all revenue generated by the vic3m IP address, in order to avoid conges3ng your upstream links. 6

Scope is relevant 7

Damage control is not mi3ga3on Selec3ve blackholing should be considered as yet another tool in the toolbox when under duress. Asser3on #1: it is be6er to remain par&ally reachable than not reachable at all during a DDoS a6ack Asser3on #2: I can take a percentage of the DDoS traffic, but not all 8

Effects: Discard outside 1000 KM radius Customer connects in Amsterdam, Netherlands White dot means traffic cannot reach des3na3on Colored dot implies reachability 9

Effects: Discard outside this country White dot means traffic cannot reach des3na3on Color dot implies reachability, Customer connected in Amsterdam, NL 10

discard outside NL is perfect reachability inside NL White dot means traffic cannot reach des3na3on Color dot implies reachability 11

Part 2: How to set this up as carrier Focus on four features: Scope Outside This country Outside This con3nent Outside 1000 KM radius Outside 2500 KM radius End- user BGP community 15562:664 15562:660 15562:663 15562:662 This means where the customer interconnec3on is located Distance is from Edge router to Edge router in the SP s network as the crow flies (not actual op3cal fiber path length). Can only be guaranteed for own backbone 12

Assign your routers some integers name Con0nent id ISO31661 City ID La0tude, Longitude tky.jp 3 392 46 35.65671, 139.80342 sjo.us 1 840 29 37.44569,- 122.16111 dal.us 1 840 33 32.80096, - 96.81962 nyc.us 1 840 26 40.71780, - 74.00885 lon.uk 2 276 23 51.51173, - 0.00197 ams.nl 2 528 20 52.35600, 4.95068 sto.se 2 752 22 59.36264, 17.95560 13

Router specific configura3on IOS ish nyc.us: ip community-list THIS:METRO seq 5 permit 65123:10026 ip community-list THIS:COUNTRY seq 5 permit 65123:840 ip community-list THIS:CONTINENT seq 5 permit 65123:1000 lon.uk: ip community-list THIS:METRO seq 5 permit 65123:20023 ip community-list THIS:COUNTRY seq 5 permit 65123:276 ip community-list THIS:CONTINENT seq 5 permit 65123:2000 ams.nl: ip community-list THIS:METRO seq 5 permit 65123:20020 ip community-list THIS:COUNTRY seq 5 permit 65123:528 ip community-list THIS:CONTINENT seq 5 permit 65123:2000 etc 14

What happens where? 15

ibgp inbound route- map ip route 10.0.0.1 255.255.255.255 null0 route-map INBOUND-IBGP permit 100 match community 15562:666 classic blackhole community set ip next-hop 10.0.0.1 discard route-map INBOUND-IBGP permit 200 match community 15562:660 15562:662 15562:663 15562:664 continue 1100 Jump over regular accept @ 1000 towards scope checking route-map INBOUND-IBGP permit 1000 No match statement == accept anything route-map INBOUND-IBGP permit 1100 match community THIS:METRO THIS:COUNTRY THIS:CONTINENT If match is found, accept prefix and stop evaluating the route-map route-map INBOUND-IBGP permit 1101 Anything that arrives here: discard set ip next-hop 10.0.0.1 16

Customer facing route- map 01. route-map IMPORT:FROM:CUSTOMER-A permit 200 02. match ip address prefix-list CUSTOMER-A-PREFIXES 03. match community 15562:666 04. set community no-export additive 05. set ip next-hop 10.0.0.1 06. route-map IMPORT:FROM:CUSTOMER-A permit 300 07. match ip address prefix-list CUSTOMER-A-PREFIXES 08. match community SCOPED:ACTION 09. continue 600 Remember this jump 10. route-map IMPORT:FROM:CUSTOMER-A permit 400 11. match ip address prefix-list CUSTOMER-A-PREFIXES 12. set local-preference 650 13. route-map IMPORT:FROM:CUSTOMER-A deny 500 17

Customer facing (cont.) Add/Rewrite scoping informa3on when a scoped ac3on is used 14. route-map IMPORT:FROM:CUSTOMER-A permit 600 Here is 600 again 15. match community OUTSIDE:1000KM:RADIUS:DISCARD 15562:663 16. set community 65123:10029 additive 17. route-map IMPORT:FROM:CUSTOMER-A permit 700 18. match community OUTSIDE:2500KM:RADIUS:DISCARD 15562:662 19. set community 65123:10033 65123:10029 additive 20. route-map IMPORT:FROM:CUSTOMER-A permit 900 21. match community OUTSIDE:THIS:COUNTRY:DISCARD 15562:664 22. set community 65123:840 additive 23. route-map IMPORT:FROM:CUSTOMER-A permit 1100 24. match community OUTSIDE:THIS:CONTINENT:DISCARD 15562:660 25. set community 65123:1000 additive 18

What happens where? 19

But wait a second how do you figure out what needs to be rewripen to what? Gratis download http://instituut.net/~job/example_community_calculator.py 20

Proof: Socware is cool SDN finally arrived derp:~ job$ wget -q http://instituut.net/~job/example_community_calculator.py derp:~ job$ python example_community_calculator.py r1.lon.uk - rewrite targets: 1000 km: 65123:20020 65123:276 2500 km: 65123:2000 r1.dal.us - rewrite targets: 1000 km: 65123:10033 2500 km: 65123:840 r1.sjo.us - rewrite targets: 1000 km: 65123:10029 2500 km: 65123:10033 65123:10029 r1.nyc.us - rewrite targets: 1000 km: 65123:10026 2500 km: 65123:10026 65123:10033 <snip> 21

COMM /RTR The integers in essence provide groupings of routers, which the socware/route- maps use :276 :2000 :10033 :840 :10029 :10026 :30046 :20022 :20020 ams.nl X X lon.uk X X sto.se X X nyc.us X X dal.us X X sjo.us X X tky.jp X (incomplete table, but you get the gist ) 22

Process flow diagram Calculate all route- maps (offline) Deploy to routers (expect/netconf) Customer sa3sfac3on (awesome) 23

Considera3ons Automate all route- map deployments (actually, automate everything) Use or make a CMDB where you store integers Selec3ve Blackholing is a prepy advanced feature.. with very liple router specific configura3on J Can be deployed on any vendor. Crappy vendors are not an excuse. This requires no extra CAPEX Customers don t ask for this feature because they don t know it exists (yet) Saves both the service provider and customer money: win/win 24

Ques3ons? 25

Resources & Credits Technical narra3ve in text form: hpp://mailman.nanog.org/pipermail/nanog/2014- February/064381.html I want to thank Saku Yx, Torsten Blum and Peter van Dijk for contribu3ng to this methodology. 26