feat: fw add moltbot

This commit is contained in:
2026-01-30 08:59:52 +01:00
parent 190c2ee5c5
commit 1ca4a59fe5
5 changed files with 138 additions and 50 deletions

View File

@@ -103,4 +103,31 @@
'';
};
};
services.nginx.virtualHosts."moltbot.cloonar.com" = {
forceSSL = true;
enableACME = true;
acmeRoot = null;
# Restrict to internal networks only (LAN + VPN)
extraConfig = ''
allow ${config.networkPrefix}.96.0/24;
allow ${config.networkPrefix}.97.0/24;
allow ${config.networkPrefix}.98.0/24;
deny all;
'';
locations."/" = {
proxyPass = "http://${config.networkPrefix}.97.60:18789";
extraConfig = ''
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
'';
};
};
}