Compare commits

...

8 Commits

Author SHA1 Message Date
fa674a5981 chore: Fully Flesh out BRETTB IPv4 2024-11-28 17:21:06 -06:00
4db5d329a5 Flesh out BRETTB ROA 2024-11-28 16:48:33 -06:00
967bc3e4b7 chore: Assign v6 space to BRETTB 2024-11-28 13:39:11 -06:00
7e25e2cc3f chore: add route filtering doc 2024-11-28 13:32:34 -06:00
8b0efcc4d2 chore: Update DNS Zones 2024-11-28 13:28:40 -06:00
8452b71c02 Register BrettB 2024-11-28 12:26:37 -06:00
5272330fa2 feat: Policy checker 2024-11-28 12:08:11 -06:00
cb7862dac8 chore: Remove NX3-ORG from V6 range 2024-11-28 12:03:24 -06:00
29 changed files with 206 additions and 1 deletions

18
check-pol Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -o pipefail
if [ $# -eq 0 ]
then
echo "Usage: $0 COMMIT YOUR-MNT"
exit
fi
BASE="$(readlink -f "$0" 2>/dev/null || python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "$0")"
BASE="$(dirname "$BASE")"
cd "$BASE" || exit 1
git diff --name-only "$1" | while IFS='/' read -ra LINE; do
if [[ "${LINE[0]}" = "data" && -n "${LINE[2]}" ]]; then
utils/schema-check/nx3_schema.py -v policy "${LINE[1]}" "${LINE[2]}" "$2"
fi
done

View File

@@ -0,0 +1,6 @@
aut-num: AS4266030001
as-name: AS1-BRETTB-NX3
admin-c: BRETTB-NX3
tech-c: BRETTB-NX3
mnt-by: BRETTB-MNT
source: NX3

View File

@@ -0,0 +1,6 @@
aut-num: AS4266030002
as-name: AS2-BRETTB-NX3
admin-c: BRETTB-NX3
tech-c: BRETTB-NX3
mnt-by: BRETTB-MNT
source: NX3

View File

@@ -0,0 +1,6 @@
aut-num: AS4266030003
as-name: AS3-BRETTB-NX3
admin-c: BRETTB-NX3
tech-c: BRETTB-NX3
mnt-by: BRETTB-MNT
source: NX3

View File

@@ -0,0 +1,6 @@
aut-num: AS4266030004
as-name: AS4-BRETTB-NX3
admin-c: BRETTB-NX3
tech-c: BRETTB-NX3
mnt-by: BRETTB-MNT
source: NX3

View File

@@ -0,0 +1,4 @@
domain: delegation-servers.nx3
nserver: a.delegation-servers.nx3 172.24.31.2
mnt-by: NX3-MNT
source: NX3

6
data/dns/info.nx3 Normal file
View File

@@ -0,0 +1,6 @@
domain: info.nx3
admin-c: BRETTB-NX3
tech-c: BRETTB-NX3
mnt-by: NX3-MNT
nserver: ns1.info.nx3 172.24.33.10
source: NX3

4
data/dns/nx3 Normal file
View File

@@ -0,0 +1,4 @@
domain: nx3
nserver: a.delegation-servers.nx3
mnt-by: NX3-MNT
source: NX3

View File

@@ -0,0 +1,4 @@
domain: recursive-servers.nx3
nserver: a.delegation-servers.nx3
mnt-by: NX3-MNT
source: NX3

24
data/filter.txt Normal file
View File

@@ -0,0 +1,24 @@
# For FRR Rules:
# cat filter.txt | \
# grep -e ^[0-9] | \
# awk '{ print "ip prefix-list nx3-in seq " $1 " " $2 " " $3 " ge " $4 " le " $5}' | \
# sed "s_/\([0-9]\+\) ge \1_/\1_g;s_/\([0-9]\+\) le \1_/\1_g"
#
# For BIRD Rules:
# cat filter.txt | \
# awk 'BEGIN {printf "function is_valid_network() {\n return net ~ [\n" } \
# /^[0-9]/ && $2 ~ /permit/ {printf " %s{%s,%s},\n", $3, $4, $5};' | \
# sed "$ s/,$/\n ];\n}/"
# The rules MUST be sorted by the number column first and then the first matching rule MUST be used.
# ROAs MUST be checked against these rules and max-length of the ROA NUST NOT be longer than allowed by the matching rule.
#Nr Action Prefix MinLen MaxLen # Comment
1001 permit 172.24.0.0/24 28 32 # dn42 anycast range
1002 permit 172.25.0.0/24 28 32 # dn42 anycast range
1003 permit 172.26.0.0/24 28 32 # dn42 anycast range
1004 permit 172.27.0.0/24 28 32 # dn42 anycast range
1100 permit 172.24.0.0/14 21 29 # dn42 main net
9999 deny 0.0.0.0/0 0 32 # block the rest

20
data/filter6.txt Normal file
View File

@@ -0,0 +1,20 @@
# To FRR Rules:
# cat filter6.txt | \
# grep -e ^[0-9] | \
# awk '{ print "ipv prefix-list nx3v6-in seq " $1 " " $2 " " $3 " ge " $4 " le " $5}' | \
# sed "s_/\([0-9]\+\) ge \1_/\1_g;s_/\([0-9]\+\) le \1_/\1_g"
#
# For BIRD Rules:
# cat filter6.txt | \
# awk 'BEGIN {printf "function is_valid_network() {\n return net ~ [\n" } \
# /^[0-9]/ && $2 ~ /permit/ {printf " %s{%s,%s},\n", $3, $4, $5};' | \
# sed "$ s/,$/\n ];\n}/"
# The rules MUST be sorted by the number column first and then the first matching rule MUST be used.
# ROAs MUST be checked against these rules and max-length of the ROA NUST NOT be longer than allowed by the matching rule.
# Nr Action Prefix MinLen MaxLen # Comment
1001 permit fd00::/8 44 64 # ULA (defined)
9999 deny ::/0 0 128 # block the rest

View File

@@ -5,6 +5,5 @@ descr: NX3 ULA Address Space
remarks: Only /48 prefixes may be allocated out of this range. remarks: Only /48 prefixes may be allocated out of this range.
status: ALLOCATED status: ALLOCATED
policy: open policy: open
org: ORG-NX3
mnt-by: NX3-MNT mnt-by: NX3-MNT
source: NX3 source: NX3

View File

@@ -0,0 +1,8 @@
inet6num: fd06:108f:6f8e:0000:0000:0000:0000:0000 - fd06:108f:6f8e:ffff:ffff:ffff:ffff:ffff
cidr: fd06:108f:6f8e::/48
netname: NET3-BRETTB-NX3
admin-c: BRETTB-NX3
tech-c: BRETTB-NX3
mnt-by: BRETTB-MNT
status: ASSIGNED
source: NX3

View File

@@ -0,0 +1,8 @@
inet6num: fd48:c420:f618:0000:0000:0000:0000:0000 - fd48:c420:f618:ffff:ffff:ffff:ffff:ffff
cidr: fd48:c420:f618::/48
netname: NET1-BRETTB-NX3
admin-c: BRETTB-NX3
tech-c: BRETTB-NX3
mnt-by: BRETTB-MNT
status: ASSIGNED
source: NX3

View File

@@ -0,0 +1,8 @@
inet6num: fdd8:4045:c53c:0000:0000:0000:0000:0000 - fdd8:4045:c53c:ffff:ffff:ffff:ffff:ffff
cidr: fdd8:4045:c53c::/48
netname: NET2-BRETTB-NX3
admin-c: BRETTB-NX3
tech-c: BRETTB-NX3
mnt-by: BRETTB-MNT
status: ASSIGNED
source: NX3

View File

@@ -0,0 +1,7 @@
inetnum: 172.24.31.0 - 172.24.31.255
cidr: 172.24.31.0/24
netname: NET1-BRETTB-NX3
descr: Brett B Network 1
mnt-by: BRETTB-MNT
status: ASSIGNED
source: NX3

View File

@@ -0,0 +1,7 @@
inetnum: 172.24.32.0 - 172.24.32.255
cidr: 172.24.32.0/24
netname: NET2-BRETTB-NX3
descr: Brett B Network 2
mnt-by: BRETTB-MNT
status: ASSIGNED
source: NX3

View File

@@ -0,0 +1,7 @@
inetnum: 172.24.33.0 - 172.24.33.255
cidr: 172.24.33.0/24
netname: NET3-BRETTB-NX3
descr: Brett B Network 3
mnt-by: BRETTB-MNT
status: ASSIGNED
source: NX3

View File

@@ -0,0 +1,7 @@
inetnum: 172.24.34.0 - 172.24.34.255
cidr: 172.24.34.0/24
netname: NET4-BRETTB-NX3
descr: Brett B Network 4
mnt-by: BRETTB-MNT
status: ASSIGNED
source: NX3

5
data/mntner/BRETTB-MNT Normal file
View File

@@ -0,0 +1,5 @@
mntner: BRETTB-MNT
admin-c: BRETTB-NX3
tech-c: BRETTB-NX3
mnt-by: BRETTB-MNT
source: NX3

5
data/person/BRETTB-NX3 Normal file
View File

@@ -0,0 +1,5 @@
person: Brett Bender
e-mail: brett@brettb.xyz
nic-hdl: BRETTB-NX3
mnt-by: BRETTB-MNT
source: NX3

View File

@@ -0,0 +1,5 @@
route: 172.24.0.53/32
origin: AS4266030002
max-length: 32
mnt-by: NX3-MNT
source: NX3

View File

@@ -0,0 +1,5 @@
route: 172.24.31.0/24
origin: AS4266030001
max-length: 24
mnt-by: BRETTB-MNT
source: NX3

View File

@@ -0,0 +1,5 @@
route: 172.24.32.0/24
origin: AS4266030002
max-length: 24
mnt-by: BRETTB-MNT
source: NX3

View File

@@ -0,0 +1,5 @@
route: 172.24.33.0/24
origin: AS4266030003
max-length: 24
mnt-by: BRETTB-MNT
source: NX3

View File

@@ -0,0 +1,5 @@
route: 172.24.34.0/24
origin: AS4266030004
max-length: 24
mnt-by: BRETTB-MNT
source: NX3

View File

@@ -0,0 +1,5 @@
route6: fd06:108f:6f8e::/48
origin: AS4266030003
max-length: 48
mnt-by: BRETTB-MNT
source: NX3

View File

@@ -0,0 +1,5 @@
route6: fd48:c420:f618::/48
origin: AS4266030001
max-length: 48
mnt-by: BRETTB-MNT
source: NX3

View File

@@ -0,0 +1,5 @@
route6: fdd8:4045:c53c::/48
origin: AS4266030002
max-length: 48
mnt-by: BRETTB-MNT
source: NX3