# version 2020 feb 24 | |
ssl_certificate /etc/letsencrypt/live/yardomain.org/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/yardomain.org/privkey.pem; | |
ssl_trusted_certificate /etc/letsencrypt/live/yardomain.org/chain.pem; | |
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:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; | |
ssl_prefer_server_ciphers off; | |
# generated using:# openssl dhparam -dsaparam -out /etc/ssl/dh4096.pem 4096 | |
ssl_dhparam /etc/ssl/dh4096.pem; | |
ssl_ecdh_curve secp384r1; | |
ssl_stapling on; | |
ssl_stapling_verify on; | |
# I use local dnsmasq for faster lookups, highly recommend it! | |
resolver 127.0.0.1 [::1] valid=4h; | |
resolver_timeout 9s; | |
ssl_session_timeout 1d; | |
ssl_session_cache shared:MozSSL:18m; | |
ssl_session_tickets off; | |
ssl_buffer_size 4k; | |
include /etc/nginx/headers; |
This comment has been minimized.
This comment has been minimized.
All this is with letsencrypt certs, generated using certbot.. |
This comment has been minimized.
This comment has been minimized.
Came across this looking for a good cipher list -
is also an option if you don't have ipv6 support. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
my include /etc/nginx/headers file contents;
See https://hstspreload.org/ for the stuff relating to HSTS preload. Note that as soon as some nginx config (could be any snippet you use for a server) has a 'new' add_header entry, all previously set ones are gone. So, here's my pro tip: |
This comment has been minimized.
This comment has been minimized.
don't use |
This comment has been minimized.
Regarding the resolver entry: http://blog.zorinaq.com/nginx-resolver-vulns/
You can easily mitigate this (using dnsmasq, like I did, for example)..
Don't forget to add the ipv6 localhost, i.e. [::1]