forked from zentralwerk/network
356 lines
8.2 KiB
Nix
356 lines
8.2 KiB
Nix
{ config, ... }:
|
|
let
|
|
servHosts = config.site.net.serv.hosts4;
|
|
inherit (config.site.net.c3d2.hosts4) dn42;
|
|
inherit (config.site.net.flpk.hosts4) c3d2-web leon mailtngbert;
|
|
in
|
|
{
|
|
site.hosts = {
|
|
upstream3 = {
|
|
interfaces = {
|
|
core = {
|
|
hwaddr = "0A:14:48:01:28:00";
|
|
type = "veth";
|
|
};
|
|
up3 = {
|
|
hwaddr = "00:23:74:D7:42:7D";
|
|
type = "veth";
|
|
upstream = {
|
|
link = null;
|
|
noNat = { subnets6 = [ ]; };
|
|
provider = "starlink";
|
|
staticIpv4Address = null;
|
|
upBandwidth = null;
|
|
};
|
|
};
|
|
};
|
|
ospf.upstreamInstance = 7;
|
|
role = "container";
|
|
};
|
|
|
|
upstream4 = rec {
|
|
forwardPorts = [
|
|
{ # http
|
|
destination = servHosts.public-access-proxy;
|
|
proto = "tcp";
|
|
sourcePort = 80;
|
|
}
|
|
{ # https
|
|
destination = servHosts.public-access-proxy;
|
|
proto = "tcp";
|
|
sourcePort = 443;
|
|
}
|
|
{ # gemini
|
|
destination = "${c3d2-web}:1965";
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 1965;
|
|
}
|
|
{
|
|
destination = "172.20.73.61";
|
|
proto = "tcp";
|
|
sourcePort = 53;
|
|
}
|
|
{
|
|
destination = "172.20.73.61";
|
|
proto = "udp";
|
|
sourcePort = 53;
|
|
}
|
|
{
|
|
destination = dn42;
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 2325;
|
|
}
|
|
{
|
|
destination = dn42;
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 2327;
|
|
}
|
|
{
|
|
destination = dn42;
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 2337;
|
|
}
|
|
{
|
|
destination = dn42;
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 2338;
|
|
}
|
|
{
|
|
destination = dn42;
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 2339;
|
|
}
|
|
{
|
|
destination = dn42;
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 2340;
|
|
}
|
|
{
|
|
destination = dn42;
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 2399;
|
|
}
|
|
{
|
|
destination = dn42;
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 24699;
|
|
}
|
|
{
|
|
destination = dn42;
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 64699;
|
|
}
|
|
{ #ssh
|
|
destination = "${leon}:22";
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 2223;
|
|
}
|
|
{ #Website
|
|
destination = "${leon}:5000";
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 5001;
|
|
}
|
|
{ #VPN_Wireguard VPN1-interface
|
|
destination = "${leon}:18900";
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 18800;
|
|
}
|
|
{ #VPN_Wireguard VPN2-interface
|
|
destination = "${leon}:19900";
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 19800;
|
|
}
|
|
# ?
|
|
{
|
|
destination = "172.22.99.175:22";
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 2224;
|
|
}
|
|
{
|
|
destination = servHosts.gitea;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 22;
|
|
}
|
|
{
|
|
destination = servHosts.jabber;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 5222;
|
|
}
|
|
{
|
|
destination = servHosts.jabber;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 5223;
|
|
}
|
|
{
|
|
destination = servHosts.jabber;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 5269;
|
|
}
|
|
{
|
|
destination = servHosts.jabber;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 3478;
|
|
}
|
|
{
|
|
destination = servHosts.jabber;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 3479;
|
|
}
|
|
{
|
|
destination = servHosts.jabber;
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 3478;
|
|
}
|
|
{
|
|
destination = servHosts.jabber;
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 3479;
|
|
}
|
|
{
|
|
destination = mailtngbert;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 25;
|
|
}
|
|
{
|
|
destination = mailtngbert;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 465;
|
|
}
|
|
{
|
|
destination = mailtngbert;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 587;
|
|
}
|
|
{
|
|
destination = mailtngbert;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 110;
|
|
}
|
|
{
|
|
destination = mailtngbert;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 143;
|
|
}
|
|
{
|
|
destination = mailtngbert;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 993;
|
|
}
|
|
{
|
|
destination = mailtngbert;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 995;
|
|
}
|
|
# poelzi
|
|
{
|
|
destination = "172.20.73.162:22";
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 2323;
|
|
}
|
|
# jan
|
|
{
|
|
destination = "172.20.75.3:51820";
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 30057;
|
|
}
|
|
# zw-ev RDP
|
|
{
|
|
destination = "172.20.75.222:3389";
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 45000;
|
|
}
|
|
{
|
|
destination = config.site.net.core.hosts4.vpn-gw;
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = config.site.vpn.wireguard.port;
|
|
}
|
|
{
|
|
destination = servHosts.gnunet;
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 2086;
|
|
}
|
|
# data-hoarder
|
|
{
|
|
destination = servHosts.data-hoarder;
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 51820;
|
|
}
|
|
{
|
|
destination = "${servHosts.data-hoarder}:22";
|
|
proto = "tcp";
|
|
reflect = false;
|
|
sourcePort = 2269;
|
|
}
|
|
# data-hoarder-staging
|
|
{
|
|
destination = "${servHosts.staging-data-hoarder}:51820";
|
|
proto = "udp";
|
|
reflect = true;
|
|
sourcePort = 51821;
|
|
}
|
|
{
|
|
destination = "${servHosts.ftp}:22";
|
|
proto = "tcp";
|
|
reflect = true;
|
|
sourcePort = 1022;
|
|
}
|
|
# coloRadio
|
|
{
|
|
proto = "tcp";
|
|
sourcePort = 8000;
|
|
destination = "192.168.9.127";
|
|
}
|
|
];
|
|
interfaces = {
|
|
core = {
|
|
hwaddr = "0A:14:48:01:28:01";
|
|
type = "veth";
|
|
};
|
|
up4 = {
|
|
hwaddr = "00:23:74:D7:42:7E";
|
|
type = "veth";
|
|
};
|
|
up4-pppoe = {
|
|
type = "pppoe";
|
|
upstream = {
|
|
link = "up4";
|
|
noNat = {
|
|
subnets6 =
|
|
[ "2a00:8180:2000:37::1/128" "2a00:8180:2c00:200::/56" ];
|
|
};
|
|
provider = "dsi";
|
|
staticIpv4Address = "81.201.149.152";
|
|
upBandwidth = 98000;
|
|
};
|
|
};
|
|
};
|
|
ospf = {
|
|
upstreamInstance = 8;
|
|
stubNets4 = [
|
|
"${interfaces.up4-pppoe.upstream.staticIpv4Address}/32"
|
|
];
|
|
};
|
|
role = "container";
|
|
};
|
|
|
|
freifunk.ospf.upstreamInstance = 6;
|
|
|
|
anon1 = {
|
|
interfaces = {
|
|
core = {
|
|
hwaddr = "0A:14:48:01:14:00";
|
|
type = "veth";
|
|
};
|
|
njalla = {
|
|
type = "wireguard";
|
|
upstream = {
|
|
provider = "njal.la";
|
|
upBandwidth = 45000;
|
|
};
|
|
};
|
|
};
|
|
ospf = {
|
|
allowedUpstreams = [ "upstream3" "upstream4" "freifunk" ];
|
|
upstreamInstance = 5;
|
|
};
|
|
role = "container";
|
|
};
|
|
};
|
|
}
|