commit a50152cb00c85631e7663008eee86617ce054364
parent 607460a838b9c0d879faee629028a8bf710e368f
Author: MTRNord <mtrnord1@gmail.com>
Date: Sat, 27 Jan 2024 18:31:42 +0100
Meow
Diffstat:
2 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/nixos/worker-1/configuration.nix b/nixos/worker-1/configuration.nix
@@ -448,16 +448,14 @@ in {
debug protocols all;
## Boilerplate from distro
log syslog all;
- protocol device {
- }
- protocol direct {
- disabled; # Disable by default
- ipv4; # Connect to default IPv4 table
- ipv6; # ... and to default IPv6 table
+
+ filter allowed_ips {
+ if net = 10.100.12.1/32 then accept;
}
+
protocol kernel {
ipv4 { # Connect protocol to IPv4 table by channel
- export all; # Export to protocol. default is export none
+ import filter allowed_ips;
};
persist;
}
@@ -465,10 +463,6 @@ in {
ipv6 { export all; };
}
- filter allowed_ips {
- if net = 10.100.12.1/32 then accept;
- }
-
protocol bgp worker2 {
local 10.0.2.1 as 64513; # Use a private AS number
neighbor 10.0.2.2 as 64514; # Our neighbor ...
diff --git a/nixos/worker-2/configuration.nix b/nixos/worker-2/configuration.nix
@@ -549,9 +549,13 @@ in {
## Boilerplate from distro
log syslog all;
+ filter allowed_ips {
+ if net = 10.100.12.1/32 then accept;
+ }
+
protocol kernel {
ipv4 { # Connect protocol to IPv4 table by channel
- export all; # Export to protocol. default is export none
+ import filter allowed_ips;
};
persist;
}
@@ -559,10 +563,6 @@ in {
ipv6 { export all; };
}
- filter allowed_ips {
- if net = 10.100.12.1/32 then accept;
- }
-
protocol bgp worker1 {
local 10.0.2.2 as 64514; # Use a private AS number
neighbor 10.0.2.1 as 64513; # Our neighbor ...