desperation

This commit is contained in:
2025-07-27 16:00:12 -05:00
parent affa2271b7
commit 8a6056998e
2 changed files with 31 additions and 119 deletions

View File

@@ -45,9 +45,11 @@
dashboard = { dashboard = {
enable = true; enable = true;
domain = "vpn.blunkall.us";
settings = { settings = {
AUTH_AUTHORITY = "https://auth.blunkall.us/realms/General/.well-known/openid-configuration"; AUTH_AUTHORITY = "https://auth.blunkall.us/realms/General/.well-known/openid-configuration";
}; };
managementServer = "192.168.100.24";
}; };
}; };
}; };
@@ -61,28 +63,13 @@
}; };
containers.netbird-management = lib.mkIf false { containers.netbird-management = lib.mkIf config.sysconfig.opts.virtualization.netbird.enable {
autoStart = true; autoStart = true;
privateNetwork = true; privateNetwork = true;
hostAddress = "192.168.100.10"; hostAddress = "192.168.100.10";
localAddress = "192.168.100.24"; localAddress = "192.168.100.24";
forwardPorts = [
{
hostPort = 3478;
containerPort = 3478;
protocol = "udp";
}
] ++ map (x: { hostPort = x; containerPort = x; protocol = "udp"; }) (builtins.genList (y: 49152 + y) (54152 - 49152));
bindMounts = {
};
config = { config = {
services.netbird = { services.netbird = {
@@ -91,10 +78,15 @@
management = { management = {
enable = true; enable = true;
domain = "mgmt.blunkall.us";
disableAnonymousMetrics = true; disableAnonymousMetrics = true;
dnsDomain = "vpn"; dnsDomain = "vpn";
turnDomain = "coturn.blunkall.us";
turnPort = 3478;
oidcConfigEndpoint = "https://auth.blunkall.us/realms/General/.well-known/openid-configuration"; oidcConfigEndpoint = "https://auth.blunkall.us/realms/General/.well-known/openid-configuration";
settings = { settings = {
@@ -102,9 +94,9 @@
"Turns" = [ "Turns" = [
{ {
"Proto" = "udp"; "Proto" = "udp";
"URI" = "turn:vpn.blunkall.us:3478"; "URI" = "turn:coturn.blunkall.us:3478";
"Username" = "netbird"; "Username" = "netbird";
"Password" = "QTCV8+Q+b+g5FYXz3gRP7suxy9cmbEpFTzYu2+/IQ4E"; "Password" = "password";
} }
]; ];
}; };
@@ -124,12 +116,12 @@
}; };
containers.netbird-coturn = lib.mkIf false { containers.netbird-coturn = lib.mkIf config.sysconfig.opts.virtualization.netbird.enable {
autoStart = true; autoStart = true;
privateNetwork = true; privateNetwork = true;
hostAddress = "192.168.100.10"; hostAddress = "192.168.100.10";
localAddress = "192.168.100.21"; localAddress = "192.168.100.25";
forwardPorts = [ forwardPorts = [
@@ -150,51 +142,21 @@
services.netbird = { services.netbird = {
server = { server = {
enable = true;
enableNginx = false; enableNginx = false;
domain = "vpn.blunkall.us";
management = {
enable = true;
disableAnonymousMetrics = true;
dnsDomain = "vpn";
oidcConfigEndpoint = "https://auth.blunkall.us/realms/General/.well-known/openid-configuration";
settings = {
"TURNConfig" = {
"Turns" = [
{
"Proto" = "udp";
"URI" = "turn:vpn.blunkall.us:3478";
"Username" = "netbird";
"Password" = "QTCV8+Q+b+g5FYXz3gRP7suxy9cmbEpFTzYu2+/IQ4E";
}
];
};
};
port = 33073;
};
dashboard = {
settings = {
AUTH_AUTHORITY = "https://auth.blunkall.us/realms/General/.well-known/openid-configuration";
};
};
coturn = { coturn = {
enable = true; enable = true;
domain = "coturn.blunkall.us";
user = "netbird";
password = "password"; password = "password";
openPorts = map (x: x) (builtins.genList (y: 49152 + y) (54152 - 49152));
}; };
}; };
}; };
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ 80 443 33073 33080 10000 ]; allowedTCPPorts = [ 33080 ];
allowedUDPPorts = [ 3478 ]; allowedUDPPorts = [ 3478 ];
allowedUDPPortRanges = [{ from = 49152; to = 54152; }]; allowedUDPPortRanges = [{ from = 49152; to = 54152; }];
}; };
@@ -204,79 +166,29 @@
}; };
containers.netbird-signal = lib.mkIf false { containers.netbird-signal = lib.mkIf config.sysconfig.opts.virtualization.netbird.enable {
autoStart = true; autoStart = true;
privateNetwork = true; privateNetwork = true;
hostAddress = "192.168.100.10"; hostAddress = "192.168.100.10";
localAddress = "192.168.100.21"; localAddress = "192.168.100.26";
forwardPorts = [
{
hostPort = 3478;
containerPort = 3478;
protocol = "udp";
}
] ++ map (x: { hostPort = x; containerPort = x; protocol = "udp"; }) (builtins.genList (y: 49152 + y) (54152 - 49152));
bindMounts = {
};
config = { config = {
services.netbird = { services.netbird = {
server = { server = {
enable = true;
enableNginx = false; enableNginx = false;
domain = "vpn.blunkall.us";
management = { signal = {
enable = true; enable = true;
port = 80;
disableAnonymousMetrics = true; domain = "signal.blunkall.us";
dnsDomain = "vpn";
oidcConfigEndpoint = "https://auth.blunkall.us/realms/General/.well-known/openid-configuration";
settings = {
"TURNConfig" = {
"Turns" = [
{
"Proto" = "udp";
"URI" = "turn:vpn.blunkall.us:3478";
"Username" = "netbird";
"Password" = "QTCV8+Q+b+g5FYXz3gRP7suxy9cmbEpFTzYu2+/IQ4E";
}
];
};
};
port = 33073;
};
dashboard = {
settings = {
AUTH_AUTHORITY = "https://auth.blunkall.us/realms/General/.well-known/openid-configuration";
};
};
coturn = {
enable = true;
password = "password";
}; };
}; };
}; };
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ 80 443 33073 33080 10000 ]; allowedTCPPorts = [ 80 ];
allowedUDPPorts = [ 3478 ];
allowedUDPPortRanges = [{ from = 49152; to = 54152; }];
}; };
system.stateVersion = "25.05"; system.stateVersion = "25.05";

View File

@@ -178,19 +178,19 @@
}; };
netbirdApi = { netbirdApi = {
entryPoints = [ "websecure" ]; entryPoints = [ "websecure" ];
rule = "Host(`vpn.blunkall.us`) && PathPrefix(`/api`)"; rule = "Host(`mgmt.blunkall.us`) && PathPrefix(`/api`)";
service = "netbirdApi"; service = "netbirdApi";
tls.certResolver = "cloudflare"; tls.certResolver = "cloudflare";
}; };
netbirdMgmt = { netbirdMgmt = {
entryPoints = [ "websecure" ]; entryPoints = [ "websecure" ];
rule = "Host(`vpn.blunkall.us`) && PathPrefix(`/management.ManagementService`)"; rule = "Host(`mgmt.blunkall.us`) && PathPrefix(`/management.ManagementService`)";
service = "netbirdMgmt"; service = "netbirdMgmt";
tls.certResolver = "cloudflare"; tls.certResolver = "cloudflare";
}; };
netbirdSignal = { netbirdSignal = {
entryPoints = [ "websecure" ]; entryPoints = [ "websecure" ];
rule = "Host(`vpn.blunkall.us`) && PathPrefix(`/signalexchange.SignalExchange`)"; rule = "Host(`signal.blunkall.us`) && PathPrefix(`/signalexchange.SignalExchange`)";
service = "netbirdSignal"; service = "netbirdSignal";
tls.certResolver = "cloudflare"; tls.certResolver = "cloudflare";
}; };
@@ -227,11 +227,11 @@
netbird.loadBalancer = { netbird.loadBalancer = {
passHostHeader = true; passHostHeader = true;
servers = [ { url = "http://192.168.100.23"; } ]; servers = [ { url = "http://192.168.100.23:80"; } ];
}; };
netbirdApi.loadBalancer.servers = [ { url = "http://192.168.100.21:33073"; } ]; netbirdApi.loadBalancer.servers = [ { url = "http://192.168.100.24:80"; } ];
netbirdMgmt.loadBalancer.servers = [ { url = "h2c://192.168.100.21:33073"; } ]; netbirdMgmt.loadBalancer.servers = [ { url = "h2c://192.168.100.24:80"; } ];
netbirdSignal.loadBalancer.servers = [ { url = "h2c://192.168.100.21:10000"; } ]; netbirdSignal.loadBalancer.servers = [ { url = "h2c://192.168.100.26:80"; } ];
#homeassistant.loadBalancer.servers = [ { url = "http://192.168.100.10:8123"; } ]; #homeassistant.loadBalancer.servers = [ { url = "http://192.168.100.10:8123"; } ];