sslh, wireguard

This commit is contained in:
2026-07-07 15:54:24 +02:00
parent 685f1488b5
commit 045a8c4d53
2 changed files with 26 additions and 2 deletions
+24
View File
@@ -0,0 +1,24 @@
{ pkgs, lib, ... }:
{
services.sslh = {
enable = true;
method = "fork"; # un process par connexion, simple et robuste pour un usage perso
listenAddresses = [ "0.0.0.0" "[::]" ];
port = 443; # sslh prend la main sur le 443
settings = {
# ssh classique vers le port 22 local
protocols = [
{
name = "ssh";
host = "localhost";
port = 22;
}
{
name = "tls";
host = "localhost";
port = 8443; # Traefik n'écoute plus sur 443 mais sur 8443
}
];
};
};
}
+2 -2
View File
@@ -9,7 +9,7 @@
networking.wireguard.interfaces = {
wg1 = {
ips = [ "10.100.0.1/24" ];
listenPort = 51821;
listenPort = 443;
privateKeyFile = config.sops.secrets."wireguard/vps_private_key".path;
peers = [
{
@@ -28,5 +28,5 @@
'';
};
};
networking.firewall.allowedUDPPorts = [ 51821 ];
networking.firewall.allowedUDPPorts = [ 443 ];
}