index.html 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <!DOCTYPE html>
  2. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  3. <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <link rel="shortcut icon" href="../img/favicon.ico">
  9. <title>Sécurisation d'un serveur WEB - Les Tutoriels du Yojik</title>
  10. <link rel="stylesheet" href="../css/theme.css" />
  11. <link rel="stylesheet" href="../css/theme_extra.css" />
  12. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" />
  13. <script>
  14. // Current page data
  15. var mkdocs_page_name = "S\u00e9curisation d'un serveur WEB";
  16. var mkdocs_page_input_path = "S\u00e9curisation-Serveur-Web.md";
  17. var mkdocs_page_url = null;
  18. </script>
  19. <script src="../js/jquery-2.1.1.min.js" defer></script>
  20. <script src="../js/modernizr-2.8.3.min.js" defer></script>
  21. <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
  22. <script>hljs.initHighlightingOnLoad();</script>
  23. </head>
  24. <body class="wy-body-for-nav" role="document">
  25. <div class="wy-grid-for-nav">
  26. <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
  27. <div class="wy-side-scroll">
  28. <div class="wy-side-nav-search">
  29. <a href=".." class="icon icon-home"> Les Tutoriels du Yojik</a>
  30. <div role="search">
  31. <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
  32. <input type="text" name="q" placeholder="Search docs" title="Type search term here" />
  33. </form>
  34. </div>
  35. </div>
  36. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  37. <p class="caption"><span class="caption-text">Installation d'un serveur sécurisé, version Debian/Stretch (obsolète)</span></p>
  38. <ul>
  39. <li class="toctree-l1"><a class="reference internal" href="..">Présentation</a>
  40. </li>
  41. </ul>
  42. <p class="caption"><span class="caption-text">Installation</span></p>
  43. <ul class="current">
  44. <li class="toctree-l1"><a class="reference internal" href="../Installation-de-base/">Installation du système de base</a>
  45. </li>
  46. <li class="toctree-l1"><a class="reference internal" href="../ovh/">Démarrage sur serveur OVH</a>
  47. </li>
  48. <li class="toctree-l1"><a class="reference internal" href="../Premi%C3%A8re-Etape-S%C3%A9curisation/">Première étapes de sécurisation du serveur</a>
  49. </li>
  50. <li class="toctree-l1"><a class="reference internal" href="../Configuration-R%C3%A9seau/">Configuration du réseau</a>
  51. </li>
  52. <li class="toctree-l1"><a class="reference internal" href="../Installation-Serveur-Temps/">Installation d'un serveur de temps</a>
  53. </li>
  54. <li class="toctree-l1"><a class="reference internal" href="../Installation-Parre-Feu/">Installation d'un pare-feu</a>
  55. </li>
  56. <li class="toctree-l1"><a class="reference internal" href="../Installation-Fail2ban/">Contrer les attaques de brute-force avec fail2ban</a>
  57. </li>
  58. <li class="toctree-l1"><a class="reference internal" href="../Installation-Serveur-Courrier-Basique/">Installation d'un serveur de courrier basique</a>
  59. </li>
  60. <li class="toctree-l1"><a class="reference internal" href="../Installation-Serveur-DNS/">Installation du serveur DNS</a>
  61. </li>
  62. <li class="toctree-l1"><a class="reference internal" href="../Installation-Serveur-Web/">Installation d'un serveur web</a>
  63. </li>
  64. <li class="toctree-l1"><a class="reference internal" href="../Installation-Dovecot-Authentification/">Installation de dovecot et de l'authentification</a>
  65. </li>
  66. <li class="toctree-l1"><a class="reference internal" href="../Installation-Certificats-Letsencrypt/">Installation des certificats letsencrypt</a>
  67. </li>
  68. <li class="toctree-l1"><a class="reference internal" href="../Courrier-SPF-DKIM-OPENDMARC/">Ajout des enregistrements **spf**, **DKIM**, **DMARC** au fichier de zone DNS</a>
  69. </li>
  70. <li class="toctree-l1"><a class="reference internal" href="../Courrier-Comptes-Virtuels/">Ajout des comptes émail virtuels</a>
  71. </li>
  72. <li class="toctree-l1"><a class="reference internal" href="../Surveillance-Serveur/">Installation de programmes de surveillance du serveur</a>
  73. </li>
  74. <li class="toctree-l1"><a class="reference internal" href="../Installation-Webmail/">Installation d'un webmail (rainloop)</a>
  75. </li>
  76. <li class="toctree-l1 current"><a class="reference internal current" href="./">Sécurisation d'un serveur WEB</a>
  77. <ul class="current">
  78. <li class="toctree-l2"><a class="reference internal" href="#la-configuration-ssl">La configuration SSL</a>
  79. </li>
  80. <li class="toctree-l2"><a class="reference internal" href="#la-configuration-des-en-tetes">La configuration des en-têtes</a>
  81. </li>
  82. </ul>
  83. </li>
  84. </ul>
  85. </div>
  86. </div>
  87. </nav>
  88. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  89. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  90. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  91. <a href="..">Les Tutoriels du Yojik</a>
  92. </nav>
  93. <div class="wy-nav-content">
  94. <div class="rst-content">
  95. <div role="navigation" aria-label="breadcrumbs navigation">
  96. <ul class="wy-breadcrumbs">
  97. <li><a href="..">Docs</a> &raquo;</li>
  98. <li>Installation &raquo;</li>
  99. <li>Sécurisation d'un serveur WEB</li>
  100. <li class="wy-breadcrumbs-aside">
  101. </li>
  102. </ul>
  103. <hr/>
  104. </div>
  105. <div role="main">
  106. <div class="section">
  107. <h1 id="securisation-des-pages-web">Sécurisation des pages web</h1>
  108. <h2 id="la-configuration-ssl">La configuration SSL</h2>
  109. <p>La page <a href="https://mozilla.github.io/server-side-tls/ssl-config-generator/">Mozilla web server SSL config generator</a> permet de configurer mieux les pages servies par les serveurs web (apache pour moi), en donnant des règles concernant les certificats, les protocoles <strong>ssl.</strong></p>
  110. <p>Voilà un exemple de configuration générée par le site Mozilla indiqué ci-dessus:</p>
  111. <pre><code>&lt;VirtualHost *:443&gt;
  112. ...
  113. SSLEngine on
  114. SSLCertificateFile /path/to/signed_certificate_followed_by_intermediate_certs
  115. SSLCertificateKeyFile /path/to/private/key
  116. # Uncomment the following directive when using client certificate authentication
  117. #SSLCACertificateFile /path/to/ca_certs_for_client_authentication
  118. # HSTS (mod_headers is required) (15768000 seconds = 6 months)
  119. Header always set Strict-Transport-Security "max-age=15768000"
  120. ...
  121. &lt;/VirtualHost&gt;
  122. # modern configuration, tweak to your needs
  123. SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
  124. SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
  125. SSLHonorCipherOrder on
  126. SSLCompression off
  127. SSLSessionTickets off
  128. # OCSP Stapling, only in httpd 2.3.3 and later
  129. SSLUseStapling on
  130. SSLStaplingResponderTimeout 5
  131. SSLStaplingReturnResponderErrors off
  132. SSLStaplingCache shmcb:/var/run/ocsp(128000)
  133. </code></pre>
  134. <p>Il précise les protocoles recommandés ainsi que les méthodes de chiffrage actuellement sûres.</p>
  135. <h2 id="la-configuration-des-en-tetes">La configuration des en-têtes</h2>
  136. <p>Les entêtes sont envoyés aux clients, et ils sont libres de les respecter ou non ...
  137. On peut utiliser la page de test suivante pour configurer les entêtes renvoyés avec chaque page web: https://observatory.mozilla.org/analyze/www.yojik.net par exemple pour analyser le site www.yojik.net.</p>
  138. <p>Voilà un exemple de résultats, avec certains entêtes configurés et d'autres non; la note globale n'est pas bonne, et il faudra améliorer la configuration.</p>
  139. </div>
  140. </div>
  141. <footer>
  142. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  143. <a href="../Installation-Webmail/" class="btn btn-neutral" title="Installation d'un webmail (rainloop)"><span class="icon icon-circle-arrow-left"></span> Previous</a>
  144. </div>
  145. <hr/>
  146. <div role="contentinfo">
  147. <!-- Copyright etc -->
  148. </div>
  149. Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
  150. </footer>
  151. </div>
  152. </div>
  153. </section>
  154. </div>
  155. <div class="rst-versions" role="note" aria-label="versions">
  156. <span class="rst-current-version" data-toggle="rst-current-version">
  157. <span><a href="../Installation-Webmail/" style="color: #fcfcfc;">&laquo; Previous</a></span>
  158. </span>
  159. </div>
  160. <script>var base_url = '..';</script>
  161. <script src="../js/theme.js" defer></script>
  162. <script src="../search/main.js" defer></script>
  163. <script defer>
  164. window.onload = function () {
  165. SphinxRtdTheme.Navigation.enable(true);
  166. };
  167. </script>
  168. </body>
  169. </html>