1
Securing BGP: Operational Strategies and
Best Practices for Network Defenders
2
2
• Network engineer and enthusiast for a long time
• Working as a Trainer/Analyst @ APNIC
• Have an exposer with multi-vendor multi-platform different technologies
• A security minded person
• Would love to contribute to the community
zobair.khan@apnic.net
$ whois MD ZOBAIR KHAN
3
3
BGP – Border Gateway Protocol
• Routing protocol for different network connection
• Path vector protocol
• Runs on TCP 179
• Lots of policy implement scope
• Majorly used for Internet Networks
• AS Number is a must
• e-BGP & i-BGP
4
4
BGP – A TCP Protocol
https://www.geeksforgeeks.org/what-is-transmission-control-protocol-tcp/
https://medium.com/@R00tendo/tcp-connection-hijacking-deep-dive-9bbe03fce9a9
5
5
BGP Vulnerabilities
TCP SYN Floods
Man-in-the-Middle Attacks
TCP Sequence Number Prediction
TCP Session Hijacking
TCP Connection Teardown Attacks
TCP ACK Storms
Route Hijacking
Route Leaks
BGP Session Hijacking
BGP Session Reset Attacks
BGP Attribute Manipulation
Resource Exhaustion Attacks
6
6
TCP SYN Flood
https://www.cloudflare.com/img/learning/ddos/syn-flood-ddos-attack/syn-flood-attack-ddos-attack-diagram-2.png
7
7
MiTM
https://www.apriorit.com/wp-content/uploads/2021/04/scheme-of-an-mitm-attack.jpg
8
8
TCP Sequence Number Prediction
https://www.kareemccie.com/2018/01/what-is-tcp-session-hijacking.html
9
9
TCP Session Hijack
https://www.kareemccie.com/2018/01/what-is-tcp-session-hijacking.html
10
10
TCP Connection Tear Down
https://www.google.com/url?sa=i&url=https%3A%2F%2Flearningnetwork.cisco.com%2Fs%2Fquestion%2F0D53i00000KswSeCAJ%2Ftcp-connection-termination-is-the-diagram-
correct&psig=AOvVaw31fN48L66D8FzJ1JBapdFr&ust=1716015638995000&source=images&cd=vfe&opi=89978449&ved=0CBQQjhxqGAoTCKChy8aOlIYDFQAAAAAdAAAAABD
qBA
11
11
TCP ACK Storms
https://kb.mazebolt.com/knowledgebase/ack-flood/
12
Route Hijacking
13
13
Route Leaks
14
14
BGP Session Reset
https://slideplayer.com/slide/9598472/
15
15
BGP Session Hijacking
https://slideplayer.com/slide/9598472/
16
16
BGP Attribute Manipulation
https://www.kwtrain.com/blog/bgp-pt2
17
17
Resource Exhaustion
https://www.cloudflare.com/learning/ddos/syn-flood-ddos-attack/
18
18
BGP Security Measures
19
19
RPKI – Resource Public Keying
Infrastructure
ROAs
ROAs
VALIDATOR SOFTWARE
Verification
Validated
Cache
RPKI-RTR
ROUTERS
RIR REPOSITORIES
• Create ROA for owned resources for RPKI
• Implementing Validator relying software
for ROV
• RIR Repositories send ROA information to
Validator software
• Software builds a validated cache and
feed it to router infrastructure over RTR
session
• Routers enforces policies based on
Validated Cache
20
20
IRR Database
21
21
Filtering – BCP 194 – RFC 7454
Discard Special Case, Bogons, Prefixes
Longer than /24(v4) & /48(v6), Own
Prefixes, LAN Prefixes, Default Routes
Special-Purpose Prefixes
Unallocated Prefixes
Prefixes That Are Too Specific
Filtering Prefixes Belonging to the Local AS and Downstreams
IXP LAN Prefixes
The Default Route
Filters with Internet Peers
Filters with Customers
Filters with Upstream Providers
Inbound Filtering
Outbound Filtering
22
22
Tools for Filtering
https://github.com/snar/bgpq3
IRRPT
BGPQ4
23
23
RTBH
https://www.cisco.com/c/dam/en_us/about/security/i
ntelligence/blackhole.pdf
24
24
URPF
https://www.cisco.com/c/dam/en_us/about/security/i
ntelligence/blackhole.pdf
25
25
GTSM
• Prevent 3rd party attack on eBGP peers. Works best with MD5 Authentication. Must be configured on both peers.
• (neighbor <ipv4-ptp> ttl-security hops 1)
https://www.researchgate.net/figure/The-Generalized-TTL-
Security-Mechanism-GTSM-in-operation-Routers-set-the-TTL-
on-a_fig4_228910855
26
26
MD5 Authentication
• Must be configured on both peers with same password. (neighbor <ipv4-ptp> password CISCO)
https://costiser.ro/uploads/tcp-options-
calculating-bgp-md5-digest.png
27
27
Community Scrubbing
Ingress BGP peering policy
applied to transit/public/private
and downstream peers should
remove all inbound communities
with SP’s number in the high-
order bits, except for the ones
used for signaling (e.g. setting
BGP Local Preference)
https://bgphelp.com/2017/02/02/bgp-best-practices-or-dissecting-rfc-7454/
28
28
Bogon Filter
https://www.team-cymru.com/bogon-networks
https://rickfreyconsulting.com/mikrotik-router-bgp-peering-with-team-cymru-for-bogons/
29
29
Prefix Limit
• neighbor <x.x.x.x> maximum-prefix <max> [restart N] [<threshold>] [warning-only]
https://flylib.com/books/en/4.208.1.66/1/
30
30
AS Path Length
https://aboutnetworks.net/bgp-load-sharing/
• router bgp X0
• bgp maxas-limit 5
31
31
Customer Route Preference
https://networklessons.com/bgp/bgp-attributes-and-
path-selection
32
32
Transit AS Filter
33
33
Removing Private AS
https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=k
A10g000000ClInCAK
• neighbor <ipv4-ptp> remove-private-as
34
34
BGP Admin Distance
BGP Admin Distance Higher than IGP &
making external, internal, local same
distance bgp 200 200 200
https://study-ccna.com/floating-static-route/
35
35
MANRS Actions
36
36
MANRS Observatory
https://observatory.manrs.org/#/overview
37
37
BGP Security Measures
– ROA & RPKI
• Trust Anchor, Validator Software like Routinator 3000/Fort/OctoRPKI/RPKI-Client, RTR Session, Drop Invalids
– Due Diligence Checking with IRR
• Whois query, radb, IRR of RIRs – (whois –h whois.apnic.net –i or AS10075 | grep route:)
– Filtering (Prefix & AS)
• Discard Special Case, Bogons, Prefixes Longer than /24(v4) & /48(v6), Own Prefixes, LAN Prefixes, Default Routes
– Using Tools for Filter Generation (bgpq3, rtconfig etc.)
• bgpq3 -4 –l NAME AS10075
– RTBH
• Black holing unwanted traffic to null
– URPF
• Difficult for multihoming networks. Can be used in feasible mode
– GTSM
• Prevent 3rd party attack on eBGP peers. Works best with MD5 Authentication. Must be configured on both peers.
• (neighbor <ipv4-ptp> ttl-security hops 1)
– MD5 Authentication
• Must be configured on both peers with same password. (neighbor <ipv4-ptp> password CISCO)
– Community Scrubbing
• AS should scrub communities used internally but forward foreign communities.
38
38
BGP Security Measures
– Bogon Filtering
• Private and reserved addresses defined by RFC 1918, RFC 5735, and RFC 6598 and unallocated number resources to RIR by the Internet
Assigned Numbers Authority. Bogon Route Server Project by Team Cymru is a very helpful way to handle bogons.
– Prefix Limit
• neighbor <x.x.x.x> maximum-prefix <max> [restart N] [<threshold>] [warning-only]
– AS Path Length Limit
• router bgp X0
• bgp maxas-limit 5
– Customer Route Preference
• Setting high local preference on receiving customer routes
– Transit AS Filter
• Carefully making filters on upstream peers so that prefix leaking doesn’t happen.
– Removing Private ASN
• neighbor <ipv4-ptp> remove-private-as
– BGP Admin Distance Higher than IGP & making external, internal, local same
• distance bgp 200 200 200
– MANRS Actions
• Filtering, Global Validation, Co-ordination, Anti-Spoofing
39
39
References
RFC-7454 (BGP Operations and Security)
RFC-2827 (Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing)
https://bgp4all.com/pfs/_media/conferences/lknog5-bgp-bcp.pdf
https://nsrc.org/activities/agendas/en/riso-5-days/networking/routing-security/en/labs/securing-bgp.html
https://wq.apnic.net/static/search.html
https://github.com/team-cymru/network-security-templates/tree/master/Secure-Router-Templates
https://www.ietf.org/archive/id/draft-gill-btsh-01.txt
https://datatracker.ietf.org/doc/html/draft-murphy-bgp-vuln-02#section-2
https://www.manrs.org
40
40
https://conference.apnic.net/58
APNIC 58 – Save the Date
41
41
Acknowledgement
• This material is developed from different R&D, RFCs & APNIC Workshop Slides
& Slides developed by APNIC, NSRC, MANRS, Dr. Philip Smith & Barry Greene.
• This material is open & free to use as long as it is acknowledged and the
notice remains in place
• This material is designed considering that the audience will be predominantly
technical people
42
42
Questions !!!

More Related Content

PDF
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
PDF
BGP Best Practices, presented by Imtiaz Sajid
PDF
BGP Security Best Practices that Matter, presented at PHNOG 2025
PPT
PDF
PDF
bgp features presentation routing protocle
PPT
bgp1 cryptogrphy and network security.ppt
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
BGP Best Practices, presented by Imtiaz Sajid
BGP Security Best Practices that Matter, presented at PHNOG 2025
bgp features presentation routing protocle
bgp1 cryptogrphy and network security.ppt

Similar to Border Gateway Protocol (BGP) Security, LKNOG 8 (20)

PDF
Protecting Your Internet Route Integrity
PPTX
RFC 7454 (1)BUEWGFWEFWEFWWWWWWWFGWGF.pptx
PDF
Redes Avanzado Sdwan proyecto autoestudio
PPTX
15 coms 525 tcpip - border gateway protocols
PPTX
ENCOR_Chapter_11 - ‌BGP implementation.pptx
PDF
Bgp tutorial for ISP
PDF
Computer network (14)
PDF
ION Bangladesh - Secure BGP and Operational Report of Bangladesh
PPTX
Border Gateway Protocol (BGP)
PDF
PLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PDF
ION Belfast - Securing BGP - David Freedman
PPTX
RFC 7454 Best Practicesfuhhfhwfihwihfihwirhfhwirfwrhfwr .pptx
PDF
Securing Routing Protocol BGP
PDF
SANOG23-BGP-Techniques.pdf
PDF
Apnic_bgp_training_cisco_ciscosaicoc.pdf
PPT
Bgp For Presentation
PPTX
PPT
PDF
Secure BGP and Operational Report of Bangladesh
DOC
Study Notes BGP Exam
Protecting Your Internet Route Integrity
RFC 7454 (1)BUEWGFWEFWEFWWWWWWWFGWGF.pptx
Redes Avanzado Sdwan proyecto autoestudio
15 coms 525 tcpip - border gateway protocols
ENCOR_Chapter_11 - ‌BGP implementation.pptx
Bgp tutorial for ISP
Computer network (14)
ION Bangladesh - Secure BGP and Operational Report of Bangladesh
Border Gateway Protocol (BGP)
PLNOG15: BGP New Advanced Features - Piotr Wojciechowski
ION Belfast - Securing BGP - David Freedman
RFC 7454 Best Practicesfuhhfhwfihwihfihwirhfhwirfwrhfwr .pptx
Securing Routing Protocol BGP
SANOG23-BGP-Techniques.pdf
Apnic_bgp_training_cisco_ciscosaicoc.pdf
Bgp For Presentation
Secure BGP and Operational Report of Bangladesh
Study Notes BGP Exam
Ad

More from APNIC (20)

PPTX
APNIC Report, presented at APAN 60 by Thy Boskovic
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PDF
The Internet -By the Numbers, Sri Lanka Edition
PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
PDF
DNSSEC Made Easy, presented at PHNOG 2025
PDF
APNIC's Role in the Pacific Islands, presented at Pacific IGF 2205
PDF
IPv6 Deployment and Best Practices, presented by Makito Lay
PDF
Cleaning up your RPKI invalids, presented at PacNOG 35
PDF
The Internet - By the numbers, presented at npNOG 11
PDF
Transmission Control Protocol (TCP) and Starlink
PDF
DDoS in India, presented at INNOG 8 by Dave Phelan
PDF
Global Networking Trends, presented at the India ISP Conclave 2025
PDF
Make DDoS expensive for the threat actors
PDF
Fast Reroute in SR-MPLS, presented at bdNOG 19
PDF
DDos Mitigation Strategie, presented at bdNOG 19
PDF
ICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
PDF
APNIC Update - Global Synergy among the RIRs: Connecting the Regions
PDF
Measuring Starlink Protocol Performance, presented at LACNIC 43
PDF
Prop-154: Resizing of IPv4 assignments for IXPs
APNIC Report, presented at APAN 60 by Thy Boskovic
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
RPKI Status Update, presented by Makito Lay at IDNOG 10
The Internet -By the Numbers, Sri Lanka Edition
Triggering QUIC, presented by Geoff Huston at IETF 123
DNSSEC Made Easy, presented at PHNOG 2025
APNIC's Role in the Pacific Islands, presented at Pacific IGF 2205
IPv6 Deployment and Best Practices, presented by Makito Lay
Cleaning up your RPKI invalids, presented at PacNOG 35
The Internet - By the numbers, presented at npNOG 11
Transmission Control Protocol (TCP) and Starlink
DDoS in India, presented at INNOG 8 by Dave Phelan
Global Networking Trends, presented at the India ISP Conclave 2025
Make DDoS expensive for the threat actors
Fast Reroute in SR-MPLS, presented at bdNOG 19
DDos Mitigation Strategie, presented at bdNOG 19
ICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
APNIC Update - Global Synergy among the RIRs: Connecting the Regions
Measuring Starlink Protocol Performance, presented at LACNIC 43
Prop-154: Resizing of IPv4 assignments for IXPs
Ad

