Hacky setup to build a test BGP network with RPKI enabled on it.
Written from memory, does disable some security things, Not how you'd do this in production, etc.
Two Vyos Routers:
- router one with
AS64512
, on 192.168.100.1 - router two with
AS64513
, on 192.168.100.2
Router one has three interfaces:
- eth0 for NAT'd internet access
- eth1 for BGP
- eth2 for Clients (DHCP)
Router two has two interfaces:
- eth0 for BGP
- eth1 for Client (DHCP)
Ubuntu VM running:
- Krill - https://krill.docs.nlnetlabs.nl/en/stable/
- Routininator - https://routinator.docs.nlnetlabs.nl/en/stable/
Do the initial setup so a configuration file is generated, and then put it into testbed mode
by adding the following to /etc/krill.conf
:
[testbed]
rrdp_base_uri = "https://localhost:3000/rrdp/"
rsync_jail = "rsync://localhost/repo/"
ta_aia = "rsync://localhost/ta/ta.cer"
ta_uri = "https://localhost:3000/ta/ta.cer"
Also, to save your browser from freezing set bgp_risdumps_enabled = false
further up in the configuration.
Restart it, and you should now have a testbed trust anchor at https://localhost:3000/ta/ta.tal
, otherwise wipe /var/lib/krill
.
You can now configure your routes there so they'll be accept by your routers.
Following copies the trust anchor to a suitable place:
mkdir /srv/ta
wget --no-check-certificate https://localhost:3000/ta/ta.tal -O /srv/ta/ta.tal
wget --no-check-certificate https://localhost:3000/ta/ta.cer -O /srv/ta/ta.cer
Patch /srv/ta/ta.tal to include an extra line below the first with the rsync url to get it.
e.g:
rsync://localhost/ta/ta.cer
Then add the following to /etc/rsync.conf
:
uid = nobody
gid = nogroup
max connections = 50
socket options = SO_KEEPALIVE
[ta]
path = /srv/ta
comment = RPKI info
read only = yes
[repo]
path = /var/lib/krill/data/repo/rsync/current/
comment = RPKI repository
read only = yes
Then you can systemctl start rsync.service
and it should be up.
Finally, getting routinator up.
Can just install it from docker, cargo or as a debian package.
Only thing we need to do is replace the tals to just contain our one. So init it, wipe the cache then copy /srv/ta/ta.tal
into the directory with them, and remove the old ones so they don't get queried.
In KVM, create three isolated networks:
- internal - 192.168.100.0/24, No DHCP
- lan-1 - 192.168.150.0/24, No DHCP
- lan-2 - 192.168.160.0/24, No DHCP.
The first can have DHCP, just makes configuring a pain, other two shouldn't has as it's managed by the routers.
- Router one is on internal and lan-1, router two is on internal and lan-2.
- Put devices on whatever lan makes sense.
- RPKI server goes on both lan-1 and lan-2