mirror of
https://github.com/itme-brain/nixos.git
synced 2026-05-08 06:50:11 -04:00
fix(server): remove sslh and enforce direct nginx client IP filtering
This commit is contained in:
parent
de3dd664e2
commit
b8bd062859
1 changed files with 0 additions and 14 deletions
|
|
@ -14,7 +14,6 @@ in
|
||||||
privateAllowCidrs = mkOption {
|
privateAllowCidrs = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [
|
default = [
|
||||||
"127.0.0.1/32"
|
|
||||||
"192.168.0.0/24"
|
"192.168.0.0/24"
|
||||||
"10.8.0.0/24"
|
"10.8.0.0/24"
|
||||||
];
|
];
|
||||||
|
|
@ -41,25 +40,12 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.sslh = {
|
|
||||||
enable = true;
|
|
||||||
listenAddresses = [ "0.0.0.0" ];
|
|
||||||
port = 443;
|
|
||||||
settings = {
|
|
||||||
protocols = [
|
|
||||||
{ name = "ssh"; host = "127.0.0.1"; port = "22"; }
|
|
||||||
{ name = "tls"; host = "127.0.0.1"; port = "4443"; }
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
recommendedOptimisation = true;
|
recommendedOptimisation = true;
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
eventsConfig = "worker_connections 4096;";
|
eventsConfig = "worker_connections 4096;";
|
||||||
defaultSSLListenPort = 4443;
|
|
||||||
|
|
||||||
# Catch-all default - friendly error for unknown subdomains
|
# Catch-all default - friendly error for unknown subdomains
|
||||||
virtualHosts."_" = {
|
virtualHosts."_" = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue