Fortinet How to Configure
How to configure a FortiADC HTTPS virtual server with backend TLS
An HTTPS request can succeed at the FortiADC VIP while the connection from FortiADC to the application uses a different TLS profile. Configure both connections, then prove that the ADC rejects an untrusted backend certificate before you switch production traffic.
This procedure uses FortiADC 8.0.2, a Layer 7 HTTPS virtual server, and a two-member HTTPS pool. FortiADC terminates the client TLS session and opens a second TLS session to the selected server. Each session has its own certificate and trust settings. The menu paths and expected behavior below come from Fortinet's 8.0.2 documentation. The appliance test results still need to be captured. Layer 7 deployment guide
QuantumCrafters Studio · Guide 2 of 12
Two TLS handshakes
Trusted certificate
Client starts TLS with the virtual server
The ClientHello goes to the FortiADC virtual server, which has its own client SSL profile.
The backend connection has yet to start.
Before the change
| Item | Isolated lab setup |
|---|---|
| Client URL | https://app.example.test/healthz |
| FortiADC VIP | 10.42.10.50:443 on a test-facing interface |
| Backend pool members | 10.42.20.11:443 and 10.42.20.12:443 |
| Frontend certificate | Covers app.example.test and chains to the CA trusted by the test client |
| Backend certificates | Each member presents its own certificate and chain when it receives the app.example.test SNI. Both certificates are issued through the designated backend CA. |
| Application readiness | GET /healthz returns HTTP 200 with the body qcs-ready on ready instances |
Allow the test client to reach the VIP and the ADC to reach both members on TCP 443. Check the return path and system clock. Use the addresses and hostname allocated to your approved lab if they differ. Save the current VIP, pool, profile and certificate references in the change record. Back up configuration from System → Settings → Backup & Restore and retain it in the approved restricted location. FortiADC configuration backup
1. Configure the certificate presented at the VIP
- Go to System → Manage Certificates and import the application leaf certificate and its matching private key under Local Certificate. If the certificate needs intermediates, import them and build the intermediate CA group. Create a Local Certificate Group that references the leaf and its intermediate group.
- Go to Server Load Balance → Application Resources → Client SSL Profile and create
client-app-tls. Select the local certificate group. For this lab, allow TLS 1.2 and TLS 1.3 after checking client compatibility. - Leave Client Certificate Verify unset for this server-authenticated HTTPS setup. A client-certificate deployment needs its own mTLS policy and test plan.
Clients should receive a valid chain for app.example.test when connecting to the VIP. FortiADC certificate management, Client SSL profiles
2. Configure encryption and trust on the backend connection
- Go to System → Validate Certificates → CA → Create New → Import. Import the approved backend CA's public certificate. The servers retain their private keys.
- Go to System → Verify → Create New and name the object
verify-app-backend-ca. Leave Client Authentication disabled for this backend verification object. Save it, open Group Member → Create New, select the approved CA, and save the member and the object. If your policy requires revocation checks, configure CRL or OCSP and validate that behavior independently. - Go to Server Load Balance → Real Server Pool → Server SSL → Create New and create
server-app-tls. Enable SSL, select compatible TLS versions, and set Certificate Verify toverify-app-backend-ca. Enable SNI Forward Flag here because both backend instances expect the same hostname the test client requests. Save the profile.
SNI forwarding asks the server to select a certificate for the name sent by the client. Fortinet's profile documentation describes forwarding and CA verification separately. If your policy requires the ADC to enforce a backend name, make that a separate acceptance test on the target build. Importing a backend CA, Certificate verification, Real Server SSL profiles
3. Add a readiness check and attach the backend profile to the pool
- Under Shared Resources → Health Check, create
hc-app-https. Use type HTTPS, port443, method HTTP GET, Send String/healthz, Receive Stringqcs-ready, Status Code200, and Match Type Match All. For a virtual-hosted backend, check how the probe addresses the name on your build and confirm from server logs that it reaches the correct app. Choose an interval and failure threshold based on measured response time and how quickly you want a member removed. - In Server Load Balance → Real Server Pool, create the two addresses in the Real Server tab and add them to a static pool named
pool-app-https. Enable the health check and selecthc-app-https. Set Real Server SSL Profile toserver-app-tls. - Set each member's Port to
443and enable RS Profile Inherit and health-check inheritance. Inspect both saved members to make sure the pool settings take effect. Confirm that both report ready under healthy conditions.
The HTTPS readiness check establishes whether the application endpoint returns the expected result. Use the data-path tests in step 5 to establish what happens when a backend certificate fails verification. FortiADC health checks, Real server pools and member inheritance
4. Create the Layer 7 HTTPS virtual server
In Server Load Balance → Virtual Server, choose Create New → Advanced Mode. Set the virtual server to Layer 7, use the test VIP and interface, and listen on port 443. Keep its status Disable while assembling the configuration. In General, set the Profile to LB_PROF_HTTPS, the Client SSL Profile to client-app-tls, and the Real Server Pool to pool-app-https. Save the virtual server. Enable it on the isolated test interface when the pool, listener and certificates are ready. FortiADC virtual server configuration, HTTPS application profiles
5. Verify both TLS sessions and test failures
From the allowed test client, use the application hostname and pin it to the test VIP. This preserves hostname verification and sends the expected SNI.
curl --resolve app.example.test:443:10.42.10.50 \
--cacert ./front-lab-ca.pem --fail --silent --show-error \
https://app.example.test/healthz
Expect qcs-ready. Before introducing failures, repeat the valid transaction with each member selected in the test environment. For each request, correlate its time and target member with FortiADC traffic logs and backend logs. Confirm that the backend accepted TLS on port 443 and received the application request. Where supported, log the negotiated TLS version and SNI using your approved diagnostic tooling.
Run certificate failure tests with a separate single-member test VIP and pool using the same TLS profile. Keep the frontend certificate and request path constant. For each certificate change, force a fresh ADC-to-backend handshake in the isolated test and confirm it in logs. Starting a fresh client request alone can still leave an existing ADC-to-backend session in use. If the readiness probe removes the test member before FortiADC attempts the handshake, repeat the trust test with readiness polling disabled on that isolated pool only. Restore the probe before testing the readiness transition.
| Test | Expected behavior to record |
|---|---|
| Valid backend certificate | VIP request succeeds. The selected server logs the request over TLS. |
| Backend certificate from an untrusted lab CA | The request fails to reach the application successfully. Correlate the failure with backend TLS verification and confirm that the test request is absent from the application log. |
| Expired backend certificate from the approved lab CA | The backend handshake fails on a fresh connection. Record the timestamp, trust error and absence of a successful app request. |
| Certificate signed by the approved CA with a different SAN | Run this check if your policy requires backend name verification. Record the actual result. Hold the release if identity enforcement is required and the ADC allows the request. |
Valid TLS with /healthz returning HTTP 503 | The health check marks the member unavailable after the configured threshold. Confirm the TLS handshake remained valid and the readiness response was the trigger. |
| Restore the valid certificate and healthy response | The member becomes ready again. A new VIP transaction succeeds and reaches the member over TLS. |
Record the observed response and logs. The exact client-facing error on a backend failure can depend on the virtual-server and pool settings. FortiADC certificate validation criteria
Roll back and hand over
Before switching traffic, agree which conditions stop the release. Include a rejected valid certificate, a successful request with an untrusted certificate, or a failed readiness transition. During cutover, follow the agreed thresholds for TLS and application errors. If the canary fails, stop new traffic to the affected VIP. Use Maintain when the approved rollback calls for existing sessions to drain. Disable a failed test VIP when ending the test.
If traffic was switched, restore the previous approved VIP or pool and profile mapping, or the previous DNS target, according to the actual cutover method. Repeat the original application request and confirm the selected member in logs after restoring traffic. Preserve the backend trust requirement throughout rollback. FortiADC virtual server status and session behavior
Hand over a table of the VIP and pool mappings, the CA and certificate expiration dates, health check settings, and a test record for each expected pass and failure. Keep private keys, full configuration backups and sensitive logs in the approved restricted location.