Recently uploaded (20)

PDF
Containerization lab dddddddddddddddmanual.pdf
PDF
Course Overview and Agenda cloud security
PPTX
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
DOCX
Powerful Ways AIRCONNECT INFOSYSTEMS Pvt Ltd Enhances IT Infrastructure in In...
PDF
Exploring The Internet Of Things(IOT).ppt
PPTX
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
PPTX
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
PDF
BIOCHEM CH2 OVERVIEW OF MICROBIOLOGY.pdf
PPTX
MY PRESENTATION66666666666666666666.pptx
PPTX
Viva Digitally Software-Defined Wide Area Network.pptx
PPTX
Artificial_Intelligence_Basics use in our daily life
PDF
Alethe Consulting Corporate Profile and Solution Aproach
PPTX
Top Website Bugs That Hurt User Experience – And How Expert Web Design Fixes
PDF
simpleintnettestmetiaerl for the simple testint
PPT
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
PDF
Understand the Gitlab_presentation_task.pdf
PPTX
The-Importance-of-School-Sanitation.pptx
PPTX
Reading as a good Form of Recreation
PDF
Computer Networking, Internet, Casting in Network
PDF
Buy Cash App Verified Accounts Instantly – Secure Crypto Deal.pdf
Containerization lab dddddddddddddddmanual.pdf
Course Overview and Agenda cloud security
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
Powerful Ways AIRCONNECT INFOSYSTEMS Pvt Ltd Enhances IT Infrastructure in In...
Exploring The Internet Of Things(IOT).ppt
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
BIOCHEM CH2 OVERVIEW OF MICROBIOLOGY.pdf
MY PRESENTATION66666666666666666666.pptx
Viva Digitally Software-Defined Wide Area Network.pptx
Artificial_Intelligence_Basics use in our daily life
Alethe Consulting Corporate Profile and Solution Aproach
Top Website Bugs That Hurt User Experience – And How Expert Web Design Fixes
simpleintnettestmetiaerl for the simple testint
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
Understand the Gitlab_presentation_task.pdf
The-Importance-of-School-Sanitation.pptx
Reading as a good Form of Recreation
Computer Networking, Internet, Casting in Network
Buy Cash App Verified Accounts Instantly – Secure Crypto Deal.pdf

Border Gateway Protocol (BGP) Security, LKNOG 8