secure transmission

This commit is contained in:
Ingolf Wagner 2022-01-01 10:31:13 +01:00
parent fcb828dead
commit 227f51f937
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
2 changed files with 14 additions and 3 deletions

View file

@ -7,7 +7,6 @@
./hetzner.nix ./hetzner.nix
./packages.nix ./packages.nix
./tinc.nix ./tinc.nix
./syncthing.nix ./syncthing.nix
@ -35,6 +34,13 @@
]; ];
# 2 hours = 2 * 60 * 60 = 7200 seconds
#services.netdata.config.global.history = 7200;
# 4 hours = 4 * 60 * 60 = 14440 seconds
services.netdata.config.global.history = 14440;
# 24 hours = 24 * 60 * 60 = 86400 seconds
#services.netdata.config.global.history = 86400;
services.sshguard.enable = true; services.sshguard.enable = true;
# Shell configuration # Shell configuration

View file

@ -287,13 +287,18 @@ in
# [ 5044 12304 12305 ]; # [ 5044 12304 12305 ];
# host nginx setup # host nginx setup
# curl transmission.robi.private < will work # curl transmission.robi.private < will work
# curl -H "Host: transmission.robi.private" http://144.76.13.147/ < will work # curl -H "Host: transmission.robi.private" https://robi.private/ < will work
# curl -H "Host: transmission.robi.private" https://144.76.13.147/ < wont work
services.nginx = { services.nginx = {
enable = true; enable = true;
recommendedProxySettings = true; recommendedProxySettings = true;
virtualHosts = { virtualHosts = {
"transmission.${config.networking.hostName}.private" = { "transmission.${config.networking.hostName}.private" = {
extraConfig = ''
allow ${config.module.cluster.services.tinc.private.networkSubnet};
deny all;
'';
locations."/" = { locations."/" = {
proxyPass = "http://${containerAddress}:${toString uiPort}"; proxyPass = "http://${containerAddress}:${toString uiPort}";
}; };