Skip to content
Skillpedia
Security35k · #5843

implementing-bgp-security-with-rpki

Teaches your AI agent to protect apps against attacks and ship projects and manage infrastructure.

What it does

This feature helps protect your network from attacks that try to steal or misdirect your internet traffic. It does this by verifying that the routing information you announce is legitimate, using a validation system called RPKI.

When to use it

  • ✓When you want to prevent others from hijacking your network's traffic.
  • ✓When you need to ensure your routing information is trustworthy.
  • ✓When configuring network security to meet specific compliance rules.

Example of what to ask your AI

“Set up RPKI security for my network.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-bgp-security-with-rpki/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-bgp-security-with-rpki/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

First, you create authorizations (called ROAs) that state which parts of your network are allowed to announce which IP addresses. Then, you install software that checks these authorizations and configure your routers to only accept traffic with valid authorizations.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-bgp-security-with-rpki

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/implementing-bgp-security-with-rpki/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Implementing BGP Security with RPKI

Overview

Resource Public Key Infrastructure (RPKI) provides cryptographic validation of BGP route origins to prevent route hijacking and accidental route leaks. RPKI enables network operators to create Route Origin Authorizations (ROAs) that declare which Autonomous Systems (ASes) are authorized to originate specific IP prefixes. BGP routers validate received route announcements against RPKI data through Route Origin Validation (ROV), rejecting routes with invalid origins. This skill covers creating ROAs through Regional Internet Registries (RIRs), deploying RPKI validator software, configuring ROV on Cisco IOS-XE and Juniper Junos routers, and implementing BGP filtering policies based on RPKI validation state.

When to Use

  • When deploying or configuring implementing bgp security with rpki capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Prerequisites

  • IP address space allocated from an RIR (ARIN, RIPE, APNIC, AFRINIC, LACNIC)
  • RIR member portal access for ROA creation
  • BGP routers (Cisco IOS-XE 16.x+, Juniper Junos 12.2+, or similar)
  • Linux server for RPKI validator/cache (Routinator, FORT, or OctoRPKI)
  • Understanding of BGP routing and AS path concepts

Core Concepts

RPKI Architecture

┌──────────────────────────────────────────────┐
│           Regional Internet Registries        │
│    (ARIN, RIPE, APNIC, AFRINIC, LACNIC)      │
│                                               │
│  ┌─────────────────────────────────────────┐  │
│  │  Trust Anchor (Root CA Certificate)      │  │
│  │  ├── CA Certificate (ISP/Organization)   │  │
│  │  │   ├── ROA: AS64512 → 198.51.100.0/24 │  │
│  │  │   └── ROA: AS64512 → 2001:db8::/32   │  │
│  │  └── CA Certificate (Another Org)        │  │
│  │      └── ROA: AS64513 → 203.0.113.0/24  │  │
│  └─────────────────────────────────────────┘  │
└──────────────────────────────────────────────┘
                     │ rsync/RRDP
                     ▼
         ┌──────────────────────┐
         │  RPKI Validator/Cache │  (Routinator, FORT, OctoRPKI)
         │  Validates ROAs       │
         │  Serves VRPs to RTR   │
         └──────────────────────┘
                     │ RTR Protocol (TCP 8323)
                     ▼
         ┌──────────────────────┐
         │  BGP Router           │
         │  Performs ROV          │
         │  Applies policy:      │
         │   Valid → Accept      │
         │   Invalid → Reject    │
         │   NotFound → Accept   │
         └──────────────────────┘

RPKI Validation States

State Meaning Recommended Action
Valid ROA exists, origin AS and prefix match Accept route (prefer)
Invalid ROA exists, but origin AS or prefix length mismatch Reject route
NotFound No ROA covers this prefix Accept (but lower preference)

Route Origin Authorization (ROA)

A ROA is a signed object that states:

  • Prefix: The IP address range (e.g., 198.51.100.0/24)
  • Origin AS: The AS authorized to originate this prefix (e.g., AS64512)
  • Max Length: Maximum prefix length that can be announced (e.g., /24)

Workflow

Step 1: Create ROAs at Your RIR

ARIN (North America):

  1. Log into ARIN Online portal
  2. Navigate to Routing Security > Route Origin Authorizations
  3. Create ROA:
    • Prefix: 198.51.100.0/24
    • Origin AS: AS64512
    • Max Length: /24 (set equal to prefix length to prevent sub-prefix hijacking)
  4. Sign and submit

RIPE NCC (Europe):

  1. Log into RIPE NCC LIR Portal
  2. Navigate to Certification (RPKI) > ROAs
  3. Create ROA with prefix, origin AS, and max prefix length

Step 2: Deploy RPKI Validator (Routinator)

# Install Routinator on Ubuntu
sudo apt install -y routinator

# Or install via Cargo (Rust)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install routinator

# Initialize Routinator (accept TALs)
routinator init --accept-arin-rpa

# Start Routinator in RTR server mode
routinator server \
  --rtr 0.0.0.0:8323 \
  --http 0.0.0.0:8080 \
  --refresh 600 \
  --retry 60 \
  --expire 7200

# Run as systemd service
cat > /etc/systemd/system/routinator.service << 'SYSTEMD'
[Unit]
Description=Routinator RPKI Validator
After=network.target

[Service]

…
FAQ

What is RPKI?

RPKI stands for Resource Public Key Infrastructure. It's a system that uses cryptography to ensure network routing information is authentic and hasn't been tampered with.

What is a ROA?

ROA stands for Route Origin Authorization. It's a digitally signed declaration that specifies which Autonomous System (AS) is permitted to announce a given IP address block.

What is ROV?

ROV stands for Route Origin Validation. It's the process where network routers check received route announcements against available ROAs to ensure their validity.

Details

Original description by the author

Implement RPKI-based BGP route origin validation by creating Route Origin Authorizations (ROAs) at RIRs (ARIN, RIPE, APNIC, AFRINIC, LACNIC), deploying validator software (Routinator, FORT, OctoRPKI), and configuring RPKI-to-Router protocol and ROV accept/reject policies on Cisco IOS-XE and Juniper Junos routers. Use when hardening BGP against route hijacking or leaks, or when configuring ROV filt

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#5843
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills