sslh, wireguard
This commit is contained in:
@@ -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
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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 ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user