network/config/net/flpk.nix

66 lines
1.6 KiB
Nix
Raw Normal View History

2023-01-20 20:04:52 +01:00
{ config, ... }:
{
2022-09-18 00:17:59 +02:00
site.net.flpk = {
domainName = "flpk.zentralwerk.org";
ipv6Router = "flpk-gw";
2022-09-18 00:17:59 +02:00
subnet4 = "45.158.40.160/27";
2022-09-18 01:28:52 +02:00
# we get a /56
subnets6.flpk = "2a0f:5382:acab:1400::/64";
2022-09-18 00:17:59 +02:00
hosts4 = {
flpk-gw = "45.158.40.160";
2022-09-18 21:34:56 +02:00
leon = "45.158.40.162";
2022-09-19 22:39:24 +02:00
sshlog = "45.158.40.163";
2022-11-09 22:11:45 +01:00
caveman = "45.158.40.164";
leoncloud = "45.158.40.165";
2022-11-30 21:08:23 +01:00
mastodon = "45.158.40.166";
2022-12-16 18:18:01 +01:00
c3d2-web = "45.158.40.167";
2022-12-18 21:47:06 +01:00
mailtngbert = "45.158.40.168";
2022-09-18 00:17:59 +02:00
};
hosts6.flpk = {
2022-09-18 01:28:52 +02:00
flpk-gw = "2a0f:5382:acab:1400::c3d2";
2022-09-18 20:38:10 +02:00
leon = "2a0f:5382:acab:1400::1e0";
2022-09-19 22:39:24 +02:00
sshlog = "2a0f:5382:acab:1400::22";
2022-11-09 22:11:45 +01:00
caveman = "2a0f:5382:acab:1400::a4";
leoncloud = "2a0f:5382:acab:1400::a5";
2022-11-30 21:08:23 +01:00
mastodon = "2a0f:5382:acab:1400::a6";
2022-12-16 18:18:01 +01:00
c3d2-web = "2a0f:5382:acab:1400::a7";
2022-12-18 21:47:06 +01:00
mailtngbert = "2a0f:5382:acab:1400::a8";
2022-09-18 00:17:59 +02:00
};
};
site.hosts.flpk-gw = {
interfaces = {
core = {
hwaddr = "0A:14:48:b7:e4:91";
type = "veth";
};
2022-09-18 01:00:11 +02:00
flpk = {
hwaddr = "0A:14:48:01:16:01";
type = "veth";
};
2022-09-18 00:17:59 +02:00
up-flpk = {
type = "wireguard";
upstream = {
provider = "flpk";
noNat = {
subnets4 = [ "45.158.40.160/27" ];
2022-09-18 21:26:37 +02:00
subnets6 = [ "2a0f:5382:acab:1400::/56" ];
};
2022-09-18 00:17:59 +02:00
};
};
};
2023-01-20 20:04:52 +01:00
bgp = {
upstreamTable = "vpn_table";
allowedUpstreams = [ "upstream4" "upstream3" "freifunk" ];
# IPv6 ::/0 via wireguard tunnel
allowedUpstreams6 = [];
2023-01-20 20:04:52 +01:00
peers.${config.site.net.core.subnets6.dn42} = {
type = "upstream";
name = "up";
};
2022-09-18 00:17:59 +02:00
};
role = "container";
};
}