Resource Public Key Infrastructure (RPKI)’s Route Origin Authorizations (ROAs) is like a route6 object found in the Internet Routing Registry (IRR), but with added security since only those who have the private key for the prefix can make and sign ROAs.
Anyone can make a route6 object for a given ASN and prefix, but making ROAs requires someone who has the private key to make it.
Set up RPKI ROA on your prefix
RPKI ROA for your prefix can either be made using your LIR’s panel or by opening a support ticket. In my case and for this tutorial, I requested Lagrange Cloud, my LIR, to make a ROA for my prefix via their panel.
Set up RPKI route filtering
Test your configuration first by pinging invalid.rpki.isbgpsafeyet.com
using the command ping -6 invalid.rpki.isbgpsafeyet.com
. If you can ping, it means that RPKI filtering is not yet enabled.
Currently, our configuration accepts a default route from the upstreams. To make RPKI filtering work, allow BIRD to create an unreachable default route so that any routes that are rejected will be blackholed.
Comment out or remove this line in order for BIRD to create an unreachable default route.
|
|
Plain RPKI to Router (RTR)
- Choose an RTR server to use. You can use my IPv6 ROAs only RTR server at
rtr-v6.215150.xyz:3323
to save some RAM.
|
|
Generate BIRD2 config from Pathvector.
sudo pathvector generate
Check the BGP session. If you see “Established” on rpki1, then the RPKI is working.
sudo birdc show protocol
Example output:
|
|
- Reload all BIRD routes to start rejecting RPKI invalids.
sudo birdc reload in all
Now try to ping invalid.rpki.isbgpsafeyet.com
. If it says no route to host, it means that you are now filtering RPKI invalids.
RTRTR over HTTPS
Since plain RTR is insecure, some people recommend to use RTRTR to get RTR over HTTPS.
- Install RTRTR.
|
|
Delete RTRTR’s default config file.
sudo rm /etc/rtrtr.conf
Create new RTRTR config file.
sudo nano /etc/rtrtr.conf
Here is an example config that uses my IPv6 ROAs only RTRTR JSON server athttps://rpki.215150.xyz/rpki-v6.json
.
|
|
Enable and start RTRTR.
sudo systemctl enable --now rtrtr
Point RTR server to localhost.
|
|
Generate BIRD2 config from Pathvector.
sudo pathvector generate
Check the BGP session. If you see “Established” on rpki1, then the RPKI is working.
sudo birdc show protocol