├── README ├── TODO ├── configs ├── apache2 │ ├── https-hsts.conf │ ├── https-redirect-rewrite.conf │ └── https-redirect.conf ├── gnupg │ └── gpg.conf ├── iis │ ├── disable_weak_ssl.reg │ ├── hsts_header_iis6.bat │ └── hsts_header_iis7.bat ├── lighttpd │ └── lighttpd.conf ├── nginx │ └── nginx.conf ├── postfix │ └── main.cf └── sshd │ └── sshd-pfs_config └── startssl ├── README.markdown ├── startssl-account.png ├── startssl-adddomains.png ├── startssl-certtype.png ├── startssl-clientsidecert.png ├── startssl-code2.png ├── startssl-cp.png ├── startssl-csr.png ├── startssl-genkey.png ├── startssl-genprivkey.png ├── startssl-savecert.png ├── startssl-seldomains.png ├── startssl-selemail.png ├── startssl-signup.png ├── startssl-valok.png ├── startssl-valtype.png └── startssl-verify1.png /README: -------------------------------------------------------------------------------- 1 | duraconf - A collection of hardened configuration files for SSL/TLS services 2 | 3 | Hopefully this will help you make a more informed choice about what cipher list 4 | should be used for different applications. What you find here are recommended 5 | configurations, you should seriously consider using these, but you have to make 6 | some choices. When you pick a cipher list, you have a couple different options 7 | of how you go about it: 8 | 9 | 1. make a very specific declaration of what is acceptable. This has the 10 | advantage of being able to define very closely of what you want, but the 11 | disadvantage of having to stay on top of the latest crypto advancements, with 12 | every crypto library upgrade. 13 | 14 | 2. make a general declaration of which cipher list to use. this has the 15 | advantage of allowing you to rely on your crypto libraries to make 16 | (hopefully) informed choices for you (and to deactivate known 17 | bad/weak/recently broken) ciphers while you don't have the burden of ensuring 18 | that they are always resulting in a good cipher suite. The disadvantage is 19 | that you cannot fine tune what exactly you get in return. 20 | 21 | 3. A mixture of being specific and letting your crypto library decide from 22 | general statements. This can be useful if, for example, you find out that 23 | some particular crypto has become too weak, for example you might use a 24 | generic list but then exclude MD5, because your crypto libraries haven't 25 | removed that yet. 26 | 27 | 4. Decide on a threat model for possible attacks that may expose an important 28 | private key. Ciphers are often offered in a mode that provides Perfect 29 | Forward Secrecy. While there are performance considerations, if you run a 30 | high security operation where traffic disclosure would be a serious problem, 31 | it is an important property to consider. 32 | 33 | Generally it seems safer to have the crypto library take the bulk of the 34 | decision since it should be for the most part fire-and-forget, while the other 35 | options require that you always stay up to date on things and tweak as needed. 36 | 37 | For practical use, and for people who can afford to follow crypto news, a 38 | mixture of both is surely a good idea. So start with the general cipher list and 39 | when you become aware that something is bad then just add this specific part to 40 | your otherwise general cipher list until the crypto library defaults get updated 41 | to fix that. 42 | 43 | Unfortunately, its not possible to come up with one cipher configuration that is 44 | going to work for all configurations. There are many different programs that 45 | implement different versions of libraries that have different ciphers 46 | available. In fact, a different versions of the same program may be linked 47 | against different libraries which have different ciphers available. 48 | 49 | An important configuration issue for service operators and users is 50 | understanding Perfect Forward Secrecy. Generally, PFS sessions are 51 | computationally more expensive than connections without PFS properties. 52 | 53 | It is extremely important to remember that using SSL and/or TLS does not ensure 54 | that your traffic is encrypted for all time. Generally, SSL/TLS services offer 55 | two general modes of operation - one mode is ephemerally keyed and the other is not. 56 | 57 | A TLS server that only offers AES256-SHA is strong against an attacker who will 58 | never recover the secret key used by the server and cannot break AES256. 59 | However, if an attacker is able to recover the server's key, the attacker will be able 60 | to retroactively decrypt all traffic that has been recorded where the AES256-SHA 61 | cipher was used. If that same server uses an ephemeral cipher such as 62 | DHE-RSA-AES256-SHA, the attacker cannot recover previous encrypted sesssions 63 | without breaking RSA and/or AES256 for *each* session. 64 | 65 | In both cases, when the attacker has the private key, all future communications 66 | with the server are unsafe. Clients generally deal with this by looking up a 67 | revokation list or by using something like the OCSP. Realistically, they're in 68 | a lot of trouble and that kind of trouble is out of scope. If you're in doubt 69 | it's probably a reasonable thing to use DHE or EDH modes unless you have load 70 | issues. 71 | 72 | The cipher lists you will find here actually vary depending on which version of 73 | the crypto library that you have. For example, if you were to find this list 74 | recommended: 75 | 76 | HIGH:MEDIUM:!aNULL:!SSLv2:!MD5:@STRENGTH 77 | 78 | In one version of openssl this will mean the following list of ciphers: 79 | 80 | $ openssl ciphers -v 'HIGH:MEDIUM:!aNULL:!SSLv2:!MD5:@STRENGTH' 81 | 82 | DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1 83 | DHE-DSS-AES256-SHA SSLv3 Kx=DH Au=DSS Enc=AES(256) Mac=SHA1 84 | AES256-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(256) Mac=SHA1 85 | EDH-RSA-DES-CBC3-SHA SSLv3 Kx=DH Au=RSA Enc=3DES(168) Mac=SHA1 86 | EDH-DSS-DES-CBC3-SHA SSLv3 Kx=DH Au=DSS Enc=3DES(168) Mac=SHA1 87 | DES-CBC3-SHA SSLv3 Kx=RSA Au=RSA Enc=3DES(168) Mac=SHA1 88 | DHE-RSA-AES128-SHA SSLv3 Kx=DH Au=RSA Enc=AES(128) Mac=SHA1 89 | DHE-DSS-AES128-SHA SSLv3 Kx=DH Au=DSS Enc=AES(128) Mac=SHA1 90 | AES128-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(128) Mac=SHA1 91 | RC4-SHA SSLv3 Kx=RSA Au=RSA Enc=RC4(128) Mac=SHA1 92 | 93 | In a newer openssl, this list of ciphers will be different: 94 | 95 | $ openssl ciphers -v 'HIGH:MEDIUM:!aNULL:!SSLv2:!MD5:@STRENGTH' 96 | 97 | ECDH-RSA-AES128-SHA SSLv3 Kx=ECDH/RSA Au=ECDH Enc=AES(128) Mac=SHA1 98 | ECDH-ECDSA-AES128-SHA SSLv3 Kx=ECDH/ECDSA Au=ECDH Enc=AES(128) Mac=SHA1 99 | AES128-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(128) Mac=SHA1 100 | CAMELLIA128-SHA SSLv3 Kx=RSA Au=RSA Enc=Camellia(128) Mac=SHA1 101 | PSK-AES128-CBC-SHA SSLv3 Kx=PSK Au=PSK Enc=AES(128) Mac=SHA1 102 | 103 | 104 | It is also worth noting that this is setting a policy, and your site may have 105 | different policies, depending on your intended audience. There are many 106 | questions to consider in determining a policy. For example, in the worst case, 107 | when a client doesn't support the higher strength ciphers my server supports, do 108 | I want to keep up the image that medium strength ciphers are secure enough in my 109 | specific use case, environment and opponents? Or should I not allow anything but 110 | the highest strength ciphers, and those clients that do not support them are 111 | just denied? Its likely that in many cases there is no possibility of making it 112 | clear to the user that their setup does not allow for secure use of your 113 | services, and what their options are. I _think_, at least with apache, it 114 | should be possible to redirect users whose setup doesn't provide a compatible 115 | cipher suite, to an informational web page which explains further steps they can 116 | and should take (i have no idea how).. 117 | 118 | Unfortunately, in most cases, users will not get any message at all and they 119 | will have no clue why they are shut out. This could result in unhappy users with 120 | no idea of where to turn, and potentially a higher support burden. 121 | 122 | Notes on format of cipher designations 123 | -------------------------------------- 124 | 125 | Format of cipher designations differ, but in general they follow the format 126 | described in ciphers(5). A few notes: 127 | 128 | The order specified is the preference order, and the list is separated by 129 | colons. The list can be specific ciphers (eg. RC4-SHA), a list of suites 130 | containing a certain algorith (SHA1), or a cipher suite of a certain type 131 | (TLSv1). There are also cipher strings which are a grouping of different ciphers 132 | into a specific category (eg. HIGH). 133 | 134 | When removing ciphers that you do not want, you have a choice between indicating 135 | ! or -, the difference is subtle but important. It's good practice to use ! if 136 | you really do not want this class to ever get used, and to use - when you want 137 | to allow them to be still used if you later added something to your existing 138 | cipher list. 139 | 140 | Finally, there is also the @STRENGTH parameter, which sorts the cipher list in 141 | order of encryption algorithm key length. 142 | 143 | Suggested reading 144 | ----------------- 145 | 146 | https://www.eff.org/pages/how-deploy-https-correctly 147 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | It would be useful to have cipher hardened SSL/TLS configurations for: 2 | 3 | varnish 4 | stunnel 5 | ejabberd 6 | MTAs (postfix, exim, etc.) 7 | IPSec 8 | imap/pop (courier/dovecot) 9 | other starttls services 10 | 11 | openssh 12 | 13 | This is probably the optimal cipher suite for most modern sites: 14 | 'ECDHE-RSA-AES128-SHA:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:EDH-RSA-DES-CBC3-SHA:AES128-SHA:RC4-SHA:AES256-SHA:DES-CBC3-SHA' 15 | 16 | It would also be useful to have code samples that ensure using popular SSL/TLS 17 | libraries is safe, when possible. 18 | -------------------------------------------------------------------------------- /configs/apache2/https-hsts.conf: -------------------------------------------------------------------------------- 1 | # 2 | # This is an example of a medium security, highly compatible SSLv3 and TLSv1 3 | # enabled HTTPS server. The server prefers modes that provide perfect forward 4 | # secrecy but does not require it. Anonymous cipher modes are disabled. This 5 | # configuation also includes the HSTS header to ensure that users do not 6 | # accidentally connect to an insecure HTTP service after their first visit. The 7 | # HSTS header is set to expire after six earth months. 8 | # 9 | # Supported Server Cipher(s): 10 | # Accepted SSLv3 256 bits DHE-RSA-AES256-SHA 11 | # Accepted SSLv3 256 bits AES256-SHA 12 | # Accepted SSLv3 128 bits DHE-RSA-AES128-SHA 13 | # Accepted SSLv3 128 bits AES128-SHA 14 | # Accepted SSLv3 168 bits EDH-RSA-DES-CBC3-SHA 15 | # Accepted SSLv3 168 bits DES-CBC3-SHA 16 | # Accepted TLSv1 256 bits DHE-RSA-AES256-SHA 17 | # Accepted TLSv1 256 bits AES256-SHA 18 | # Accepted TLSv1 128 bits DHE-RSA-AES128-SHA 19 | # Accepted TLSv1 128 bits AES128-SHA 20 | # Accepted TLSv1 168 bits EDH-RSA-DES-CBC3-SHA 21 | # Accepted TLSv1 168 bits DES-CBC3-SHA 22 | # 23 | # Prefered Server Cipher(s): 24 | # SSLv3 256 bits DHE-RSA-AES256-SHA 25 | # TLSv1 256 bits DHE-RSA-AES256-SHA 26 | # 27 | # This configuration requires mod_headers, mod_ssl, it binds to TCP port 443, it only 28 | # logs errors, and disables the server signature. 29 | # 30 | 31 | NameVirtualHost 1.2.3.4:443 32 | 33 | 34 | ServerAdmin webmaster@example.com 35 | ServerName www.example.com 36 | ServerAlias wiki.example.com example.com 37 | 38 | SSLEngine on 39 | SSLCertificateFile /etc/apache2/ssl/www.example.com.crt 40 | SSLCertificateKeyFile /etc/apache2/ssl/www.example.com.key 41 | 42 | SSLProtocol -ALL +SSLv3 +TLSv1 +TLSv1.1 +TLSv1.2 43 | SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:!RC4:HIGH:!MD5:!aNULL:!EDH 44 | SSLHonorCipherOrder on 45 | SSLCompression off 46 | 47 | # Add six earth month HSTS header for all users... 48 | Header add Strict-Transport-Security "max-age=15768000" 49 | # If you want to protect all subdomains, use the following header 50 | # Strict-Transport-Security: max-age=15768000 ; includeSubDomains 51 | 52 | DocumentRoot /var/www/https-root/ 53 | 54 | ErrorLog /var/log/apache2/https-error.log 55 | 56 | # Possible values include: debug, info, notice, warn, error, crit, 57 | # alert, emerg. 58 | LogLevel warn 59 | 60 | ServerSignature Off 61 | 62 | 63 | -------------------------------------------------------------------------------- /configs/apache2/https-redirect-rewrite.conf: -------------------------------------------------------------------------------- 1 | # 2 | # This is an example of how to redirect any normal HTTP connections on port 3 | # 80 of multiple hosts to the same host, keeping the subdomain, path and 4 | # parameters part of the uri but on HTTPS. 5 | # 6 | # It shouldn't be necessary on a new website but is required for a website 7 | # converting from http to https and wanting to keep all previous links 8 | # valid. 9 | # 10 | # Note that mod_rewrite require more computing power than mod_alias and isn't 11 | # always available. But contrary to mod_alias you don't have to create one 12 | # configuration per subdomain. You could use a wilcard ServerName and never 13 | # look at it again in the future knowing that whatever subdomain your user hit 14 | # it will be redirected to https or list all your https-available subdomains 15 | # in the ServerAlias. 16 | # 17 | # This configuration requires mod_rewrite, it only logs errors, and 18 | # disables the server signature. 19 | # 20 | 21 | NameVirtualHost 1.2.3.4:80 22 | 23 | 24 | ServerAdmin webmaster@example.com 25 | ServerName example.com 26 | ServerAlias wiki.example.com www.example.com *.users.example.com 27 | 28 | RewriteEngine On 29 | RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=permanent] 30 | 31 | ErrorLog /var/log/apache2/https-redirect-error.log 32 | # Possible values include: debug, info, notice, warn, error, crit, 33 | # alert, emerg. 34 | LogLevel warn 35 | 36 | ServerSignature Off 37 | 38 | 39 | -------------------------------------------------------------------------------- /configs/apache2/https-redirect.conf: -------------------------------------------------------------------------------- 1 | # 2 | # This is an example of how to redirect any normal HTTP connections on port 80 3 | # to https://www.example.com/ 4 | # 5 | # This configuration requires mod_redirect, it only logs errors, and disables 6 | # the server signature. 7 | # 8 | 9 | NameVirtualHost 1.2.3.4:80 10 | 11 | 12 | ServerAdmin webmaster@example.com 13 | ServerName example.com 14 | ServerAlias wiki.example.com www.example.com 15 | RedirectPermanent / https://www.example.com/ 16 | 17 | ErrorLog /var/log/apache2/https-redirect-error.log 18 | # Possible values include: debug, info, notice, warn, error, crit, 19 | # alert, emerg. 20 | LogLevel warn 21 | 22 | ServerSignature Off 23 | 24 | 25 | -------------------------------------------------------------------------------- /configs/gnupg/gpg.conf: -------------------------------------------------------------------------------- 1 | # It may make things easier to always add yourself as a recipient and to trust your master key even if it's kept offline 2 | #default-key YOURLONGKEYIDHERE 3 | #trusted-key YOURLONGKEYIDHERE 4 | #hidden-encrypt-to YOURLONGKEYIDHERE 5 | default-recipient-self 6 | 7 | # You should decide exactly what each certification level means for you, and publish that, so that others can decide whether to trust you. Specifying a confidence level for certifications is helpful if you use the web of trust. 8 | ask-cert-level 9 | #cert-policy-url https://your-certification-policy-url 10 | 11 | # GPG's greeting is annoying. 12 | no-greeting 13 | 14 | # You probably want to see what's actually going on when you list things. Long keyIDs make you harder to spoof. 15 | list-options no-show-photos show-uid-validity no-show-unusable-uids no-show-unusable-subkeys show-keyring show-policy-urls show-notations show-keyserver-urls show-sig-expire 16 | verify-options show-uid-validity 17 | fixed-list-mode 18 | keyid-format 0xlong 19 | 20 | # There isn't any reason to accept weak algorithms anywhere. That's the maximum s2k-count, and it makes your passphrase much harder to bruteforce if someone finds your key. You need to change your passphrase for it to take effect, though. 21 | personal-digest-preferences SHA512 22 | personal-cipher-preferences AES256 AES192 AES 23 | cert-digest-algo SHA512 24 | default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed 25 | s2k-cipher-algo AES256 26 | s2k-digest-algo SHA512 27 | s2k-mode 3 28 | s2k-count 65011712 -------------------------------------------------------------------------------- /configs/iis/disable_weak_ssl.reg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/configs/iis/disable_weak_ssl.reg -------------------------------------------------------------------------------- /configs/iis/hsts_header_iis6.bat: -------------------------------------------------------------------------------- 1 | rem This will set the HSTS header in IIS 6.x to the max-age of 15768000 2 | rem This relies on the IIS administrative scripts being installed and being in the default location. 3 | 4 | cscript c:\inetpub\AdminScripts\adsutil.vbs set w3svc/HttpCustomHeaders "Strict-Transport-Security: max-age=15768000" -------------------------------------------------------------------------------- /configs/iis/hsts_header_iis7.bat: -------------------------------------------------------------------------------- 1 | rem This will set the HSTS header in IIS 7.x to the max-age of 15768000 2 | rem For more information on setting custom headers, and appcmd: 3 | rem See http://technet.microsoft.com/en-us/library/cc753133(WS.10).aspx 4 | rem See http://technet.microsoft.com/en-us/library/cc772200(WS.10).aspx 5 | 6 | %windir%\system32\inetsrv\appcmd set config /section:httpProtocol /+customHeaders.[name='Strict-Transport-Security',value='max-age=15768000'] 7 | -------------------------------------------------------------------------------- /configs/lighttpd/lighttpd.conf: -------------------------------------------------------------------------------- 1 | # For HSTS, ssl comes builtin 2 | server.modules += ( "mod_setenv" ) 3 | 4 | $SERVER["socket"] == "1.2.3.4:443" { 5 | ssl.engine = "enable" 6 | ssl.honor-cipher-order = "enable" 7 | ssl.cipher-list = "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:!RC4:HIGH:!MD5:!aNULL:!EDH" 8 | ssl.use-compression = "disable" 9 | ssl.use-sslv2 = "disable" 10 | ssl.pemfile = "example.pem" 11 | ssl.ca-file = "example-ca-file.crt" 12 | setenv.add-response-header = ( "Strict-Transport-Security" => "max-age=31536000") 13 | } 14 | 15 | # Other default settings are sane: 16 | # http://redmine.lighttpd.net/projects/lighttpd/repository/entry/tags/lighttpd-1.4.33/src/configfile.c#L181 17 | # 18 | # More documentation here: 19 | # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_SSL 20 | 21 | -------------------------------------------------------------------------------- /configs/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | # 2 | # This is an example of a high security, somewhat compatible SSLv3 and TLSv1 3 | # enabled HTTPS proxy server. The server only allows modes that provide perfect 4 | # forward secrecy; no other modes are offered. Anonymous cipher modes are 5 | # disabled. This configuation does not include the HSTS header to ensure that 6 | # users do not accidentally connect to an insecure HTTP service after their 7 | # first visit. This configuration will automatically redirect all traffic on 8 | # TCP port 80 to TCP port 443. All traffic requested will be redirected through 9 | # a local HTTP proxy. This configuration file is what powers tor2web.com. 10 | # 11 | # Supported Server Cipher(s): 12 | # Accepted SSLv3 256 bits DHE-RSA-AES256-SHA 13 | # Accepted SSLv3 128 bits DHE-RSA-AES128-SHA 14 | # Accepted SSLv3 168 bits EDH-RSA-DES-CBC3-SHA 15 | # Accepted TLSv1 256 bits DHE-RSA-AES256-SHA 16 | # Accepted TLSv1 128 bits DHE-RSA-AES128-SHA 17 | # Accepted TLSv1 168 bits EDH-RSA-DES-CBC3-SHA 18 | # 19 | # Prefered Server Cipher(s): 20 | # SSLv3 256 bits DHE-RSA-AES256-SHA 21 | # TLSv1 256 bits DHE-RSA-AES256-SHA 22 | # 23 | # This configuration requires a modern nginx server linked against openssl, it 24 | # binds to TCP port 443 and TCP port 80, it only logs errors, drops privs from 25 | # root to www-data, and disables the server signature. 26 | # 27 | 28 | user www-data; 29 | worker_processes 1; 30 | 31 | error_log /var/log/nginx/error.log; 32 | pid /var/run/nginx.pid; 33 | 34 | events { 35 | worker_connections 1024; 36 | # multi_accept on; 37 | } 38 | 39 | http { 40 | include /etc/nginx/mime.types; 41 | sendfile on; 42 | #tcp_nopush on; 43 | #keepalive_timeout 0; 44 | keepalive_timeout 65; 45 | tcp_nodelay on; 46 | #gzip on; 47 | #gzip_disable "MSIE [1-6]\.(?!.*SV1)"; 48 | 49 | proxy_cache_key $scheme$host$request_uri; 50 | proxy_cache_path /var/cache/nginx/cached levels=2:2 51 | keys_zone=global:64m inactive=60m max_size=1G; 52 | 53 | server { 54 | listen 1.2.3.4:80; 55 | return 301 https://$host$request_uri; 56 | } 57 | server { 58 | listen 1.2.3.4:443 default ssl; 59 | ssl_certificate /etc/nginx/example.com.crt; 60 | ssl_certificate_key /etc/nginx/example.com.key; 61 | ssl_prefer_server_ciphers on; 62 | ssl_session_cache shared:SSL:10m; 63 | ssl_session_timeout 10m; 64 | 65 | # Only strong ciphers in PFS mode 66 | ssl_ciphers ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA; 67 | ssl_protocols SSLv3 TLSv1; 68 | 69 | # For ssl client certificates, edit ssl_client_certificate 70 | # (specifies a file containing permissable CAs) and uncomment the 71 | # following: 72 | #ssl_verify_client optional; 73 | #ssl_client_certificate /etc/ssl/ca.crt 74 | 75 | server_name example.com; 76 | location / { 77 | # Uncomment to route requests through Tor. 78 | # proxy_pass http://127.0.0.1:8118; 79 | # proxy_set_header Host $server_id.onion; 80 | # proxy_read_timeout 2000; 81 | 82 | if ($host ~* (.*).example.com) { 83 | set $server_id $1; 84 | } 85 | # 31536000 == 1 year 86 | add_header Strict-Transport-Security "max-age=31536000; includeSubdomains"; 87 | add_header X-Frame-Options DENY; 88 | proxy_cache global; 89 | proxy_cache_valid any 1h; 90 | proxy_cache_use_stale updating; 91 | 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /configs/postfix/main.cf: -------------------------------------------------------------------------------- 1 | 2 | # This is an example of a high security TLSv1 enabled STARTTLS postfix server 3 | # The server only allows modes that provide perfect forward secrecy, they are 4 | # required. Anonymous cipher modes are disabled. 5 | # 6 | # Supported Server Cipher(s): 7 | # Accepted TLSv1 256 bits DHE-RSA-AES256-SHA 8 | # Accepted TLSv1 128 bits DHE-RSA-AES128-SHA 9 | # 10 | # Prefered Server Cipher(s): 11 | # TLSv1 256 bits DHE-RSA-AES256-SHA 12 | # 13 | # Add the following to an already configured Postfix main.cf and place {private 14 | # key, cert} in /etc/postfix/example.com-{key,cert}.pem; if you don't want to 15 | # pay a CA for a cert, it is reasonable to generate a key like so: 16 | # 17 | # openssl genrsa -out noisebridge.net-key.pem 128 18 | # openssl req -new -x509 -key noisebridge.net-key.pem -out noisebridge.net-cert.pem 19 | # 20 | # If you want to pay for a CA cert, see your CA vendor for cert req generation info. 21 | # 22 | # This configuration requires postfix 2.5.x linked against a modern openssl 23 | # (such as libssl0.9.8) for TLS support. 24 | # 25 | smtpd_tls_cert_file=/etc/postfix/noisebridge.net-cert.pem 26 | smtpd_tls_key_file=/etc/postfix/noisebridge.net-key.pem 27 | smtpd_tls_ciphers = high 28 | smtpd_tls_exclude_ciphers = aNULL, MD5, DES, 3DES, DES-CBC3-SHA, RC4-SHA, AES256-SHA, AES128-SHA 29 | smtpd_use_tls =yes 30 | smtp_tls_protocols = !SSLv2, SSLv3, TLSv1 31 | smtpd_tls_mandatory_protocols = TLSv1 32 | smtp_tls_note_starttls_offer = yes 33 | smtpd_tls_received_header = yes 34 | smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache 35 | smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache 36 | 37 | -------------------------------------------------------------------------------- /configs/sshd/sshd-pfs_config: -------------------------------------------------------------------------------- 1 | # Specifies the ciphers allowed for protocol version 2. 2 | # The default is: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256, 3 | # arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc, 4 | # aes256-cbc,arcfour 5 | Ciphers aes256-ctr 6 | 7 | # Specifies the available MAC (message authentication code) algorithms. 8 | # The default is: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160, 9 | # hmac-sha1-96,hmac-md5-96,hmac-sha2-256,hmac-sha256-96,hmac-sha2-512, 10 | # hmac-sha2-512-96 11 | MACs hmac-sha2-512 12 | -------------------------------------------------------------------------------- /startssl/README.markdown: -------------------------------------------------------------------------------- 1 | # Getting a free certificate 2 | 3 | This page guides you through the process of obtaining an HTTPS certificate for your site. This is a real certificate, not a self-signed certificate, and works in all major browsers. 4 | 5 | The CA which we'll use is StartSSL. They provide basic certificates for free, although will charge for other types, such as wildcard certificates. 6 | 7 | ## Generating a public/private keypair 8 | 9 | A keypair can be generated with OpenSSL: 10 | 11 | openssl req -new -newkey rsa:2048 -keyout example.com.key -nodes -out example.com.csr 12 | 13 | This command will prompt you for a country name, state name etc. *All of this can be ignored*. Just hit enter to accept the defaults because StartSSL doesn't use that information. 14 | 15 | The only value you may want to give is a passphrase to protect the private key. Keep in mind that your webserver needs the private key so, if you set a passphrase, you'll need to enter it whenever you restart the webserver. 16 | 17 | Now that we have a key, we can get a certificate issued by the CA. 18 | 19 | ## StartSSL 20 | 21 | StartSSL is free, but it's not the best designed website in the world. Below is a series of screenshots which will hopefully guide you through the process. Not absolutely every step has a screenshot so do the obvious thing at each step. If you need to click something then the screenshot may have a red ring around the the target. 22 | 23 | Firstly, *use Firefox*. Seriously. 24 | 25 | Go to [StartSSL](https://startssl.com) (it should have an EV certificate). On the frontpage, click “Control Panel” at the top-right to get started. 26 | 27 | We assume that you've never used StartSSL before so need to sign up: 28 | 29 | ![StartSSL signup page](../../../raw/master/startssl/startssl-signup.png) 30 | 31 | Enter your details: 32 | 33 | ![StartSSL account page](../../../raw/master/startssl/startssl-account.png) 34 | 35 | You'll need to verify the email address by entering the magic value that is sent to you: 36 | 37 | ![](../../../raw/master/startssl/startssl-verify1.png) 38 | 39 | StartSSL doesn't use passwords for accounts, it uses client-side certificates. You need to generate one and install it in your browser: 40 | 41 | ![](../../../raw/master/startssl/startssl-genkey.png) 42 | 43 | ![installing a client side certificate](../../../raw/master/startssl/startssl-clientsidecert.png) 44 | 45 | Once your account has been setup, you'll be at your "Control Panel". First you need to prove that you control the site that you are getting a certificate for. For free certificates, this means being able to accept email for some distinguished usernames. 46 | 47 | ![StartSSL control panel page](../../../raw/master/startssl/startssl-cp.png) 48 | 49 | You are validating a domain name. 50 | 51 | ![](../../../raw/master/startssl/startssl-valtype.png) 52 | 53 | You must be able to receive email for one of the distinguished usernames: 54 | 55 | ![selecting an email address](../../../raw/master/startssl/startssl-selemail.png) 56 | 57 | Wait for the email and enter the code contained in it into the textbox. 58 | 59 | ![](../../../raw/master/startssl/startssl-code2.png) 60 | 61 | Once you have proved that you own the domain, finished the validations wizard and enter the certificate wizard. 62 | 63 | ![](../../../raw/master/startssl/startssl-valok.png) 64 | 65 | You want an HTTPS certificate. 66 | 67 | ![selecting a certificate type](../../../raw/master/startssl/startssl-certtype.png) 68 | 69 | Select the domain that you just validated. 70 | 71 | ![selecting domains for the certificate](../../../raw/master/startssl/startssl-seldomains.png) 72 | 73 | I strongly recommend that you add a name for `www` to the certificate. 74 | 75 | ![](../../../raw/master/startssl/startssl-adddomains.png) 76 | 77 | This bit is important. *Skip the private key generation.* You already generated a private key at the very beginning. We're going to give StartSSL the public key to sign and the private key should never leave your control. 78 | 79 | ![skipping private key generation](../../../raw/master/startssl/startssl-genprivkey.png) 80 | 81 | The `openssl` command that you ran at the beginning created two files. One of them was a CSR file. You need to open this up and paste its contents into the textbox. It's a plain ASCII file so almost anything should open it. 82 | 83 | ![pasting in the CSR](../../../raw/master/startssl/startssl-csr.png) 84 | 85 | Now we're almost done! This is your signed certificate. Paste it somewhere safe. It's not secret, but you don't want to lose it! 86 | 87 | ![getting the final certificate](../../../raw/master/startssl/startssl-savecert.png) 88 | 89 | ## Intermediate certificates 90 | 91 | You must configure your webserver with the correct intermediate certificate in order for your certificate to work. You can download [StartSSL's intermediate CA certificate](https://www.startssl.com/certs/sub.class1.server.ca.pem). 92 | -------------------------------------------------------------------------------- /startssl/startssl-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-account.png -------------------------------------------------------------------------------- /startssl/startssl-adddomains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-adddomains.png -------------------------------------------------------------------------------- /startssl/startssl-certtype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-certtype.png -------------------------------------------------------------------------------- /startssl/startssl-clientsidecert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-clientsidecert.png -------------------------------------------------------------------------------- /startssl/startssl-code2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-code2.png -------------------------------------------------------------------------------- /startssl/startssl-cp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-cp.png -------------------------------------------------------------------------------- /startssl/startssl-csr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-csr.png -------------------------------------------------------------------------------- /startssl/startssl-genkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-genkey.png -------------------------------------------------------------------------------- /startssl/startssl-genprivkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-genprivkey.png -------------------------------------------------------------------------------- /startssl/startssl-savecert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-savecert.png -------------------------------------------------------------------------------- /startssl/startssl-seldomains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-seldomains.png -------------------------------------------------------------------------------- /startssl/startssl-selemail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-selemail.png -------------------------------------------------------------------------------- /startssl/startssl-signup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-signup.png -------------------------------------------------------------------------------- /startssl/startssl-valok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-valok.png -------------------------------------------------------------------------------- /startssl/startssl-valtype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-valtype.png -------------------------------------------------------------------------------- /startssl/startssl-verify1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EFForg/duraconf/704d150c35a769823b0e8d46ca49a8eec5ea5c75/startssl/startssl-verify1.png --------------------------------------------------------------------------------