Repository navigation
Defguard 2.0 built-in Let’s Encrypt with External URL on port 8443 #3515
|
Hello, We are running Defguard 2.0.2 with Core and Gateway on one internal VM and Edge on a separate DMZ VM. Public TCP 443 is used by another production service, so Defguard cannot use it directly. Currently, nginx listens on Edge TCP 8443 and certificates are issued with acme.sh using DNS-01, then securely copied from Core to Edge. Could you please confirm:
Best regards |
Replies: 1 comment
|
The built-in Let's Encrypt is HTTP-01 only, and the challenge listener is hard-coded to
// DefGuard/proxy src/acme.rs @ v2.0.2 (byte-identical on the v2.1.0 tag)
let listener = TcpListener::bind("0.0.0.0:80").await
.context("Failed to bind port 80 for ACME HTTP-01 challenge server")?;
let mut challenge = authz.challenge(ChallengeType::Http01)
.ok_or_else(|| anyhow!("ACME server did not offer HTTP-01 challenge"))?;1. Nothing in the code objects, and the firewall docs already bless the shape: "If you've configured your own reverse proxy for Edge, then expose the reverse proxy with your preference." Edge's HTTPS port is configurable in any case ( 2. The port survives Core's URL construction, and there is an upstream test for exactly your case: 3. Yes, permanently, if you use the built-in flow. Renewal is unattended and fires on whichever daily tick first lands inside the 14-day window, so there is no slot you can open on demand. Edge holds :80 only for the challenge itself ( 4. No, not for ACME. HTTP-01 is the only challenge implemented; TLS-ALPN-01, the one that would need 443, is not. Let's Encrypt's docs are explicit: HTTP-01 "can only be done on port 80", TLS-ALPN-01 is "performed via TLS on port 443". The "open TCP 443" in the firewall docs is about clients reaching Edge, which is the part you are moving to 8443. 5. Not currently; upstream's own wording is "currently uses the ACME HTTP-01 challenge". Since acme.sh with DNS-01 already works for you, I would skip the built-in flow and drop the scp instead. Core stores an uploaded PEM and pushes it to every connected Edge over the existing gRPC control channel, with no file copy: ( If you would rather keep nginx terminating TLS, which is closest to what you run today, the setting is One trap either way, on a DMZ VM that already runs nginx: the ACME listener binds :80 on all interfaces, and the graceful hand-off covers only Defguard's own HTTP server, and only when The Defguard side above is read from the source at v2.0.2 (unchanged in v2.0.3), not from running it. The nginx-terminating-TLS-in-front half is what I run. |
The built-in Let's Encrypt is HTTP-01 only, and the challenge listener is hard-coded to
0.0.0.0:80on Edge. It is not--http-portand it cannot be moved. Upstream documents the requirement; the source shows it is not configurable: