| Description | This article describes how to troubleshoot and resolve the Let's Encrypt certificate renewal error. Specifically, it addresses the issue: 'Domain authorization for vpn.example.com failed. CA considers answer to challenge invalid'. |
| Scope | FortiGate, Let's Encrypt Certificates, ACME certificate. |
| Solution |
When attempting to renew an ACME certificate, the process may fail with the following error message:
diagnose sys acme status-full vpn.example.com
{
This issue occurs when the FortiGate's public-facing interface is configured to use a custom HTTPS management port (for example, 4443) instead of the default port 443. During the ACME domain validation process, the certificate authority (CA) attempts to connect to the domain over port 443. If the FortiGate is listening for management traffic on another port, the validation request is not correctly handled, causing the authorization to fail.
To resolve the issue: Temporarily change the management port to 443:
config system global set admin-sport 443 end
Note: This may conflict with the IKE-TCP port, and IKE takes precedence over HTTPS, resulting in the loss of GUI access on that interface. To fix it, temporarily change the IKE TCP port as well.
config system settings
Retry the certificate renewal process:
diagnose sys acme regenerate-client-config
diagnose sys acme status-full vpn.example.com
After a successful renewal, revert the management port to the preferred custom port (eg, 4443) and IKE TCP port.
config system global set admin-sport 4443 end
config system settings
To automate it for every Acme renewal, configure automation stitch as below.
config system automation-trigger edit "Cert-Update-Failed" end
config system automation-action next
config system automation-stitch edit "ACME-CERT-Updated"
Note: Make sure to change the custom port to the preferred port. In this example, port 4443 was used.
Related documents: Troubleshooting Tip: Let’s Encrypt certificate did not automatically renew Technical Tip: Change the port for the admin access to the firewall |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.