index.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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>Réseau (des IPs fixes) - 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 = "R\u00e9seau (des IPs fixes)";
  16. var mkdocs_page_input_path = "Tutoriels/tutoraspi/R\u00e9seau.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">Home</span></p>
  38. <ul>
  39. <li class="toctree-l1"><a class="reference internal" href="../../..">Page d'accueil</a>
  40. </li>
  41. </ul>
  42. <p class="caption"><span class="caption-text">Tutoriels</span></p>
  43. <ul class="current">
  44. <li class="toctree-l1"><a class="reference internal" href="../../tutos/">Introduction</a>
  45. </li>
  46. <li class="toctree-l1"><a class="reference internal" href="#">Installation d'un serveur sécurisé, version Debian/Stretch (obsolète)</a>
  47. <ul>
  48. <li class="toctree-l2"><a class="reference internal" href="../../tutostretch/tutostretch/">Présentation</a>
  49. </li>
  50. <li class="toctree-l2"><a class="reference internal" href="#">Installation</a>
  51. <ul>
  52. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/Installation-de-base/">Installation du système de base</a>
  53. </li>
  54. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/ovh/">Démarrage sur serveur OVH</a>
  55. </li>
  56. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/Premi%C3%A8re-Etape-S%C3%A9curisation/">Première étapes de sécurisation du serveur</a>
  57. </li>
  58. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/Configuration-R%C3%A9seau/">Configuration du réseau</a>
  59. </li>
  60. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/Installation-Serveur-Temps/">Installation d'un serveur de temps</a>
  61. </li>
  62. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/Installation-Parre-Feu/">Installation d'un pare-feu</a>
  63. </li>
  64. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/Installation-Fail2ban/">Contrer les attaques de brute-force avec fail2ban</a>
  65. </li>
  66. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/Installation-Serveur-Courrier-Basique/">Installation d'un serveur de courrier basique</a>
  67. </li>
  68. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/Installation-Serveur-DNS/">Installation du serveur DNS</a>
  69. </li>
  70. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/Installation-Serveur-Web/">Installation d'un serveur web</a>
  71. </li>
  72. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/Installation-Dovecot-Authentification/">Installation de dovecot et de l'authentification</a>
  73. </li>
  74. <li class="toctree-l3"><a class="" href="../../tutostretch/Installation-Certificats-Letsencrypt.md)">Installation des certificats letsencrypt</a>
  75. </li>
  76. <li class="toctree-l3"><a class="" href="../../tutostretch/courrier-SPF-DKIM-OPENDMARC.md">Ajout des enregistrements **spf**, **DKIM**, **DMARC** au fichier de zone DNS</a>
  77. </li>
  78. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/Courrier-Comptes-Virtuels/">Ajout des comptes émail virtuels</a>
  79. </li>
  80. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/Surveillance-Serveur/">Installation de programmes de surveillance du serveur</a>
  81. </li>
  82. <li class="toctree-l3"><a class="reference internal" href="../../tutostretch/Installation-Webmail/">Installation d'un webmail (rainloop)</a>
  83. </li>
  84. <li class="toctree-l3"><a class="" href="../../tutostretch/Sécurisation-Serveur-Web">Sécurisation d'un serveur WEB</a>
  85. </li>
  86. </ul>
  87. </li>
  88. </ul>
  89. </li>
  90. <li class="toctree-l1"><a class="reference internal" href="#">Installation d'un serveur sécurisé, version Debian/Buster (en cours d'écriture)</a>
  91. <ul>
  92. <li class="toctree-l2"><a class="reference internal" href="../../tutobuster/1-tutobuster/">Présentation</a>
  93. </li>
  94. <li class="toctree-l2"><a class="reference internal" href="../../tutobuster/2-Installation-de-base/">Installation de base</a>
  95. </li>
  96. <li class="toctree-l2"><a class="reference internal" href="../../tutobuster/3-ovh/">Démarrage sur serveur OVH</a>
  97. </li>
  98. <li class="toctree-l2"><a class="reference internal" href="../../tutobuster/4-Plan/">Plan d'ensemble</a>
  99. </li>
  100. <li class="toctree-l2"><a class="reference internal" href="../../tutobuster/5-Premi%C3%A8re-Etape-S%C3%A9curisation/">Premières étapes de sécurisation du serveur</a>
  101. </li>
  102. </ul>
  103. </li>
  104. <li class="toctree-l1 current"><a class="reference internal current" href="#">Installation d'un serveur sécurisé, version Debian/Buster sur RaspberryPI</a>
  105. <ul class="current">
  106. <li class="toctree-l2"><a class="reference internal" href="../tutoraspi/">Présentation</a>
  107. </li>
  108. <li class="toctree-l2"><a class="reference internal" href="../Installation-de-base/">Installation de base</a>
  109. </li>
  110. <li class="toctree-l2"><a class="reference internal" href="../Premier-d%C3%A9marrage/">Premier démarrage</a>
  111. </li>
  112. <li class="toctree-l2"><a class="reference internal" href="../Etat-des-lieux/">État des lieux</a>
  113. </li>
  114. <li class="toctree-l2"><a class="reference internal" href="../S%C3%A9curisation-SSH/">Sécurisation SSH</a>
  115. </li>
  116. <li class="toctree-l2 current"><a class="reference internal current" href="./">Réseau (des IPs fixes)</a>
  117. <ul class="current">
  118. </ul>
  119. </li>
  120. <li class="toctree-l2"><a class="reference internal" href="../Knot/">Installation de Knot-resolver</a>
  121. </li>
  122. <li class="toctree-l2"><a class="reference internal" href="../Firewall/">Installation d'un pare-feux</a>
  123. </li>
  124. <li class="toctree-l2"><a class="reference internal" href="../Fail2ban/">Contrer les attaques de force brute</a>
  125. </li>
  126. <li class="toctree-l2"><a class="reference internal" href="../Logwatch/">Surveillance du serveur</a>
  127. </li>
  128. <li class="toctree-l2"><a class="reference internal" href="../Installation-courrier-basique/">Installation d'un serveur de courriers basique</a>
  129. </li>
  130. <li class="toctree-l2"><a class="reference internal" href="../Annexe/">Annexe</a>
  131. </li>
  132. </ul>
  133. </li>
  134. </ul>
  135. </div>
  136. </div>
  137. </nav>
  138. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  139. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  140. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  141. <a href="../../..">Les Tutoriels du Yojik</a>
  142. </nav>
  143. <div class="wy-nav-content">
  144. <div class="rst-content">
  145. <div role="navigation" aria-label="breadcrumbs navigation">
  146. <ul class="wy-breadcrumbs">
  147. <li><a href="../../..">Docs</a> &raquo;</li>
  148. <li>Installation d'un serveur sécurisé, version Debian/Buster sur RaspberryPI &raquo;</li>
  149. <li>Tutoriels &raquo;</li>
  150. <li>Réseau (des IPs fixes)</li>
  151. <li class="wy-breadcrumbs-aside">
  152. </li>
  153. </ul>
  154. <hr/>
  155. </div>
  156. <div role="main">
  157. <div class="section">
  158. <h1 id="reseau">Réseau</h1>
  159. <p>Dans cette partie, nous allons donner à notre raspi une adresse IP fixe, en IPV4 et IPV6.</p>
  160. <p>Nous allons utiliser ce qui est indiqué dans de nombreux tutoriels : modification du fichier <strong>/etc/dhcpcd.conf</strong></p>
  161. <pre><code># Example static IP configuration:
  162. interface eth0
  163. static ip_address=192.168.111.170/24
  164. static ip6_address=2a01:e0a:d0:3c20::170/64
  165. static routers=192.168.111.254
  166. #static domain_name_servers=192.168.1.1
  167. </code></pre>
  168. <p>Les lignes à modifier sont celles ci-dessus : enlever le <strong>#</strong> au début des lignes (sauf la première et la dernière) et renseigner en fonction des adresses IP voulues : ipv4 et ipv6.</p>
  169. <p>Il restera les serveurs DNS à configurer (dernière ligne), ce que nous ferons après avoir installé <strong>knot-resolver</strong>.</p>
  170. <p>Une fois les modifications dans le fichier <strong>/etc/dhcpcd.conf</strong> faites, vous pouvez re-démarrer votre raspi.</p>
  171. <p>Test :</p>
  172. <pre><code>pi@raspberrypi:~ $ ip a
  173. 1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
  174. link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  175. inet 127.0.0.1/8 scope host lo
  176. valid_lft forever preferred_lft forever
  177. inet6 ::1/128 scope host
  178. valid_lft forever preferred_lft forever
  179. 2: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
  180. link/ether b8:27:eb:3a:0b:38 brd ff:ff:ff:ff:ff:ff
  181. inet 192.168.111.170/24 brd 192.168.111.255 scope global noprefixroute eth0
  182. valid_lft forever preferred_lft forever
  183. inet6 2a01:e0a:d0:3c20:a23:93ca:de95:e15b/64 scope global dynamic mngtmpaddr noprefixroute
  184. valid_lft 86388sec preferred_lft 86388sec
  185. inet6 2a01:e0a:d0:3c20::170/64 scope global noprefixroute
  186. valid_lft forever preferred_lft forever
  187. inet6 fe80::74c8:34d:25f2:3b43/64 scope link
  188. valid_lft forever preferred_lft forever
  189. pi@raspberrypi:~ $
  190. </code></pre>
  191. <p>Les adresses IP de votre serveur doivent correspondre à ce que vous avez entré dans le fichier. On a bien :</p>
  192. <ul>
  193. <li>inet 192.168.111.170/24</li>
  194. <li>inet6 2a01:e0a:d0:3c20::170/64</li>
  195. </ul>
  196. <p>C'est tout bon !</p>
  197. </div>
  198. </div>
  199. <footer>
  200. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  201. <a href="../Knot/" class="btn btn-neutral float-right" title="Installation de Knot-resolver">Next <span class="icon icon-circle-arrow-right"></span></a>
  202. <a href="../S%C3%A9curisation-SSH/" class="btn btn-neutral" title="Sécurisation SSH"><span class="icon icon-circle-arrow-left"></span> Previous</a>
  203. </div>
  204. <hr/>
  205. <div role="contentinfo">
  206. <!-- Copyright etc -->
  207. </div>
  208. 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>.
  209. </footer>
  210. </div>
  211. </div>
  212. </section>
  213. </div>
  214. <div class="rst-versions" role="note" aria-label="versions">
  215. <span class="rst-current-version" data-toggle="rst-current-version">
  216. <span><a href="../S%C3%A9curisation-SSH/" style="color: #fcfcfc;">&laquo; Previous</a></span>
  217. <span style="margin-left: 15px"><a href="../Knot/" style="color: #fcfcfc">Next &raquo;</a></span>
  218. </span>
  219. </div>
  220. <script>var base_url = '../../..';</script>
  221. <script src="../../../js/theme.js" defer></script>
  222. <script src="../../../search/main.js" defer></script>
  223. <script defer>
  224. window.onload = function () {
  225. SphinxRtdTheme.Navigation.enable(true);
  226. };
  227. </script>
  228. </body>
  229. </html>