-
-
Notifications
You must be signed in to change notification settings - Fork 42
Remove dhparams.pem and update nginx configuration for improved security and compliance with Mozilla guidelines #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nemchik
wants to merge
2
commits into
3.23
Choose a base branch
from
mozilla-updates
base: 3.23
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+23
−42
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,36 @@ | ||
| ## Version 2025/12/26 - Changelog: https://github.com/linuxserver/docker-baseimage-alpine-nginx/commits/3.23/root/defaults/nginx/ssl.conf.sample | ||
|
|
||
| ### Mozilla Recommendations | ||
| # generated 2025-12-26, Mozilla Guideline v5.7, nginx 1.28.0, OpenSSL 3.5.4, intermediate config, no OCSP | ||
| # https://ssl-config.mozilla.org/#server=nginx&version=1.28&config=intermediate&openssl=3.5.4&ocsp=false&guideline=5.7 | ||
| ## Version 2026/05/04 - Changelog: https://github.com/linuxserver/docker-baseimage-alpine-nginx/commits/3.23/root/defaults/nginx/ssl.conf.sample | ||
|
|
||
| ssl_certificate /config/keys/cert.crt; | ||
| ssl_certificate_key /config/keys/cert.key; | ||
| ssl_session_timeout 1d; | ||
| ssl_session_cache shared:MozSSL:10m; # about 40000 sessions | ||
| ssl_session_tickets off; | ||
|
|
||
| # curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam | ||
| ssl_dhparam /config/nginx/dhparams.pem; | ||
| # HSTS (ngx_http_headers_module is required) (63072000 seconds) | ||
| #add_header Strict-Transport-Security "max-age=63072000" always; | ||
|
|
||
| ### Mozilla SSL Configuration Generator | ||
| # generated 2026-05-04, Mozilla Guideline v6.0, nginx 1.28.3, OpenSSL 3.5.6, intermediate config, HSTS | ||
| # https://ssl-config.mozilla.org/#server=nginx&version=1.28.3&config=intermediate&openssl=3.5.6&hsts&guideline=6.0 | ||
| # intermediate configuration | ||
| ssl_protocols TLSv1.2 TLSv1.3; | ||
| ssl_ecdh_curve X25519:prime256v1:secp384r1; | ||
| 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:DHE-RSA-CHACHA20-POLY1305; | ||
| ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1:secp384r1; | ||
| 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; | ||
|
|
||
| # HSTS (ngx_http_headers_module is required) (63072000 seconds) | ||
| #add_header Strict-Transport-Security "max-age=63072000" always; | ||
| # see also ssl_session_ticket_key alternative to stateful session cache | ||
| ssl_session_timeout 1d; | ||
| ssl_session_cache shared:MozSSL:10m; # about 40000 sessions | ||
|
|
||
| # Optional additional headers | ||
| #add_header Cache-Control "no-transform" always; | ||
| #add_header Content-Security-Policy "upgrade-insecure-requests; frame-ancestors 'self'" always; | ||
| #add_header Permissions-Policy "interest-cohort=()" always; | ||
| ### Mozilla Practical security implementation | ||
| # https://developer.mozilla.org/en-US/docs/Web/Security | ||
| #add_header Access-Control-Allow-Origin $http_origin always; | ||
| #add_header Content-Security-Policy "upgrade-insecure-requests; base-uri 'self'; form-action 'self'; frame-ancestors 'self';" always; | ||
| #add_header Cross-Origin-Resource-Policy "same-origin" always; | ||
| #add_header Referrer-Policy "same-origin" always; | ||
| #add_header X-Content-Type-Options "nosniff" always; | ||
| #add_header X-Frame-Options "SAMEORIGIN" always; | ||
| #add_header X-UA-Compatible "IE=Edge" always; | ||
| #add_header X-XSS-Protection "1; mode=block" always; | ||
|
|
||
| ### Optional additional headers | ||
| #add_header Alt-Svc 'h3=":443"' always; | ||
| #add_header Cache-Control "no-transform" always; | ||
| #add_header Permissions-Policy "interest-cohort=()" always; | ||
| #add_header X-UA-Compatible "IE=Edge" always; | ||
| #add_header X-XSS-Protection "1; mode=block" always; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.