Add script to update roa

This commit is contained in:
KAAAsS 2021-04-15 22:17:24 +08:00
parent eed1612996
commit b61dfe91f3
Signed by: KAAAsS
GPG Key ID: D56625F3E671882F
4 changed files with 23 additions and 2730 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
conf
concrete
roa*.conf

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

22
script/update_roa.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
set -e
BIRD_CONF_DIR=$(dirname "$0")/../
# Root check
if [[ $(id -u) -ne 0 ]]; then
echo "Run this script with root!" >&2
exit 1
fi
# Update from: https://dn42.burble.com/services/public/#roa-data
echo "Updating IPv4 roa..."
curl -sfSLR -o$BIRD_CONF_DIR/roa_dn42.conf -z$BIRD_CONF_DIR/roa_dn42.conf https://dn42.burble.com/roa/dn42_roa_bird2_4.conf
echo "Updating IPv6 roa..."
curl -sfSLR -o$BIRD_CONF_DIR/roa_dn42_v6.conf -z$BIRD_CONF_DIR/roa_dn42_v6.conf https://dn42.burble.com/roa/dn42_roa_bird2_6.conf
echo "Re-configuring..."
/usr/sbin/birdc configure
echo "ROA Data updated"