Offer modern AEAD ciphers on nginx
Why it matters
The server offers only older CBC ciphers for TLS 1.2 and no TLS 1.3, so no client gets the modern authenticated ciphers (AES-GCM or ChaCha20). CBC suites have a history of attacks and are slower.
Staged change. Do this in stages and check each one before the next, so a mistake does not break your site or your mail.
The fix
- Find every existing setting with grep -Rn -E 'ssl_protocols|ssl_ciphers' /etc/nginx /etc/letsencrypt. nginx merges repeated ssl_protocols lines, and a server-level line (including certbot's options-ssl-nginx.conf) overrides http, so edit each existing line. Replace the ssl_ciphers value instead of adding a second line, which is an error, and make sure TLS 1.3 is allowed.
- Test with nginx -t and reload.
- Keep the previous lines commented out beside the new ones, so you can roll back by restoring them and reloading if a client you need breaks.
/ etc/ nginx/ nginx.conf
ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305; ssl_prefer_server_ciphers off;
Related
Scan your domain to see whether this applies to you.