feat(haproxy): Admin-UI auf eigenem Port :3443 (mailgateway-Pattern)
* HAProxy neues Frontend mgmt_https :3443 → api_backend (Mgmt-UI). Selbe TLS-Cert-Strecke wie :443 (gleicher /etc/edgeguard/tls/-Pool). * :443 verliert default_backend → unbekannte Hosts kriegen 503, nicht mehr versehentlich die Admin-UI. Plus default-Route auf primary_backend pro Domain (catch-all-Routing dort, wo gewollt). * Anti-Lockout in nft-Template um tcp dport 3443 erweitert (zusätzlich zu 22 + 443). * SystemRulesCard zeigt 3443 als 3. Anti-Lockout-Eintrag. Erreichbarkeit: * Public Backends: https://<domain>:443 (mit eigenem Cert oder LE) * Admin-UI: https://<host>:3443 (jeder Hostname, default_backend) * SSH: :22 (rate-limited 10/min) Version 1.0.13. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,10 +36,15 @@ frontend public_http
|
||||
|
||||
use_backend api_backend if is_acme
|
||||
|
||||
# ── Public :443 ────────────────────────────────────────────────────────
|
||||
# ── Public :443 (Customer-Backends only) ──────────────────────────────
|
||||
# TLS termination. Reads certs from /etc/edgeguard/tls/ — postinst
|
||||
# seeds a self-signed _default.pem so HAProxy starts before certbot
|
||||
# has issued anything.
|
||||
#
|
||||
# WICHTIG: kein default_backend → unbekannte Hosts kriegen 503. Die
|
||||
# Management-UI sitzt bewusst auf :3443 (siehe mgmt_https unten),
|
||||
# damit ein versehentlich offengelassenes Wildcard-DNS nie auf das
|
||||
# Admin-Panel fällt. mailgateway/enconf-Pattern.
|
||||
frontend public_https
|
||||
bind :443 ssl crt /etc/edgeguard/tls/ alpn h2,http/1.1
|
||||
|
||||
@@ -49,8 +54,19 @@ frontend public_https
|
||||
{{- range $r := $d.Routes}}
|
||||
use_backend eg_backend_{{$r.BackendID}} if { hdr(host) -i {{$d.Name}} } { path_beg {{$r.PathPrefix}} }
|
||||
{{- end}}
|
||||
{{- if $d.PrimaryBackendID}}
|
||||
use_backend eg_backend_{{$d.PrimaryBackendID}} if { hdr(host) -i {{$d.Name}} }
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
|
||||
# ── Mgmt :3443 (Admin-UI only) ────────────────────────────────────────
|
||||
# Eigener Port für die Management-UI — gleicher Cert-Pool, aber kein
|
||||
# Customer-Routing. Anti-Lockout-Regel im nft-Template lässt 3443
|
||||
# immer durch. Erreichbar über jede Domain die auf die Box zeigt
|
||||
# (Hostname egal — default_backend), inkl. der direkten IP.
|
||||
frontend mgmt_https
|
||||
bind :3443 ssl crt /etc/edgeguard/tls/ alpn h2,http/1.1
|
||||
http-response set-header Strict-Transport-Security "max-age=31536000"
|
||||
default_backend api_backend
|
||||
|
||||
# ── Internal stats ─────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user