Skip to content

Mini-guide: detecting your own route leaks before anyone else

Networking by PetraSuper 23 replies 1.1K views
#1

He, I write malý guide from morning when I catch own leak in 90 second

No, you need only three free thing:
- bgp.tools for quick prefix check
- route-views or looking glass from OVHcloud
- malý script what curl both and diff

On server I run bird with full table. Into config I have upstream from Contabo and Vultr. No, I set local-pref wrong on one session, 90 second later bgp.tools show my /48 coming from wrong path. Hej, I catch before any mail from peering partner.

No, key is check yourself before someone else do. I run script every 15 minute from cron. No fancy, just curl and grep.

You have similar setup? What tool you use for catch own mistake?

boot anything, anywhere, anytime
#2

Fun little project — I run similar on my NAT VPS from RackNerd, just a bash loop with bgpq4 and some looking glasses

#!/bin/bash
ASN="64496"
PREFIX="2001:db8::/32"
for lg in "OVHcloud" "Vultr" "Hetzner"; do
  curl -s "https://${lg}.example/lg?cmd=show+route+${PREFIX}"
done | grep -v "${ASN}:$" && echo "LEAK DETECTED"

It actually works, caught my typo last month

works on my bench ¯\_(ツ)_/¯
12 #3

But how much RAM for full table on that NAT VPS? My edge box has 256GB, 2x EPYC, takes 12GB just for bird. Humblebrag but seriously, how are you running this on 1GB budget boxes

#4

Hej, full table on NAT VPS is crazy. I have real server in Bratislava, not VPS. Bird with full table need real RAM. But for only own prefix check you dont need full table, just looking glass from outside. My script is only curl https://bgp.tools, no bird on small box.

boot anything, anywhere, anytime
#5

Ah that makes way more sense. I was picturing bird on a 512MB NAT box and questioning my life choices. I use a dedicated edge router so full table is non-negotiable, but for prefix monitoring yeah external LG is the way.

#6

I run similar check with bgp.tools API but also pipe through my own looking glass on Hetzner Helsinki. Two eyes better than one. Finland cold, server happy, electricity cheap.

#7

Same here, dual check. I actually caught OVHcloud LG giving stale data once, route-views saved me from false panic. Always have two sources.

works on my bench ¯\_(ツ)_/¯
#8

What about RIPE RIS? Free, huge coverage, API exists. I use it for historical checks when someone mails me "your prefix looked weird Tuesday".

6 #9

RIPE RIS is good but delay is bigger. For 90 second catch you need something faster. Bgp.tools update quick, route-views also. RIS is for later analysis, not for wake up at 3am.

boot anything, anywhere, anytime
#10

From Berlin: I do not trust single US-based tool for my prefix. I run check against DE-CIX looking glass plus Hetzner Nuremberg. Data stays in EU, my paranoia stays healthy.

Neuland. Aber schnell.

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft