<?xml version="1.0" encoding="UTF-8" ?>
<!-- RSS generated by PHPBoost on Mon, 20 Apr 2026 16:21:47 +0200 -->
<rss version="2.0" xmlns:atom="https://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Wiki]]></title>
		<atom:link href="https://www.mageialinux-online.org/syndication/rss/wiki/32" rel="self" type="application/rss+xml"/>
		<link>https://www.mageialinux-online.org</link>
		<description><![CDATA[Derniers articles de la catégorie Internet - Communication &amp; Réseau]]></description>
		<copyright>(C) 2005-2026 PHPBoost</copyright>
		<language>fr</language>
		<generator>PHPBoost</generator>
		
            <item>
                <title><![CDATA[Installer Filius]]></title>
                <link>https://www.mageialinux-online.org/wiki/installer-filius</link>
                <guid>https://www.mageialinux-online.org/wiki/installer-filius</guid>
                <description><![CDATA[<p style="text-align: center;"><img src="https://www.mageialinux-online.org/upload/filius_icone_96.png" alt="Icone de Filius" style="width: 64px" /></p><br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-introduction">Introduction</h2><br />

<a class="offload" href="https://www.lernsoftware-filius.de/Herunterladen">Filius</a> est un logiciel de simulation de réseaux informatiques, à destination de l'enseignement. L'objectif étant la compréhension du fonctionnement des réseaux informatiques, plutôt que la formation de techniciens ou ingénieurs que vise par exemple <a class="offload" href="https://fr.wikipedia.org/wiki/Packet_Tracer">Packet Tracer</a> ou <a class="offload" href="https://www.gns3.com/">GNS3</a>.<br />
<br />
Il permet de créer son propre réseau de le configurer, de le simuler et de visualiser les échanges d&#8217;informations.<br />
<br />
Filius est fourni gratuitement sous les conditions de la licence GNU General Public License (GPL) version 2 ou version 3.<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-installation">Installation</h2><br />

<br />
Java 17 (ou supérieur) est requis pour l'utilisation à partir de Filius 2.5. La création et la compilation de vos propres applications dans Filius à l'aide de l'assistant logiciel nécessitent en outre l'utilisation de l'environnement d'exécution Java et d'un JDK. Toutes les autres fonctions ainsi que l'utilisation d'applications existantes sont possibles avec n'importe quel environnement d'exécution Java (y compris JRE).<br />
<br />
À ce jour, 18/09/2025, il s'agit de la version 2.9.4.<br />
<br />
Mageia n'en fournit pas actuellement de rpm.<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-avec-discover">Avec Discover</h3><br />

Discover, permet l'installation de Filius via Flatpak. Il suffit de faire la recherche dans Discover, puis de choisir <strong>Installer</strong>.<br />
<br />
Avantage, c'est simple, et vous serez informés des mises à jour. Inconvénients, Flatpak installe beaucoup de dépendances avec chaque logiciel.<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-a-partir-du-zip">À partir du zip</h3><br />

Il faut le télécharger sur la page du site qui propose un <pre style="display:inline;">*.exe</pre> pour Windows, un <pre style="display:inline;">*.deb</pre> pour Ubuntu, et une archive <pre style="display:inline;">.zip</pre><br />
<br />
Il suffit de le décompresser dans un endroit approprié, il n'y a pas à l'installer, tout est dans l'archive. Par exemple dans<br />
<br />
<pre style="display:inline;">/mes/programmes/filius-2.9.4</pre><br />
<br />
Ensuite, il faut donner les droits d&#8217;exécution à filius.sh :<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> u+x filius.sh</pre></pre></div></div><br />
<br />
Il est nécessaire de créer une entrée dans le Menu des Applications. L'icône n'est pas fournie dans l'archive zip. Mais elle est en haut de cette page.<br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-par-conversion-du-deb-en-rpm">Par conversion du .deb en .rpm</h3><br />

Il faut que <pre style="display:inline;">alien</pre> soit installé. Si ce n'est pas le cas, il faut le faire via le CCM (Centre de Control de Mageia) par exemple ou en ligne de commandes.<br />
<br />
La conversion du <pre style="display:inline;">*.deb</pre> en <pre style="display:inline;">*.rpm</pre> se fait par contre en ligne de commande avec la commande :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">alien <span style="color: #660033;">-r</span> .<span style="color: #000000; font-weight: bold;">/</span>filius_2.9.4_all.deb</pre></pre></div></div><br />
<br />
On obtient le rpm <div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">filius-2.9.4-<span style="color: #000000;">2</span>.noarch.rpm</pre></pre></div></div> qui est lui installable<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">urpmi .<span style="color: #000000; font-weight: bold;">/</span>filius-2.9.4-<span style="color: #000000;">2</span>.noarch.rpm</pre></pre></div></div><br />
<br />
Le message ci dessous s'affiche :<br />
<pre style="display:inline;">SECURITÉ : Les paquetages suivants ne sont _PAS_ signés....</pre><br />
<br />
Normal, ce n'est pas un paquetage conçu par Mageia.<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-prise-en-main">Prise en main</h2><br />

<br />
Filius propose un mode construction et un mode simulation.<br />
<br />
<p style="text-align: center;"><img src="https://www.mageialinux-online.org/upload/filius_interface.png" alt="Interface de Filius commentée" style="width: 400px" /></p><br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-construction-du-reseau">Construction du réseau</h3><br />

Icone "marteau" de la barre d'outils.<br />
Vous construisez votre réseau. Vous choisissez le matériel, ordinateurs, switch, routeurs, et vous les configurez.<br />
<br />
Contrairement à d'autres simulateurs de réseaux, Filius <strong>ne permet pas</strong> le choix du type de liaisons (câbles ethernet et leur débit possible, adsl, fibre).<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-simulation">Simulation</h3><br />

Icone "flèche verte".<br />
Vous simulez le fonctionnement du réseau : envois de mails, de page web, etc.<br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-configuration">Configuration</h3><br />

La version actuelle de Filius permet de modifier facilement la langue de l'interface, ce qui n'a pas toujours été le cas. Bouton <strong>paramètres</strong> tout à droite de la barre d'outils :<br />
<p style="text-align: center;"><img src="https://www.mageialinux-online.org/upload/filius-parametres-screenshot_20250918_171834.png" alt="Filius bouton paramètres" style="width: 64px" /></p><br />
Trois langues sont proposées : allemand, anglais et français.<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-sitographie">Sitographie</h2><br />

<br />
<ul class="formatter-ul">
    <li class="formatter-li"><a class="offload" href="https://www.lernsoftware-filius.de/Herunterladen">Site de Filius</a> en allemand.
    </li><li class="formatter-li"><a class="offload" href="https://ent2d.ac-bordeaux.fr/disciplines/sti-college/2019/09/25/filius-un-logiciel-de-simulation-de-reseau-simple-et-accessible/">Une présentation et prise en main</a>
    </li><li class="formatter-li"><a class="offload" href="https://philippe-calonnec.canoprof.fr/eleve/SNT/2-Internet/co/RessourcesFilius_1.html">Un autre exemple de prise en main.</a>
    </li><li class="formatter-li"><a class="offload" href="https://www.lernsoftware-filius.de/downloads/Introduction_Filius.pdf">Documentation complète</a> mais en anglais.<br />
</li></ul><br />]]></description>
                <pubDate>Thu, 18 Sep 2025 17:38:42 +0200</pubDate>
                
            </item>
		
            <item>
                <title><![CDATA[Installer Skype sur sa Mageia]]></title>
                <link>https://www.mageialinux-online.org/wiki/installer-skype-sur-sa-mageia</link>
                <guid>https://www.mageialinux-online.org/wiki/installer-skype-sur-sa-mageia</guid>
                <description><![CDATA[<span class="message-helper bgc warning">Skype sera <a class="offload" href="https://www.microsoft.com/en-us/microsoft-365/blog/2025/02/28/the-next-chapter-moving-from-skype-to-microsoft-teams/">abandonné le 5 mai 2025 par microsoft</a>. Veuillez vous tourner vers de nouvelles alternatives (Signal, Jitsi,..).</span><br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-prerequis">Prérequis</h2><br />

<span class="message-helper notice"><br />
<div class="formatter-container formatter-block"><ul class="formatter-ul">
    <li class="formatter-li"> Avoir configuré sa base URPMI
        </li><li class="formatter-li"> Posséder une connexion Internet
        </li><li class="formatter-li"> Avoir activé les médias <strong>Nonfree_Release</strong> et <strong>Nonfree_Updates</strong>
        </li><li class="formatter-li"> Avoir activé les médias <strong>Core_32bit_Release</strong> et <strong>Core_32bit_Updates</strong> <span style="text-decoration: underline;">(Pour les systèmes 64bits)</span>
        </li><li class="formatter-li"> Avoir installé dnf<br />
</li></ul></div></span><br />
<br />
--Installation de at et de gnome-keyring<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span> -</pre></pre></div></div><br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">urpmi at</pre></pre></div></div><br />
<br />
Si vous n&#8217;utilisez pas gnome mais plutôt un environnement graphique comme plasma, il vous faudra un installer gnome-keyring. En effet, skype ne sait pas solliciter le portefeuille kde/plasma pour sauvegarder les mots de passe, références de sécurité. Il est conçu pour fonctionner avec gnome. gnome-keyring a vocation à sauvegarder ces données d&#8217;authentifications et pourra alors les conserver pour skype. Cela vous évitera d&#8217;avoir à reconnecter à Skype à chaque reconnexion à votre bureau.<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">urpmi gnome-keyring</pre></pre></div></div><br />
<br />
Un reboot est conseillé. Gnome-Keyring se lancera automatiquement quand vous vous connecterez à votre session plasma. Pour consulter les mots passes, vos clés ssh, executer la commande sea-horse dans un terminal.<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-installation-de-skype-via-dnf">Installation de Skype via dnf</h2><br />

<br />
<br />
<br />
Méthode pour rajouter le dépôt et installer la dernière version de skypeforlinux sur mga6 64 bits<br />
<br />
Ouvrir une console et lancer une session root<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span> -</pre></pre></div></div><br />
<div class="formatter-container formatter-code code-TEXT"><span class="formatter-title">Code TEXT : </span><div class="formatter-content"><pre style="display:inline;"><pre class="text" style="font-family:monospace;">Mot de passe root</pre></pre></div></div><br />
<br />
On ajoute le dépôt officiel Skype pour l'outil de gestion de paquet dnf<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">dnf config-manager <span style="color: #660033;">--add-repo</span> https:<span style="color: #000000; font-weight: bold;">//</span>repo.skype.com<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>skype-stable.repo</pre></pre></div></div><br />
<br />
On installe Skype via la commande dnf<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">dnf <span style="color: #c20cb9; font-weight: bold;">install</span> skypeforlinux <span style="color: #660033;">-y</span> </pre></pre></div></div><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-alternative">Alternative</h2><br />

<br />
<br />
<br />
Si l'on veut ne pas installer le client au sein de son environnement Mageia, on peut utiliser l'application web en se connectant sur <a class="offload" href="https://web.skype.com/fr/">le site officiel skype</a> avec le navigateur chromium.<br />
<br />
<p style="text-align: right;"><span style="font-size: 10px;">Écrit par: vouf], Le: 15/04/2018 </span></p><br />
<p style="text-align: right;"><a href="https://www.mageialinux-online.org/wiki/utiliser-mageia">Retour :Utiliser Mageia</a></p><br />
<br />]]></description>
                <pubDate>Sat, 01 Mar 2025 17:57:59 +0100</pubDate>
                
            </item>
		
            <item>
                <title><![CDATA[Configurer son serveur et ses clients vpn sous mageia]]></title>
                <link>https://www.mageialinux-online.org/wiki/configurer-son-serveur-et-ses-clients-vpn-sous-mageia</link>
                <guid>https://www.mageialinux-online.org/wiki/configurer-son-serveur-et-ses-clients-vpn-sous-mageia</guid>
                <description><![CDATA[<span class="message-helper notice"><br />
<br />
Documentation en cours de rédaction en cours de rédaction !!<br />
<br />
</span><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-presentation">Présentation</h2><br />

<br />
<br />
Ce tutoriel a été réalisé par le biais d'un POC comprenant deux machines virtuelles sous mageia 6.<br />
<br />
Le serveur openvpn nommé "serveurmga", connecté sur un réseau local avec l'adresse ip : 192.168.1.15<br />
<br />
Une machine cliente nommée "clientmga" connectée au même réseau local avec l'adresse ip : 192.168.1.1.16<br />
<br />
Clientmga établira une connexion réseau en 10.8.0.0/24 sur le serveur vpn serveurmga. Ce dernier sera configuré pour être une passerelle vers internet et proposera par défaut les DNS d'opendns.<br />
<br />
Dans un premier temps, on désactivera le pare-feu des différentes machines via le Mageia Control Center pour s'assurer qu'il ne perturbe pas le fonctionnement de la solution.<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-installation-et-configuration-du-serveur">Installation et configuration du serveur</h2><br />

<br />
<br />
 Installation d'openvpn<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">urpmi openvpn</pre></pre></div></div><br />
<br />
Copie du répertoire easy-rsa<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>easy-rsa<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>easy-rsa</pre></pre></div></div><br />
<br />
On édite le fichier /etc/openvpn/easy-rsa/vars<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>easy-rsa
<span style="color: #c20cb9; font-weight: bold;">nano</span> vars</pre></pre></div></div><br />
<br />
On modifie /etc/openvpn/easy-rsa/vars<br />
<br />
<div class="formatter-container formatter-code code-TEXT"><span class="formatter-title">Code TEXT : </span><div class="formatter-content"><pre style="display:inline;"><pre class="text" style="font-family:monospace;">export EASY_RSA="`pwd`"</pre></pre></div></div><br />
<br />
Pour avoir<br />
<br />
<div class="formatter-container formatter-code code-TEXT"><span class="formatter-title">Code TEXT : </span><div class="formatter-content"><pre style="display:inline;"><pre class="text" style="font-family:monospace;">export EASY_RSA="/etc/openvpn/easy-rsa"</pre></pre></div></div><br />
<br />
Puis on modifie /etc/openvpn/easy-rsa/vars<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">KEY_SIZE</span>=<span style="color: #000000;">1024</span> </pre></pre></div></div><br />
<br />
Pour avoir<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">KEY_SIZE</span>=<span style="color: #000000;">2048</span></pre></pre></div></div><br />
<br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-generation-des-certificats-de-l-autorite-de-certification-ca-crt-et-ca-key">Génération des certificats de l'autorité de certification : ca.crt et ca.key</h3><br />

<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>easy-rsa</pre></pre></div></div><br />
<br />
On prends en compte la nouvelle configuration<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost easy-rsa<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># source ./vars </span>
NOTE: If you run .<span style="color: #000000; font-weight: bold;">/</span>clean-all, I will be doing a <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> on <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>easy-rsa<span style="color: #000000; font-weight: bold;">/</span>keys </pre></pre></div></div><br />
<br />
On supprime par sécurité les anciens certificats générés sous /etc/openvpn/easy-rsa/keys<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost easy-rsa<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ./clean-all </span></pre></pre></div></div><br />
<br />
On génère les certificats de l'autorité de certification<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>localhost easy-rsa<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ./build-ca </span></pre></pre></div></div><br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">Generating a <span style="color: #000000;">2048</span> bit RSA private key 
....................+++ 
................+++ 
writing new private key to <span style="color: #ff0000;">'ca.key'</span> 
<span style="color: #660033;">-----</span> 
You are about to be asked to enter information that will be incorporated 
into your certificate request. 
What you are about to enter is what is called a Distinguished Name or a DN. 
There are quite a few fields but you can leave some blank 
For some fields there will be a default value, 
If you enter <span style="color: #ff0000;">'.'</span>, the field will be left blank. 
<span style="color: #660033;">-----</span> 
Country Name <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2</span> letter code<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>US<span style="color: #7a0874; font-weight: bold;">&#93;</span>:FR 
State or Province Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>full name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>CA<span style="color: #7a0874; font-weight: bold;">&#93;</span>:FRANCE 
Locality Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, city<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>SanFrancisco<span style="color: #7a0874; font-weight: bold;">&#93;</span>:Bordeaux 
Organization Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, company<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Fort-Funston<span style="color: #7a0874; font-weight: bold;">&#93;</span>:vouf.fr 
Organizational Unit Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, section<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>changeme<span style="color: #7a0874; font-weight: bold;">&#93;</span>: 
Common Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, your name or your server<span style="color: #ff0000;">'s hostname) [changeme]:serveurmga 
Name [changeme]:vouf 
Email Address [mail@host.domain]:</span></pre></pre></div></div><br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-generation-des-cles-serveurs-serveurmga-csr-serveurmga-key-serveurmga-crt">Génération des clés serveurs :  : serveurmga.csr, serveurmga.key, serveurmga.crt</h3><br />

<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost easy-rsa<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ./build-key-server serveurmga </span></pre></pre></div></div><br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">Generating a <span style="color: #000000;">2048</span> bit RSA private key 
.......................................+++ 
................................................................+++ 
writing new private key to <span style="color: #ff0000;">'serveurmga.key'</span> 
<span style="color: #660033;">-----</span> 
You are about to be asked to enter information that will be incorporated 
into your certificate request. 
What you are about to enter is what is called a Distinguished Name or a DN. 
There are quite a few fields but you can leave some blank 
For some fields there will be a default value, 
If you enter <span style="color: #ff0000;">'.'</span>, the field will be left blank. 
<span style="color: #660033;">-----</span> 
Country Name <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2</span> letter code<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>US<span style="color: #7a0874; font-weight: bold;">&#93;</span>:FR 
State or Province Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>full name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>CA<span style="color: #7a0874; font-weight: bold;">&#93;</span>:FRANCE 
Locality Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, city<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>SanFrancisco<span style="color: #7a0874; font-weight: bold;">&#93;</span>:Bordeaux 
Organization Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, company<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Fort-Funston<span style="color: #7a0874; font-weight: bold;">&#93;</span>:vouf.fr 
Organizational Unit Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, section<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>changeme<span style="color: #7a0874; font-weight: bold;">&#93;</span>: 
Common Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, your name or your server<span style="color: #ff0000;">'s hostname) [serveurmga]:serveurmga 
Name [changeme]:vouf 
Email Address [mail@host.domain]: 
Please enter the following '</span>extra<span style="color: #ff0000;">' attributes 
to be sent with your certificate request 
A challenge password []: On ne saisi pas de mot de passe
An optional company name []: 
Using configuration from /etc/openvpn/easy-rsa/openssl-1.0.0.cnf 
Check that the request matches the signature 
Signature ok 
The Subject'</span>s Distinguished Name is <span style="color: #c20cb9; font-weight: bold;">as</span> follows 
countryName           :PRINTABLE:<span style="color: #ff0000;">'FR'</span> 
stateOrProvinceName   :PRINTABLE:<span style="color: #ff0000;">'FRANCE'</span> 
localityName          :PRINTABLE:<span style="color: #ff0000;">'Bordeaux'</span> 
organizationName      :PRINTABLE:<span style="color: #ff0000;">'vouf.fr'</span> 
organizationalUnitName:PRINTABLE:<span style="color: #ff0000;">'changeme'</span> 
commonName            :PRINTABLE:<span style="color: #ff0000;">'serveurmga'</span> 
name                  :PRINTABLE:<span style="color: #ff0000;">'vouf'</span> 
emailAddress          :IA5STRING:<span style="color: #ff0000;">'mail@host.domain'</span> 
Certificate is to be certified <span style="color: #000000; font-weight: bold;">until</span> Jun  <span style="color: #000000;">1</span> <span style="color: #000000;">13</span>:06:<span style="color: #000000;">57</span> <span style="color: #000000;">2027</span> GMT <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">3650</span> days<span style="color: #7a0874; font-weight: bold;">&#41;</span> 
Sign the certificate? <span style="color: #7a0874; font-weight: bold;">&#91;</span>y<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #7a0874; font-weight: bold;">&#93;</span>:y 
<span style="color: #000000;">1</span> out of <span style="color: #000000;">1</span> certificate requests certified, commit? <span style="color: #7a0874; font-weight: bold;">&#91;</span>y<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #7a0874; font-weight: bold;">&#93;</span>y 
Write out database with <span style="color: #000000;">1</span> new entries 
Data Base Updated</pre></pre></div></div><br />
<br />
Au niveau du challenge password, il est inutile de renseigner un mot de passe.<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-creation-des-certificats-des-clients-et-du-fichier-clientmga-3des-key">Création des certificats des clients et du fichier clientmga.3des.key</h2><br />

<br />
<br />
Génération des certificats pour "un client openvpn"<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost easy-rsa<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ./build-key-pass clientmga </span></pre></pre></div></div><br />
<br />
Un mot de passe est demandé pour la création du certificat "PEM pass phrase" . En revanche, il est inutile de renseigner un challenge password.<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">Generating a <span style="color: #000000;">2048</span> bit RSA private key 
.........................+++ 
.......+++ 
writing new private key to <span style="color: #ff0000;">'clientmga.key'</span> 
Enter PEM pass phrase: 
Verifying - Enter PEM pass phrase: 
<span style="color: #660033;">-----</span> 
You are about to be asked to enter information that will be incorporated 
into your certificate request. 
What you are about to enter is what is called a Distinguished Name or a DN. 
There are quite a few fields but you can leave some blank 
For some fields there will be a default value, 
If you enter <span style="color: #ff0000;">'.'</span>, the field will be left blank. 
<span style="color: #660033;">-----</span> 
Country Name <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2</span> letter code<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>US<span style="color: #7a0874; font-weight: bold;">&#93;</span>:FR 
State or Province Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>full name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>CA<span style="color: #7a0874; font-weight: bold;">&#93;</span>:FRANCE 
Locality Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, city<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>SanFrancisco<span style="color: #7a0874; font-weight: bold;">&#93;</span>:Bordeaux 
Organization Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, company<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Fort-Funston<span style="color: #7a0874; font-weight: bold;">&#93;</span>:vouf.fr 
Organizational Unit Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, section<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>changeme<span style="color: #7a0874; font-weight: bold;">&#93;</span>: 
Common Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, your name or your server<span style="color: #ff0000;">'s hostname) [clientmga]: 
Name [changeme]:vouf 
Email Address [mail@host.domain]: 
Please enter the following '</span>extra<span style="color: #ff0000;">' attributes 
to be sent with your certificate request 
A challenge password []: 
An optional company name []: 
Using configuration from /etc/openvpn/easy-rsa/openssl-1.0.0.cnf 
Check that the request matches the signature 
Signature ok 
The Subject'</span>s Distinguished Name is <span style="color: #c20cb9; font-weight: bold;">as</span> follows 
countryName           :PRINTABLE:<span style="color: #ff0000;">'FR'</span> 
stateOrProvinceName   :PRINTABLE:<span style="color: #ff0000;">'FRANCE'</span> 
localityName          :PRINTABLE:<span style="color: #ff0000;">'Bordeaux'</span> 
organizationName      :PRINTABLE:<span style="color: #ff0000;">'vouf.fr'</span> 
organizationalUnitName:PRINTABLE:<span style="color: #ff0000;">'changeme'</span> 
commonName            :PRINTABLE:<span style="color: #ff0000;">'clientmga'</span> 
name                  :PRINTABLE:<span style="color: #ff0000;">'vouf'</span> 
emailAddress          :IA5STRING:<span style="color: #ff0000;">'mail@host.domain'</span> 
Certificate is to be certified <span style="color: #000000; font-weight: bold;">until</span> Jun  <span style="color: #000000;">1</span> <span style="color: #000000;">13</span>:<span style="color: #000000;">10</span>:<span style="color: #000000;">54</span> <span style="color: #000000;">2027</span> GMT <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">3650</span> days<span style="color: #7a0874; font-weight: bold;">&#41;</span> 
Sign the certificate? <span style="color: #7a0874; font-weight: bold;">&#91;</span>y<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #7a0874; font-weight: bold;">&#93;</span>:y 
<span style="color: #000000;">1</span> out of <span style="color: #000000;">1</span> certificate requests certified, commit? <span style="color: #7a0874; font-weight: bold;">&#91;</span>y<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #7a0874; font-weight: bold;">&#93;</span>y 
Write out database with <span style="color: #000000;">1</span> new entries 
Data Base Updated
&nbsp;</pre></pre></div></div><br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> keys</pre></pre></div></div><br />
<br />
On encrypte la clé du client avec l&#8217;algorithme 3DES<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost keys<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># openssl rsa -in clientmga.key -des3 -out clientmga.3des.key </span></pre></pre></div></div><br />
<br />
Un mot de passe est demandé...<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">Enter pass phrase <span style="color: #000000; font-weight: bold;">for</span> clientmga.key: 
writing RSA key 
Enter PEM pass phrase: 
Verifying - Enter PEM pass phrase:</pre></pre></div></div><br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-securisation-des-echanges-de-cles">Sécurisation des échanges de clés</h3><br />

<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost keys<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cd /etc/openvpn/easy-rsa</span></pre></pre></div></div><br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost easy-rsa<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;">#  ./build-dh </span></pre></pre></div></div><br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">Generating DH parameters, <span style="color: #000000;">2048</span> bit long safe prime, generator <span style="color: #000000;">2</span> 
This is going to take a long <span style="color: #000000; font-weight: bold;">time</span> 
................................................................................................................+............................................................................................................................
....................+........+...............................................................+.............+.................................................................................................................................
........................+....................................................+............................................................+..................................................+........+......................................
................................................................................................................................................................................................................................+............
.....+...............................................................................+........................................................+..............................................................................................
...............................................................+..........................................+..............................................................+...................................................................
....................................................................................................................+....................................................+..............++<span style="color: #000000; font-weight: bold;">*</span>++<span style="color: #000000; font-weight: bold;">*</span></pre></pre></div></div><br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">openvpn <span style="color: #660033;">--genkey</span> <span style="color: #660033;">--secret</span> keys<span style="color: #000000; font-weight: bold;">/</span>ta.key</pre></pre></div></div><br />
<br />
On créé le fichier de configuration du client /etc/openvpn/easy-rsa/keys/Default.txt<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>easy-rsa<span style="color: #000000; font-weight: bold;">/</span>keys
<span style="color: #c20cb9; font-weight: bold;">nano</span> Default.txt</pre></pre></div></div><br />
<br />
Dans le fichier Default.txt<br />
<br />
<div class="formatter-container formatter-code code-TEXT"><span class="formatter-title">Code TEXT : </span><div class="formatter-content"><pre style="display:inline;"><pre class="text" style="font-family:monospace;">client
dev tun
proto udp # Protocol udp
remote serveurmga 1194 # on peut mettre l'ip du serveur vpn, ou le nom de domaine. On retrouve le port 1194
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ns-cert-type server
key-direction 1
cipher AES-256-CBC
compress lz4-v2 #Active la compression
verb 1
mute 20
script-security 2
up /etc/openvpn/update-resolv-conf #Script permettant de mettre à jour les DNS du client à la connexion
down /etc/openvpn/update-resolv-conf #A la deconnexion, le client retrouve son DNS de départ
&nbsp;</pre></pre></div></div><br />
<br />
<br />
<br />
On génère un fichier clientmga.ovpn qui aura à l'avantage de regrouper la configuration du client, l'autorité de certification et la clé<br />
<br />
Télécharger <a href="https://gist.github.com/maxauvy/5491c8823545f6e2a2af" target="_blank">MakeOpenVPN.sh</a> et le copier sous /etc/openvpn/easy-rsa/keys<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost keys<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># bash MakeOpenVPN.sh</span></pre></pre></div></div><br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">Entrez le nom d<span style="color: #ff0000;">'un client existant :
clientmga
Clé publique trouvée : clientmga
Clé privée trouvée : clientmga.3des.key
Clé publique CA trouvée : ca.crt
Clé privée tls-auth trouvée : ta.key
Terminé ! clientmga.ovpn généré avec succès.</span></pre></pre></div></div><br />
<br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-fichier-de-configuration-du-serveur-openvpn">Fichier de configuration du serveur openvpn</h3><br />

<br />
<br />
Fichier de configuration du serveur /etc/openvpn/server.conf<br />
<br />
<div class="formatter-container formatter-code code-TEXT"><span class="formatter-title">Code TEXT : </span><div class="formatter-content"><pre style="display:inline;"><pre class="text" style="font-family:monospace;">local 192.168.1.15 # adresse IP locale de votre serveur 
dev tun # type de VPN, tun (tunnel IP) ou tap (tunnel Ethernet/bridge)
proto udp # protocole à utiliser : tcp ou udp, généralement udp
port 1194 # le port par défaut pour OpenVPN, à ajuster au besoin
ca /etc/openvpn/easy-rsa/keys/ca.crt # clé publique de l’autorité de certification 
cert /etc/openvpn/easy-rsa/keys/serveurmga.crt # Clé publique du serveur
key /etc/openvpn/easy-rsa/keys/serveurmga.key # Clé privée du serveur
dh /etc/openvpn/easy-rsa/keys/dh2048.pem # si vous êtes restés sur du 2024 bits
server 10.8.0.0 255.255.255.0 #le réseau au sein duquel vous allez attribuer des IP. Les clients auront une ip en 10.8.0x
push "redirect-gateway def1 bypass-dhcp" # Permet au serveur de se comporter comme une passerelle.
#push "dhcp-option DNS 10.8.0.1" # votre serveur DNS primaire (votre routeur, souvent)
push "dhcp-option DNS 208.67.222.222" # votre serveur DNS primaire OpenDNS
push "dhcp-option DNS 208.67.220.220" # votre serveur DNS primaire OpenDNS
# vous pouvez aussi utiliser le DNS Google 8.8.8.8 ou OpenDNS 208.67.222.222
# pour le reste, a priori pas de raisons d'y toucher à moins de savoir ce que vous faites !
client-to-client
duplicate-cn
keepalive 10 120
tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0
cipher AES-256-CBC
compress lz4-v2 #Active la compression
push "compress lz4-v2"
user openvpn
group openvpn
persist-key
persist-tun
status /var/log/openvpn-status.log 20
log /var/log/openvpn.log
verb 3</pre></pre></div></div><br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sysctl.conf</pre></pre></div></div><br />
<br />
Ajouter à la fin du fichier /etc/sysctl.conf<br />
<br />
<div class="formatter-container formatter-code code-TEXT"><span class="formatter-title">Code TEXT : </span><div class="formatter-content"><pre style="display:inline;"><pre class="text" style="font-family:monospace;">net.ipv4.ip_forward = 1</pre></pre></div></div><br />
<br />
Prise en compte de la configuration<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">sysctl <span style="color: #660033;">-p</span></pre></pre></div></div><br />
<br />
Commande à jouer à chaque redémarrage du serveur. Voir comment l&#8217;exécuter automatiquement à chaque reboot.<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">iptables <span style="color: #660033;">-t</span> nat <span style="color: #660033;">-A</span> POSTROUTING <span style="color: #660033;">-s</span> 10.8.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span> <span style="color: #660033;">-o</span> enp0s3 <span style="color: #660033;">-j</span> MASQUERADE
&nbsp;</pre></pre></div></div><br />
<br />
<span class="message-helper notice">  Attention au nom de la carte. Ici il s'agit de la carte ethernet enp0s3. Cela peut varier en fonction du matériel. Si vous avez une astuce pour que cette commande soit lancée automatiquement au démarrage !!</span><br />
<br />
 Création du service openvpn pour démarrer le serveur<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost etc<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># systemctl enable openvpn@server.service</span></pre></pre></div></div><br />
<br />
Résultat de la commande pour créer le service openvpn via systemctl<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">Created symlink <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>systemd<span style="color: #000000; font-weight: bold;">/</span>system<span style="color: #000000; font-weight: bold;">/</span>openvpn.target.wants<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">@</span>server.service → <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>systemd<span style="color: #000000; font-weight: bold;">/</span>system<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">@</span>.service.</pre></pre></div></div><br />
<br />
Démarrage du serveur openvpn<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">systemctl start openvpn<span style="color: #000000; font-weight: bold;">@</span>server.service</pre></pre></div></div><br />
<br />
On remarque la création de l'interface tun0 sur le serveur<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost keys<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ifconfig -a</span>
enp0s3: <span style="color: #007800;">flags</span>=<span style="color: #000000;">4163</span><span style="color: #000000; font-weight: bold;"><</span>UP,BROADCAST,RUNNING,MULTICAST<span style="color: #000000; font-weight: bold;">></span>  mtu <span style="color: #000000;">1500</span>
        inet 192.168.1.15  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 2a01:cb19:1a2:<span style="color: #000000;">5200</span>:a00:27ff:fe00:b346  prefixlen <span style="color: #000000;">64</span>  scopeid 0x0<span style="color: #000000; font-weight: bold;"><</span>global<span style="color: #000000; font-weight: bold;">></span>
        inet6 fe80::a00:27ff:fe00:b346  prefixlen <span style="color: #000000;">64</span>  scopeid 0x20<span style="color: #000000; font-weight: bold;"><</span><span style="color: #c20cb9; font-weight: bold;">link</span><span style="color: #000000; font-weight: bold;">></span>
        ether 08:00:<span style="color: #000000;">27</span>:00:b3:<span style="color: #000000;">46</span>  txqueuelen <span style="color: #000000;">1000</span>  <span style="color: #7a0874; font-weight: bold;">&#40;</span>Ethernet<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        RX packets <span style="color: #000000;">194036</span>  bytes <span style="color: #000000;">138807516</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">132.3</span> MiB<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        RX errors <span style="color: #000000;">0</span>  dropped <span style="color: #000000;">2</span>  overruns <span style="color: #000000;">0</span>  frame <span style="color: #000000;">0</span>
        TX packets <span style="color: #000000;">191523</span>  bytes <span style="color: #000000;">135687027</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">129.4</span> MiB<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        TX errors <span style="color: #000000;">0</span>  dropped <span style="color: #000000;">0</span> overruns <span style="color: #000000;">0</span>  carrier <span style="color: #000000;">0</span>  collisions <span style="color: #000000;">0</span>
lo: <span style="color: #007800;">flags</span>=<span style="color: #000000;">73</span><span style="color: #000000; font-weight: bold;"><</span>UP,LOOPBACK,RUNNING<span style="color: #000000; font-weight: bold;">></span>  mtu <span style="color: #000000;">65536</span>
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::<span style="color: #000000;">1</span>  prefixlen <span style="color: #000000;">128</span>  scopeid 0x10<span style="color: #000000; font-weight: bold;"><</span>host<span style="color: #000000; font-weight: bold;">></span>
        loop  txqueuelen <span style="color: #000000;">1</span>  <span style="color: #7a0874; font-weight: bold;">&#40;</span>Boucle locale<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        RX packets <span style="color: #000000;">34</span>  bytes <span style="color: #000000;">4214</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">4.1</span> KiB<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        RX errors <span style="color: #000000;">0</span>  dropped <span style="color: #000000;">0</span>  overruns <span style="color: #000000;">0</span>  frame <span style="color: #000000;">0</span>
        TX packets <span style="color: #000000;">34</span>  bytes <span style="color: #000000;">4214</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">4.1</span> KiB<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        TX errors <span style="color: #000000;">0</span>  dropped <span style="color: #000000;">0</span> overruns <span style="color: #000000;">0</span>  carrier <span style="color: #000000;">0</span>  collisions <span style="color: #000000;">0</span>
tun0: <span style="color: #007800;">flags</span>=<span style="color: #000000;">4305</span><span style="color: #000000; font-weight: bold;"><</span>UP,POINTOPOINT,RUNNING,NOARP,MULTICAST<span style="color: #000000; font-weight: bold;">></span>  mtu <span style="color: #000000;">1500</span>
        inet 10.8.0.1  netmask 255.255.255.255  destination 10.8.0.2
        inet6 fe80::3a19:dbb5:604e:afb8  prefixlen <span style="color: #000000;">64</span>  scopeid 0x20<span style="color: #000000; font-weight: bold;"><</span><span style="color: #c20cb9; font-weight: bold;">link</span><span style="color: #000000; font-weight: bold;">></span>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen <span style="color: #000000;">100</span>  <span style="color: #7a0874; font-weight: bold;">&#40;</span>UNSPEC<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        RX packets <span style="color: #000000;">79307</span>  bytes <span style="color: #000000;">22061882</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">21.0</span> MiB<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        RX errors <span style="color: #000000;">0</span>  dropped <span style="color: #000000;">0</span>  overruns <span style="color: #000000;">0</span>  frame <span style="color: #000000;">0</span>
        TX packets <span style="color: #000000;">110498</span>  bytes <span style="color: #000000;">105230363</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">100.3</span> MiB<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        TX errors <span style="color: #000000;">0</span>  dropped <span style="color: #000000;">0</span> overruns <span style="color: #000000;">0</span>  carrier <span style="color: #000000;">0</span>  collisions <span style="color: #000000;">0</span></pre></pre></div></div><br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost log<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat /var/log/openvpn-status.log</span>
OpenVPN CLIENT LIST
Updated,Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">42</span>:<span style="color: #000000;">26</span> <span style="color: #000000;">2017</span>
Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
ROUTING TABLE
Virtual Address,Common Name,Real Address,Last Ref
GLOBAL STATS
Max bcast<span style="color: #000000; font-weight: bold;">/</span>mcast queue length,<span style="color: #000000;">0</span>
END</pre></pre></div></div><br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost log<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat /var/log/openvpn.log</span>
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> OpenVPN 2.4.0 x86_64-mageia-linux-gnu <span style="color: #7a0874; font-weight: bold;">&#91;</span>SSL <span style="color: #7a0874; font-weight: bold;">&#40;</span>OpenSSL<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>LZO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>LZ4<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>EPOLL<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>MH<span style="color: #000000; font-weight: bold;">/</span>PKTINFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>AEAD<span style="color: #7a0874; font-weight: bold;">&#93;</span> built on May <span style="color: #000000;">14</span> <span style="color: #000000;">2017</span>
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> library versions: OpenSSL 1.0.2l  <span style="color: #000000;">25</span> May <span style="color: #000000;">2017</span>, LZO <span style="color: #000000;">2.09</span>
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> NOTE: your <span style="color: #7a0874; font-weight: bold;">local</span> LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x.  Be aware that this might create routing conflicts <span style="color: #000000; font-weight: bold;">if</span> you connect to the VPN server from public locations such <span style="color: #c20cb9; font-weight: bold;">as</span> internet cafes that use the same subnet.
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> Diffie-Hellman initialized with <span style="color: #000000;">2048</span> bit key
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> Outgoing Control Channel Authentication: Using <span style="color: #000000;">160</span> bit message <span style="color: #7a0874; font-weight: bold;">hash</span> <span style="color: #ff0000;">'SHA1'</span> <span style="color: #000000; font-weight: bold;">for</span> HMAC authentication
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> Incoming Control Channel Authentication: Using <span style="color: #000000;">160</span> bit message <span style="color: #7a0874; font-weight: bold;">hash</span> <span style="color: #ff0000;">'SHA1'</span> <span style="color: #000000; font-weight: bold;">for</span> HMAC authentication
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> ROUTE_GATEWAY 192.168.1.1<span style="color: #000000; font-weight: bold;">/</span>255.255.255.0 <span style="color: #007800;">IFACE</span>=enp0s3 <span style="color: #007800;">HWADDR</span>=08:00:<span style="color: #000000;">27</span>:00:b3:<span style="color: #000000;">46</span>
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> TUN<span style="color: #000000; font-weight: bold;">/</span>TAP device tun0 opened
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> TUN<span style="color: #000000; font-weight: bold;">/</span>TAP TX queue length <span style="color: #000000; font-weight: bold;">set</span> to <span style="color: #000000;">100</span>
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> do_ifconfig, tt-<span style="color: #000000; font-weight: bold;">></span><span style="color: #007800;">did_ifconfig_ipv6_setup</span>=<span style="color: #000000;">0</span>
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ifconfig</span> tun0 10.8.0.1 pointopoint 10.8.0.2 mtu <span style="color: #000000;">1500</span>
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>route add <span style="color: #660033;">-net</span> 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.2
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> Could not determine IPv4<span style="color: #000000; font-weight: bold;">/</span>IPv6 protocol. Using AF_INET
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> Socket Buffers: <span style="color: #007800;">R</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">212992</span>-<span style="color: #000000; font-weight: bold;">></span><span style="color: #000000;">212992</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #007800;">S</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">212992</span>-<span style="color: #000000; font-weight: bold;">></span><span style="color: #000000;">212992</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> UDPv4 <span style="color: #c20cb9; font-weight: bold;">link</span> <span style="color: #7a0874; font-weight: bold;">local</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>bound<span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #7a0874; font-weight: bold;">&#91;</span>AF_INET<span style="color: #7a0874; font-weight: bold;">&#93;</span>192.168.1.15:<span style="color: #000000;">1194</span>
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> UDPv4 <span style="color: #c20cb9; font-weight: bold;">link</span> remote: <span style="color: #7a0874; font-weight: bold;">&#91;</span>AF_UNSPEC<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> GID <span style="color: #000000; font-weight: bold;">set</span> to nogroup
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> UID <span style="color: #000000; font-weight: bold;">set</span> to nobody
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> MULTI: multi_init called, <span style="color: #007800;">r</span>=<span style="color: #000000;">256</span> <span style="color: #007800;">v</span>=<span style="color: #000000;">256</span>
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> IFCONFIG POOL: <span style="color: #007800;">base</span>=10.8.0.4 <span style="color: #007800;">size</span>=<span style="color: #000000;">62</span>, <span style="color: #007800;">ipv6</span>=<span style="color: #000000;">0</span>
Sat Jun  <span style="color: #000000;">3</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">41</span>:<span style="color: #000000;">39</span> <span style="color: #000000;">2017</span> Initialization Sequence Completed</pre></pre></div></div><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-configuration-du-pare-feu-sur-le-serveur">Configuration du pare feu sur le serveur</h2><br />

<br />
<br />
<img src="https://www.mageialinux-online.org/upload/screenshot_20170611_144811.png" alt="screenshot_20170611_144811" title="screenshot_20170611_144811" /><br />
<br />
<img src="https://www.mageialinux-online.org/upload/screenshot_20170611_145007.png" alt="screenshot_20170611_145007" title="screenshot_20170611_145007" /><br />
<br />
<img src="https://www.mageialinux-online.org/upload/screenshot_20170611_150220.png" alt="screenshot_20170611_150220" title="screenshot_20170611_150220" /><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-sur-le-poste-client-en-mode-commande">Sur le poste client en mode commande</h2><br />

On se connecter root<br />
<br />
On installe openvpn<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">urpmi openvpn</pre></pre></div></div><br />
<br />
On copie le fichier clientmga.ovpn sous /etc/openvpn/<br />
<br />
On créé un fichier /etc/openvpn/update-resolv-conf qui contiendra :<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/env bash</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Parses DHCP options from openvpn to update resolv.conf</span>
<span style="color: #666666; font-style: italic;"># To use set as 'up' and 'down' script in your openvpn *.conf:</span>
<span style="color: #666666; font-style: italic;"># up /etc/openvpn/update-resolv-conf</span>
<span style="color: #666666; font-style: italic;"># down /etc/openvpn/update-resolv-conf</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Used snippets of resolvconf script by Thomas Hood <jdthood@yahoo.co.uk></span>
<span style="color: #666666; font-style: italic;"># and Chris Hanson</span>
<span style="color: #666666; font-style: italic;"># Licensed under the GNU GPL.  See /usr/share/common-licenses/GPL.</span>
<span style="color: #666666; font-style: italic;"># 07/2013 colin@daedrum.net Fixed intet name</span>
<span style="color: #666666; font-style: italic;"># 05/2006 chlauber@bnc.ch</span>
<span style="color: #666666; font-style: italic;"># 09/2017 Adapté par vouf pour Mageia</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Example envs set from openvpn:</span>
<span style="color: #666666; font-style: italic;"># foreign_option_1='dhcp-option DNS 193.43.27.132'</span>
<span style="color: #666666; font-style: italic;"># foreign_option_2='dhcp-option DNS 193.43.27.133'</span>
<span style="color: #666666; font-style: italic;"># foreign_option_3='dhcp-option DOMAIN be.bnc.ch'</span>
<span style="color: #666666; font-style: italic;"># foreign_option_4='dhcp-option DOMAIN-SEARCH bnc.local'</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## The 'type' builtins will look for file in $PATH variable, so we set the</span>
<span style="color: #666666; font-style: italic;">## PATH below. You might need to directly set the path to 'resolvconf'</span>
<span style="color: #666666; font-style: italic;">## manually if it still doesn't work, i.e.</span>
<span style="color: #666666; font-style: italic;">## RESOLVCONF=/usr/sbin/resolvconf</span>
<span style="color: #666666; font-style: italic;">##</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</span>:<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #007800;">RESOLVCONF</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">type</span> <span style="color: #660033;">-p</span> resolvconf<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #007800;">$script_type</span> <span style="color: #000000; font-weight: bold;">in</span>
&nbsp;
up<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  <span style="color: #000000; font-weight: bold;">for</span> optionname <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #800000;">${!foreign_option_*}</span> ; <span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #007800;">option</span>=<span style="color: #ff0000;">"<span style="color: #007800;">${!optionname}</span>"</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$option</span>
    <span style="color: #007800;">part1</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">"<span style="color: #007800;">$option</span>"</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">" "</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">"<span style="color: #007800;">$part1</span>"</span> == <span style="color: #ff0000;">"dhcp-option"</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
      <span style="color: #007800;">part2</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">"<span style="color: #007800;">$option</span>"</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">" "</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
      <span style="color: #007800;">part3</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">"<span style="color: #007800;">$option</span>"</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">" "</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
      <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">"<span style="color: #007800;">$part2</span>"</span> == <span style="color: #ff0000;">"DNS"</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
        <span style="color: #007800;">IF_DNS_NAMESERVERS</span>=<span style="color: #ff0000;">"<span style="color: #007800;">$IF_DNS_NAMESERVERS</span> <span style="color: #007800;">$part3</span>"</span>
      <span style="color: #000000; font-weight: bold;">fi</span>
      <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">"<span style="color: #007800;">$part2</span>"</span> == <span style="color: #ff0000;">"DOMAIN"</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #ff0000;">"<span style="color: #007800;">$part2</span>"</span> == <span style="color: #ff0000;">"DOMAIN-SEARCH"</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
        <span style="color: #007800;">IF_DNS_SEARCH</span>=<span style="color: #ff0000;">"<span style="color: #007800;">$IF_DNS_SEARCH</span> <span style="color: #007800;">$part3</span>"</span>
      <span style="color: #000000; font-weight: bold;">fi</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
  <span style="color: #000000; font-weight: bold;">done</span>
  <span style="color: #007800;">R</span>=<span style="color: #ff0000;">""</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">"<span style="color: #007800;">$IF_DNS_SEARCH</span>"</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #007800;">R</span>=<span style="color: #ff0000;">"search "</span>
    <span style="color: #000000; font-weight: bold;">for</span> DS <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$IF_DNS_SEARCH</span> ; <span style="color: #000000; font-weight: bold;">do</span>
      <span style="color: #007800;">R</span>=<span style="color: #ff0000;">"<span style="color: #007800;">${R}</span> <span style="color: #007800;">$DS</span>"</span>
    <span style="color: #000000; font-weight: bold;">done</span>
  <span style="color: #007800;">R</span>=<span style="color: #ff0000;">"<span style="color: #007800;">${R}</span>
"</span>
  <span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">for</span> NS <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$IF_DNS_NAMESERVERS</span> ; <span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #007800;">R</span>=<span style="color: #ff0000;">"<span style="color: #007800;">${R}</span>nameserver <span style="color: #007800;">$NS</span>
"</span>
  <span style="color: #000000; font-weight: bold;">done</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">"<span style="color: #007800;">$R</span>"</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #007800;">$RESOLVCONF</span> <span style="color: #660033;">-a</span> <span style="color: #ff0000;">"<span style="color: #007800;">${dev}</span>"</span>
  <span style="color: #000000; font-weight: bold;">;;</span>
down<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  <span style="color: #007800;">$RESOLVCONF</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">"<span style="color: #007800;">${dev}</span>"</span>
  <span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Workaround / jm@epiclabs.io </span>
<span style="color: #666666; font-style: italic;"># force exit with no errors. Due to an apparent conflict with the Network Manager</span>
<span style="color: #666666; font-style: italic;"># $RESOLVCONF sometimes exits with error code 6 even though it has performed the</span>
<span style="color: #666666; font-style: italic;"># action correctly and OpenVPN shuts down.</span>
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>
&nbsp;</pre></pre></div></div><br />
<br />
On donne les droits d&#8217;exécution au fichier /etc/openvpn/update-resolv-conf<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span>+x <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>update-resolv-conf</pre></pre></div></div><br />
<br />
On lance le client vpn<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost openvpn<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># openvpn --config /etc/openvpn/clientmga.ovpn</span>
Fri Jun  <span style="color: #000000;">9</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">10</span> <span style="color: #000000;">2017</span> OpenVPN 2.4.0 x86_64-mageia-linux-gnu <span style="color: #7a0874; font-weight: bold;">&#91;</span>SSL <span style="color: #7a0874; font-weight: bold;">&#40;</span>OpenSSL<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>LZO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>LZ4<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>EPOLL<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>MH<span style="color: #000000; font-weight: bold;">/</span>PKTINFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>AEAD<span style="color: #7a0874; font-weight: bold;">&#93;</span> built on May <span style="color: #000000;">14</span> <span style="color: #000000;">2017</span>
Fri Jun  <span style="color: #000000;">9</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">10</span> <span style="color: #000000;">2017</span> library versions: OpenSSL 1.0.2l  <span style="color: #000000;">25</span> May <span style="color: #000000;">2017</span>, LZO <span style="color: #000000;">2.09</span>
Fri Jun  <span style="color: #000000;">9</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">10</span> <span style="color: #000000;">2017</span> NOTE: the current <span style="color: #660033;">--script-security</span> setting may allow this configuration to call user-defined scripts
Enter Private Key Password: <span style="color: #000000; font-weight: bold;">*********</span>
Fri Jun  <span style="color: #000000;">9</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">13</span> <span style="color: #000000;">2017</span> WARNING: this configuration may cache passwords <span style="color: #000000; font-weight: bold;">in</span> memory <span style="color: #660033;">--</span> use the auth-nocache option to prevent this
Fri Jun  <span style="color: #000000;">9</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">13</span> <span style="color: #000000;">2017</span> TCP<span style="color: #000000; font-weight: bold;">/</span>UDP: Preserving recently used remote address: <span style="color: #7a0874; font-weight: bold;">&#91;</span>AF_INET<span style="color: #7a0874; font-weight: bold;">&#93;</span>192.168.1.15:<span style="color: #000000;">1194</span>
Fri Jun  <span style="color: #000000;">9</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">13</span> <span style="color: #000000;">2017</span> UDP <span style="color: #c20cb9; font-weight: bold;">link</span> local: <span style="color: #7a0874; font-weight: bold;">&#40;</span>not bound<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Fri Jun  <span style="color: #000000;">9</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">13</span> <span style="color: #000000;">2017</span> UDP <span style="color: #c20cb9; font-weight: bold;">link</span> remote: <span style="color: #7a0874; font-weight: bold;">&#91;</span>AF_INET<span style="color: #7a0874; font-weight: bold;">&#93;</span>192.168.1.15:<span style="color: #000000;">1194</span>
Fri Jun  <span style="color: #000000;">9</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">13</span> <span style="color: #000000;">2017</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>serveurmga<span style="color: #7a0874; font-weight: bold;">&#93;</span> Peer Connection Initiated with <span style="color: #7a0874; font-weight: bold;">&#91;</span>AF_INET<span style="color: #7a0874; font-weight: bold;">&#93;</span>192.168.1.15:<span style="color: #000000;">1194</span>
Fri Jun  <span style="color: #000000;">9</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">14</span> <span style="color: #000000;">2017</span> TUN<span style="color: #000000; font-weight: bold;">/</span>TAP device tun0 opened
Fri Jun  <span style="color: #000000;">9</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">14</span> <span style="color: #000000;">2017</span> do_ifconfig, tt-<span style="color: #000000; font-weight: bold;">></span><span style="color: #007800;">did_ifconfig_ipv6_setup</span>=<span style="color: #000000;">0</span>
Fri Jun  <span style="color: #000000;">9</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">14</span> <span style="color: #000000;">2017</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ifconfig</span> tun0 10.8.0.6 pointopoint 10.8.0.5 mtu <span style="color: #000000;">1500</span>
Fri Jun  <span style="color: #000000;">9</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">14</span> <span style="color: #000000;">2017</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>update-resolv-conf tun0 <span style="color: #000000;">1500</span> <span style="color: #000000;">1553</span> 10.8.0.6 10.8.0.5 init
dhcp-option DNS 208.67.222.222
dhcp-option DNS 208.67.220.220
Fri Jun  <span style="color: #000000;">9</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">14</span> <span style="color: #000000;">2017</span> Initialization Sequence Completed</pre></pre></div></div><br />
<br />
Sur le client, on note la création de l'interface tun0<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost etc<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ifconfig -a</span>
enp0s3: <span style="color: #007800;">flags</span>=<span style="color: #000000;">4163</span><span style="color: #000000; font-weight: bold;"><</span>UP,BROADCAST,RUNNING,MULTICAST<span style="color: #000000; font-weight: bold;">></span>  mtu <span style="color: #000000;">1500</span>
        inet 192.168.1.16  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::a00:27ff:fe6c:<span style="color: #000000;">9323</span>  prefixlen <span style="color: #000000;">64</span>  scopeid 0x20<span style="color: #000000; font-weight: bold;"><</span><span style="color: #c20cb9; font-weight: bold;">link</span><span style="color: #000000; font-weight: bold;">></span>
        inet6 2a01:cb19:1a2:<span style="color: #000000;">5200</span>:a00:27ff:fe6c:<span style="color: #000000;">9323</span>  prefixlen <span style="color: #000000;">64</span>  scopeid 0x0<span style="color: #000000; font-weight: bold;"><</span>global<span style="color: #000000; font-weight: bold;">></span>
        ether 08:00:<span style="color: #000000;">27</span>:6c:<span style="color: #000000;">93</span>:<span style="color: #000000;">23</span>  txqueuelen <span style="color: #000000;">1000</span>  <span style="color: #7a0874; font-weight: bold;">&#40;</span>Ethernet<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        RX packets <span style="color: #000000;">5588</span>  bytes <span style="color: #000000;">4858530</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">4.6</span> MiB<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        RX errors <span style="color: #000000;">0</span>  dropped <span style="color: #000000;">13</span>  overruns <span style="color: #000000;">0</span>  frame <span style="color: #000000;">0</span>
        TX packets <span style="color: #000000;">1892</span>  bytes <span style="color: #000000;">202555</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">197.8</span> KiB<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        TX errors <span style="color: #000000;">0</span>  dropped <span style="color: #000000;">0</span> overruns <span style="color: #000000;">0</span>  carrier <span style="color: #000000;">0</span>  collisions <span style="color: #000000;">0</span>
lo: <span style="color: #007800;">flags</span>=<span style="color: #000000;">73</span><span style="color: #000000; font-weight: bold;"><</span>UP,LOOPBACK,RUNNING<span style="color: #000000; font-weight: bold;">></span>  mtu <span style="color: #000000;">65536</span>
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::<span style="color: #000000;">1</span>  prefixlen <span style="color: #000000;">128</span>  scopeid 0x10<span style="color: #000000; font-weight: bold;"><</span>host<span style="color: #000000; font-weight: bold;">></span>
        loop  txqueuelen <span style="color: #000000;">1</span>  <span style="color: #7a0874; font-weight: bold;">&#40;</span>Boucle locale<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        RX packets <span style="color: #000000;">16</span>  bytes <span style="color: #000000;">1094</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1.0</span> KiB<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        RX errors <span style="color: #000000;">0</span>  dropped <span style="color: #000000;">0</span>  overruns <span style="color: #000000;">0</span>  frame <span style="color: #000000;">0</span>
        TX packets <span style="color: #000000;">16</span>  bytes <span style="color: #000000;">1094</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1.0</span> KiB<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        TX errors <span style="color: #000000;">0</span>  dropped <span style="color: #000000;">0</span> overruns <span style="color: #000000;">0</span>  carrier <span style="color: #000000;">0</span>  collisions <span style="color: #000000;">0</span>
tun0: <span style="color: #007800;">flags</span>=<span style="color: #000000;">4305</span><span style="color: #000000; font-weight: bold;"><</span>UP,POINTOPOINT,RUNNING,NOARP,MULTICAST<span style="color: #000000; font-weight: bold;">></span>  mtu <span style="color: #000000;">1500</span>
        inet 10.8.0.6  netmask 255.255.255.255  destination 10.8.0.5
        inet6 fe80::a4fb:abd2:<span style="color: #000000;">8138</span>:<span style="color: #000000;">6018</span>  prefixlen <span style="color: #000000;">64</span>  scopeid 0x20<span style="color: #000000; font-weight: bold;"><</span><span style="color: #c20cb9; font-weight: bold;">link</span><span style="color: #000000; font-weight: bold;">></span>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen <span style="color: #000000;">100</span>  <span style="color: #7a0874; font-weight: bold;">&#40;</span>UNSPEC<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        RX packets <span style="color: #000000;">0</span>  bytes <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.0</span> B<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        RX errors <span style="color: #000000;">0</span>  dropped <span style="color: #000000;">0</span>  overruns <span style="color: #000000;">0</span>  frame <span style="color: #000000;">0</span>
        TX packets <span style="color: #000000;">6</span>  bytes <span style="color: #000000;">288</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">288.0</span> B<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        TX errors <span style="color: #000000;">0</span>  dropped <span style="color: #000000;">0</span> overruns <span style="color: #000000;">0</span>  carrier <span style="color: #000000;">0</span>  collisions <span style="color: #000000;">0</span>
&nbsp;</pre></pre></div></div><br />
<br />
Sur le serveur, on voit la connexion s'établir :<br />
<br />
<div class="formatter-container formatter-code code-TEXT"><span class="formatter-title">Code TEXT : </span><div class="formatter-content"><pre style="display:inline;"><pre class="text" style="font-family:monospace;">Sat Jun  3 18:44:42 2017 192.168.1.16:55809 TLS: Initial packet from [AF_INET]192.168.1.16:55809, sid=d03d78cc 43d44f6f
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 VERIFY OK: depth=1, C=FR, ST=FRANCE, L=Bordeaux, O=vouf.fr, OU=changeme, CN=serveurmga, name=vouf, emailAddress=mail@host.domain
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 VERIFY OK: depth=0, C=FR, ST=FRANCE, L=Bordeaux, O=vouf.fr, OU=changeme, CN=clientmga, name=vouf, emailAddress=mail@host.domain
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 peer info: IV_VER=2.4.0
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 peer info: IV_PLAT=linux
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 peer info: IV_PROTO=2
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 peer info: IV_NCP=2
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 peer info: IV_LZ4=1
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 peer info: IV_LZ4v2=1
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 peer info: IV_LZO=1
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 peer info: IV_COMP_STUB=1
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 peer info: IV_COMP_STUBv2=1
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 peer info: IV_TCPNL=1
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Sat Jun  3 18:44:42 2017 192.168.1.16:55809 [clientmga] Peer Connection Initiated with [AF_INET]192.168.1.16:55809
Sat Jun  3 18:44:42 2017 clientmga/192.168.1.16:55809 MULTI_sva: pool returned IPv4=10.8.0.6, IPv6=(Not enabled)
Sat Jun  3 18:44:42 2017 clientmga/192.168.1.16:55809 MULTI: Learn: 10.8.0.6 -> clientmga/192.168.1.16:55809
Sat Jun  3 18:44:42 2017 clientmga/192.168.1.16:55809 MULTI: primary virtual IP for clientmga/192.168.1.16:55809: 10.8.0.6
Sat Jun  3 18:44:43 2017 clientmga/192.168.1.16:55809 PUSH: Received control message: 'PUSH_REQUEST'
Sat Jun  3 18:44:43 2017 clientmga/192.168.1.16:55809 SENT CONTROL [clientmga]: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 208.67.222.222,dhcp-option DNS 208.67.220.220,route 10.8.0.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5,peer-id 0,cipher AES-256-GCM' (status=1)
Sat Jun  3 18:44:43 2017 clientmga/192.168.1.16:55809 Data Channel Encrypt: Cipher 'AES-256-GCM' initialized with 256 bit key
Sat Jun  3 18:44:43 2017 clientmga/192.168.1.16:55809 Data Channel Decrypt: Cipher 'AES-256-GCM' initialized with 256 bit key</pre></pre></div></div><br />
<br />
Si on rencontre des soucis de connexion, on peut être amené à relancer le pare feu du client si celui ci est actif afin de prendre en compte la présence de l'interface tun0.<br />
<br />
<img src="https://www.mageialinux-online.org/upload/screenshot_20170611_151432.png" alt="screenshot_20170611_151432" title="screenshot_20170611_151432" /><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-verification-du-bon-usage-du-vpn">Vérification du bon usage du VPN</h2><br />

<br />
<br />
Il s'agit de vérifier si une fois connecté au serveur VPN, les échanges réseaux transitent bien par celui ci.<br />
<br />
En utilisant la commande traceroute sur le client, on voit que l'on transite par 10.8.0.1 qui est l'adresse IP de l'interface tun0 du serveur vpn<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost etc<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># traceroute www.mageialinux-online.org</span>
traceroute to www.mageialinux-online.org <span style="color: #7a0874; font-weight: bold;">&#40;</span>80.247.225.3<span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #000000;">30</span> hops max, <span style="color: #000000;">60</span> byte packets
 <span style="color: #000000;">1</span>  10.8.0.1 <span style="color: #7a0874; font-weight: bold;">&#40;</span>10.8.0.1<span style="color: #7a0874; font-weight: bold;">&#41;</span>  <span style="color: #000000;">0.794</span> ms  <span style="color: #000000;">0.791</span> ms  <span style="color: #000000;">0.791</span> ms
 <span style="color: #000000;">2</span>  <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span>
 <span style="color: #000000;">3</span>  80.10.245.33<span style="color: #7a0874; font-weight: bold;">&#40;</span>80.10.245.33<span style="color: #7a0874; font-weight: bold;">&#41;</span>  <span style="color: #000000;">4.864</span> ms  <span style="color: #000000;">6.594</span> ms  <span style="color: #000000;">6.758</span> ms
 <span style="color: #000000;">4</span>  <span style="color: #000000; font-weight: bold;">******</span>
<span style="color: #000000;">17</span>  <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #000000;">18</span>  atalante.nfrance.com <span style="color: #7a0874; font-weight: bold;">&#40;</span>80.247.225.3<span style="color: #7a0874; font-weight: bold;">&#41;</span>  <span style="color: #000000;">32.787</span> ms  <span style="color: #000000;">33.213</span> ms  <span style="color: #000000;">33.707</span> ms</pre></pre></div></div><br />
<br />
La commande nslookup nous permettra de vérifier qu'on utilise bien les DNS du serveur vpn<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost etc<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># nslookup mageialinux-online.org</span>
Server:         208.67.222.222
Address:        208.67.222.222<span style="color: #666666; font-style: italic;">#53</span>
Non-authoritative answer:
Name:   mageialinux-online.org
Address: 80.247.225.3
&nbsp;</pre></pre></div></div><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-sources-d-information-qui-ont-permis-de-produire-ce-tutorial">Sources d'information qui ont permis de produire ce tutorial</h2><br />

<br />
<br />
<a href="https://open-freax.fr/monter-vpn-openvpn/" target="_blank">[Tuto] Monter son VPN perso avec OpenVPN</a>  . Un grand merci pour son travail, sans lui ce tutoriel n'aurait pas pu voir le jour !<br />
<br />
<a href="https://www.mageialinux-online.org/forum/topic-21409.php#m227352" target="_blank">Fil de discussion sur le forum MLO</a><br />
<br />
<p style="text-align: right;"><span style="font-size: 10px;">Écrit par: <a href="https://www.mageialinux-online.org/member/member-1246.php" target="_blank">vouf</a>, Le:  11/06/2017</span></p>]]></description>
                <pubDate>Sat, 24 Jul 2021 17:36:17 +0200</pubDate>
                
            </item>
		
            <item>
                <title><![CDATA[Configuration du réseau pour Nextcloud en local]]></title>
                <link>https://www.mageialinux-online.org/wiki/configuration-du-reseau-pour-nextcloud-en-local</link>
                <guid>https://www.mageialinux-online.org/wiki/configuration-du-reseau-pour-nextcloud-en-local</guid>
                <description><![CDATA[Cet article est ciblé sur l'utilisation d'un serveur Nextcloud avec une Livebox pour un accès uniquement local. Un tel serveur permet de partager des fichiers entre plusieurs utilisateurs, ou de fournir un calendrier et un carnet d'adresses partagé entre plusieurs dispositifs.<br />
Il n'explique pas comment installer Nextcloud. Cependant, les explications que l'on trouve le plus souvent sont pour des serveurs externes et l'accès à l'intérieur d'un réseau local est rarement expliqué. J'ai exploré plusieurs voies sans issues avant de trouver la bonne.<br />
Les explications qui suivent ne sont pas spécifiques à Mageia. Elles ne sont pas spécifiques à Nextcloud non plus, mais ce dernier refuse l'autorisation de se connecter si on utilise directement son adresse IP.<br />
<br />
On suppose que le serveur pourrait héberger autre chose que Nextcloud. C'est pourquoi on configure apache avec un hôte virtuel. De mon côté, je l'ai mis sur la partition qui contient /home, qui est très large, afin de ne pas être limité par la place.<br />
Voilà ce que donne le fichier nuage.conf :<br />
<fieldset class="formatter-container formatter-fieldset" style=""><legend>nuage.conf</legend><div class="formatter-content"><br />
<VirtualHost *:80><br />
        ServerName nuage.home<br />
<br />
        ServerAdmin apache@localhost<br />
        DocumentRoot /home/nuage<br />
</VirtualHost><br />
<Directory /home/nuage >                                                                                                 <br />
   Order allow,deny                                                                                                      <br />
   Allow from all                                                                                                        <br />
   # New directive needed in Apache 2.4.3:                                                                               <br />
   Require all granted                                                                                                   <br />
</Directory>     <br />
</div></fieldset><br />
La directive Directory indique où se trouvent les fichiers du serveur.<br />
<br />
L'important à savoir, c'est que la Livebox fournit un service DNS au réseau local, et considère que celui-ci a le nom de domaine <strong>home</strong>. Donc, l'accès au serveur se fera par un nom qui aura l'extension .home, ici <strong>nuage.home</strong> dans le paramètre ServerName.<br />
<br />
Tous les appareils qui se connectent par DHCP à la box reçoivent comme adresse DNS l'adresse de la box. Ce qui fait que les requêtes de nom de domaine transitent par le service DNS de la box. Ce service intercepte les requêtes qui se terminent en .home pour les résoudre localement.<br />
Il faut donc ajouter le nom du serveur au service de la box pour que les requêtes à nuage.home arrivent à notre serveur.<br />
Ainsi, il n'est pas nécessaire d'avoir ni service avahi/mDNS/zeroconf, ni de configurer les fichiers <em>hosts</em> des clients.<br />
Il est préférable, mais non nécessaire, de configurer le DHCP pour avoir une IP permanente pour le serveur.<br />
<img src="https://www.mageialinux-online.org/upload/dhcp_69193.jpg" alt="dhcp_69193" title="dhcp_69193" /><br />
Dans les paramètres du réseau, onglet DNS, on ajoute un nom pour notre serveur, ici <strong>nuage</strong>.<br />
<img src="https://www.mageialinux-online.org/upload/config-dns.jpg" alt="config-dns" title="config-dns" /><br />
On vérifie que les paramètres sont reconnus :<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ping</span> nuage.home
PING nuage.home <span style="color: #7a0874; font-weight: bold;">&#40;</span>192.168.1.XX<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">56</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">84</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> bytes of data.
<span style="color: #000000;">64</span> bytes from nuage.local <span style="color: #7a0874; font-weight: bold;">&#40;</span>192.168.1.XX<span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #007800;">icmp_seq</span>=<span style="color: #000000;">1</span> <span style="color: #007800;">ttl</span>=<span style="color: #000000;">64</span> <span style="color: #007800;">time</span>=<span style="color: #000000;">2.45</span> ms
<span style="color: #000000;">64</span> bytes from nuage.local <span style="color: #7a0874; font-weight: bold;">&#40;</span>192.168.1.XX<span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #007800;">icmp_seq</span>=<span style="color: #000000;">2</span> <span style="color: #007800;">ttl</span>=<span style="color: #000000;">64</span> <span style="color: #007800;">time</span>=<span style="color: #000000;">3.94</span> ms</pre></pre></div></div><br />
<br />
Maintenant, tous les appareils du réseau local accèdent au serveur sur l'adresse <a href="http://nuage.home." target="_blank">http://nuage.home.</a> Le serveur est content également car on y accède par son nom.]]></description>
                <pubDate>Fri, 19 Jun 2020 23:01:20 +0200</pubDate>
                
            </item>
		
            <item>
                <title><![CDATA[Paramétrage des réseaux et des VLAN avec la commande ip]]></title>
                <link>https://www.mageialinux-online.org/wiki/parametrage-des-reseaux-et-des-vlan-avec-la-commande-ip</link>
                <guid>https://www.mageialinux-online.org/wiki/parametrage-des-reseaux-et-des-vlan-avec-la-commande-ip</guid>
                <description><![CDATA[<img src="https://www.linuxtricks.fr/upload/ethernet_cable.png" alt="ethernet_cable" title="ethernet_cable" /><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-definition-de-la-commande-ip">Définition de la commande IP</h2><br />

La commande IP est une commande un peu fourre-tout très utile pour faire beaucoup de choses ayants traits au réseau. Il permet notamment de modifier et visualiser vos adresses IP.<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-visualisation-et-modification-des-adresses-ip">Visualisation et modification des adresses IP</h2><br />

<h3 class="formatter-title wiki-paragraph-3" id="paragraph-visualisations">Visualisations</h3><br />

On peut faire la commande suivante :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip addr</span></pre></pre></div></div><br />
<br />
Ceci va lister toutes les interface et afficher toutes les informations disponibles (adresses IP, adresses MAC, masques de sous-réseaux, adresses de broadcast&#8230<img src="https://www.mageialinux-online.org/images/smileys/6.gif" alt=";)" title=";)" class="smiley" /> :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">&nbsp;
<span style="color: #000000;">1</span>: lo: <span style="color: #000000; font-weight: bold;"><</span>LOOPBACK,UP,LOWER_UP<span style="color: #000000; font-weight: bold;">></span> mtu <span style="color: #000000;">65536</span> qdisc noqueue state UNKNOWN group default
    link<span style="color: #000000; font-weight: bold;">/</span>loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span> brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">128</span> scope host
       valid_lft forever preferred_lft forever
<span style="color: #000000;">2</span>: enp2f0s1: <span style="color: #000000; font-weight: bold;"><</span>BROADCAST,MULTICAST,UP,LOWER_UP<span style="color: #000000; font-weight: bold;">></span> mtu <span style="color: #000000;">1500</span> qdisc pfifo_fast state UNKNOWN group default qlen <span style="color: #000000;">1000</span>
    link<span style="color: #000000; font-weight: bold;">/</span>ether 00:0c:<span style="color: #000000;">29</span>:8c:b2:02 brd ff:ff:ff:ff:ff:ff
    inet 192.168.74.128<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span> brd 192.168.74.255 scope global enp2f0s1
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe8c:b202<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">64</span> scope <span style="color: #c20cb9; font-weight: bold;">link</span>
       valid_lft forever preferred_lft forever
&nbsp;</pre></pre></div></div><br />
<br />
On peut aussi filtrer les résultats, et n'afficher que les adresses IPv4 :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip</span> <span style="color: #660033;">-4</span> addr</pre></pre></div></div><br />
<br />
Ou encore les IPv6 :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip</span> <span style="color: #660033;">-6</span> addr</pre></pre></div></div><br />
<br />
On peut aussi afficher seulement l'IPv4 sur une interface définie :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip</span> <span style="color: #660033;">-4</span> addr show enp2f0s1</pre></pre></div></div><br />
<br />
On peut aussi afficher seulement les interfaces qui ont été démarrées (état "up")<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip link</span> <span style="color: #c20cb9; font-weight: bold;">ls</span> up</pre></pre></div></div><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-modifications">Modifications</h2><br />

En effet, la commande IP permet également d'effectuer des modifications sur nos interfaces réseaux. On peut notamment assigner une adresse IP à une interface :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip addr</span> add 192.168.74.100<span style="color: #000000; font-weight: bold;">/</span>255.255.255.0 dev enp2f0s1</pre></pre></div></div><br />
<br />
Le masque (255.255.255.0) peut être raccourci grâce au CIDR (équivalence du masque représentant le nombre de bits à 1 du masque. 255.255.255.0 = 24) ce qui nous donne la commande suivance :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip addr</span> add 192.168.74.100<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span> dev enp2f0s1</pre></pre></div></div><br />
<br />
On peut activer (up) ou desactiver (down) une interface :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">&nbsp;
<span style="color: #c20cb9; font-weight: bold;">ip link</span> <span style="color: #000000; font-weight: bold;">set</span> dev enp2f0s1 up
<span style="color: #c20cb9; font-weight: bold;">ip link</span> <span style="color: #000000; font-weight: bold;">set</span> dev enp2f0s1 down
&nbsp;</pre></pre></div></div><br />
<br />
Si besoin, on peut aussi supprimer l'adresse que l'on a allouée.<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip addr</span> del 192.168.74.100<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span> dev enp2f0s1</pre></pre></div></div><br />
<br />
On peut modifier la passerelle par défaut.<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip route</span> add default via 192.168.74.254</pre></pre></div></div><br />
<br />
On peut également modifier le mtu ( taille maximale des paquets transmis par la carte, peut être modifié, en connaissance de cause, notemment pour améliorer la transmission des données pour les jeux vidéos notemment ) grace à la commande suivante :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip link</span> <span style="color: #000000; font-weight: bold;">set</span> mtu <span style="color: #000000;">9000</span> dev enp2f0s1</pre></pre></div></div><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-gestion-des-vlans">Gestion des vlans</h2><br />

<h3 class="formatter-title wiki-paragraph-3" id="paragraph-un-vlan-c-est-quoi-e">Un vlan, c'est quoi ?</h3><br />

Pour résumer, un vlan permet d'avoir plusieurs switchs en un seul. Ainsi, on peut faire cohabiter plusieurs réseaux sur un seul switchs. Cette technique est très utilisée notamment en entreprise, le plus souvent pour séparer la partie voix sur IP de la partie réseau purement informatique (entre bien d'autres cas plus exotiques les uns que les autres)<br />
En règle générale, si vous ne savez pas ce que c'est un vlan, et que vous ne bidouillez pas du réseau, cet article n'est pas pour vous. Ceci concerne en effet du paramétrage réseau assez avancé, dont vous n'aurez pas besoin pour faire fonctionner votre ordinateur derrière une simple box. De fait, pour pouvoir suivre, vous devrez avoir des bases en matières de réseaux IP.<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-creer-un-vlan-sur-sa-carte-reseau">Créer un vlan sur sa carte réseau</h3><br />

Il existe plusieurs types de ports : Les ports en accès et les ports tagués. Pour les ports en accès, il n'y a aucun problème, ça se comporte comme un port normal (on branche, et ça marche). Avec un port tagué, c'est un peu plus compliqué : il faut que la carte réseau de l'ordinateur ajoute un tag aux trames qu'elle envoi. Du côté de Windows, il faut souvent avoir des pilotes spéciaux pour pouvoir le faire, et ça peut être assez compliqué. Sous Linux et Mageia (comme souvent) c'est beaucoup plus simple. Bien que la carte réseau doit être compatible avec la norme pour les tags de vlan (802.1q).<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-comment-on-fait-e">Comment on fait ?</h3><br />

C'est l'affaire de trois petites lignes de commandes pour faire fonctionner tout ça. Les lignes de commandes suivantes seront à lancer en tant que root. Nous utiliserons essentiellement la commande " ip ".<br />
<br />
<h4 class="formatter-title wiki-paragraph-4" id="paragraph-creation-d-une-interface-virtuelle">Création d'une interface virtuelle</h4><br />

<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip link</span> add <span style="color: #c20cb9; font-weight: bold;">link</span> enp2s0f1 name enp2s0f1.100 <span style="color: #7a0874; font-weight: bold;">type</span> vlan <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">100</span></pre></pre></div></div><br />
On voit donc ici qu'on ajoute un lien à l'interface enp2s0f1 (interface ethernet). On indique le nom de cette nouvelle interface (enp2s0f1.100 avec 100 pour le numéro de notre vlan) puis on indique que le type de cette interface est pour le vlan dont l'id est 100.<br />
<h4 class="formatter-title wiki-paragraph-4" id="paragraph-on-indique-une-adresse-ip-a-cette-interface">On indique une adresse IP à cette interface</h4><br />

Oui, c'est quand mieux si on veut pouvoir se connecter aux autres éléments présents dans le réseau virtuel.<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip addr</span> add 192.168.100.1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span> brd 192.168.100.255 dev enp2s0f1.100</pre></pre></div></div><br />
On indique donc ici l'adresse ip avec son CIDR (masque de sous-réseau 24=255.255.255.0). On doit aussi indiquer une adresse de broadcast, puis on met tout ça sur notre interface virtuelle enp2s0f1.100.<br />
<h4 class="formatter-title wiki-paragraph-4" id="paragraph-on-demarre-l-interface">On démarre l'interface</h4><br />

Ici rien de sorcier, on démarre l'interface crée précédemment.<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip link</span> <span style="color: #000000; font-weight: bold;">set</span> dev enp2s0f1.100 up</pre></pre></div></div><br />
<br />
<br />
À cette étape tout est sensé fonctionné normalement.<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-et-pour-enlever-tout-ca-e">Et pour enlever tout ça ?</h3><br />

Si vous voulez tout remettre en état, vous avez la possibilité soit de désactiver l'interface que vous avez crée :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip link</span> <span style="color: #000000; font-weight: bold;">set</span> dev enp2s0f1.100 down</pre></pre></div></div><br />
Vous pouvez aussi carrément la supprimer :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ip link</span> delete enp2s0f1.100</pre></pre></div></div><br />
<br />
<br />
<span style="font-size: 10px;">(Article librement inspiré de <a href="https://www.linuxtricks.fr/wiki/reseau-il-ne-faut-plus-utiliser-ifconfig-mais-la-commande-ip" target="_blank">l'article de Linuxtricks</a> sur la commande IP et du <a href="https://wiki.archlinux.org/index.php/VLAN" target="_blank">wiki ArchLinux</a> sur les VLAN)</span>]]></description>
                <pubDate>Wed, 29 Jan 2020 10:51:04 +0100</pubDate>
                
            </item>
		
            <item>
                <title><![CDATA[Utiliser un adaptateur USB/Série]]></title>
                <link>https://www.mageialinux-online.org/wiki/utiliser-un-adaptateur-usb-serie</link>
                <guid>https://www.mageialinux-online.org/wiki/utiliser-un-adaptateur-usb-serie</guid>
                <description><![CDATA[<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-le-port-serie-c-est-quoi-e">Le port série, c'est quoi ?</h2><br />

Le port série est une technologie assez ancienne, elle peut aussi être appelée RS232 (la norme la plus répandue de la connexion série). Ce type de connexion peut servir à prendre la main sur certains composants notamment dans le domaine des réseaux (switchs ou routeurs pour ne citer qu'eux).<br />
<p style="text-align: center;"><img src="https://upload.wikimedia.org/wikipedia/commons/8/87/RS-232.jpeg" alt="" /></p><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-un-adaptateur-usbserie">Un adaptateur USB/Série</h2><br />

À une époque, les ports série étaient souvent directement sur la carte mère de l'ordinateur, ou même sous forme de carte PCI. Cette méthode de connexion étant beaucoup moins utilisé aujourd'hui, on trouve moins souvent ce type de port directement sur l'ordinateur, encore moins sur les ordinateurs portables. On passe donc par une petite interface qui se branche en USB.<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-comment-faire-fonctionner-tout-ceci-sous-mageia">Comment faire fonctionner tout ceci sous Mageia</h2><br />

C'est assez simple. Mais il faut quand même passer par la ligne de commande.<br />
<strong>1.</strong>Dans un premier temps, il faut trouver notre matériel sur notre système. Pour cela il existe deux méthodes :<br />
<strong>Avec le Centre de contrôle Mageia</strong><br />
Allez dans la section « Matériel » et « Recherche et Configuration du matériel » votre périphérique devrait apparaitre dans la partie « Inconnus/Autres ».<br />
<strong>En ligne de commande : </strong><br />
Il faut faire une première fois la commande, avec l'adaptateur débranché <div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">lsusb</pre></pre></div></div><br />
Ceci permet d'afficher tous les périphériques usb connectés.<br />
Ensuite, branchez votre adaptateur, et refaite la dernière commande. Vous verrez alors apparaitre votre périphérique.<br />
Votre périphérique dans la liste sera affiché de cette façon :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">Bus 001 Device 005: ID 067b:<span style="color: #000000;">2303</span> Prolific Technology, Inc. PL2303 Serial Port</pre></pre></div></div><br />
<br />
<strong>2.</strong>Il faut ensuite monter le périphérique. Pour faire ceci, il est obligatoire de passer par la ligne de commande.<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">modprobe</span> usbserial <span style="color: #007800;">vendor</span>=0x067b <span style="color: #007800;">product</span>=0x2303</pre></pre></div></div><br />
Les parties « vendor » et « product » sont facilement identifiables à partir du Centre de contrôle Mageia (Identifiant fabricant et Identifiant du périphérique). Si vous êtes passez par la ligne de commande ces deux informations seront dans la partie ID de votre résultat. Auquel il faudra ajouter un petit 0x devant (qui précise le format héxadécimal).<br />
<br />
<strong>3.</strong>Il peut être bien de vérifier si le pilote a bien été ajouté. Il devrait normalement apparaitre dans le dossier /dev/ sous le nom de ttyUSB0.<br />
<br />
<strong>4.</strong>Adaptez les droits du fichier /dev/ttyUSB0 (avec chown et autre chmod), pour pouvoir lire et écrire dessus.<br />
Par exemple, en entrant la ligne suivante en root :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chown</span> nomutilisateur <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ttyUSB0</pre></pre></div></div><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-utilisation-avec-putty">Utilisation avec Putty</h2><br />

Vous pouvez utiliser Putty pour vous connecter de manière graphique en liaison série. Pour l'installer : <div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">urpmi putty</pre></pre></div></div><br />
Lancez-le, cliquez sur la case Serial (série en anglais) et mettez le nom de votre liaison série.<br />
<p style="text-align: center;"><img src="https://www.mageialinux-online.org/upload/screenshot_2016-12-22_10-15-13.png" alt="" /> </p><br />
Connectez-vous au composant en appuyant sur « Open », ceci devrait fonctionner.<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-utilisation-avec-minicom">Utilisation avec Minicom</h2><br />

Minicom permet de se connecter en liaison série à partir d'un terminal.<br />
Pour l'installer :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">urpmi minicom</pre></pre></div></div><br />
Dans un premier temps, il faut modifier les paramètres pour pouvoir se connecter à la liaison, avec la bonne vitesse, les bon bits de parité, etc.<br />
Pour ce faire, pour le premier lancement, <strong>en root</strong>, tapez la commande suivante :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">minicom <span style="color: #660033;">-s</span></pre></pre></div></div><br />
Ceci démarrera Minicom avec le menu suivant :<br />
<p style="text-align: center;"><img src="https://www.mageialinux-online.org/upload/menudemarrage.png" alt="" /></p><br />
Allez dans le menu " Configuration du port série ". Pour naviguer dans ce menu, utilisez la lettre de la ligne désirée (par exemple pour le débit tapez E).<br />
Pour communiquer avec des composants réseaux (Cisco, Avaya, Alcatel-Lucent...) les réglages usuels sont les suivants :<br />
<p style="text-align: center;"><img src="https://www.mageialinux-online.org/upload/menureglageserial.png" alt="" /></p><br />
Ensuite quitter le menu de " Configuration du port série " (Echap) et choisissez " Enregistrer config. sous dfl " ainsi, votre configuration sera sauvegardée. Pour avoir accès à votre liaison série, faites "Quitter" (PAS "Quitter Minicom")<br />
Ensuite, vous devriez avoir accès à votre liaison.<br />
Pour quitter Minicom, faites ctrl+a et x.]]></description>
                <pubDate>Tue, 09 Apr 2019 10:48:05 +0200</pubDate>
                
            </item>
		
            <item>
                <title><![CDATA[Tutoriel configuration d'un serveur LAMP]]></title>
                <link>https://www.mageialinux-online.org/wiki/tutoriel-configuration-d-un-serveur-lamp</link>
                <guid>https://www.mageialinux-online.org/wiki/tutoriel-configuration-d-un-serveur-lamp</guid>
                <description><![CDATA[<p style="text-align: center;"><img src="https://www.mageialinux-online.org/upload/lamp_logo.gif" alt="" /></p><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-introduction">Introduction</h2><br />

<br />
LAMP est un acronyme :<br />
<ul class="formatter-ul">
    <li class="formatter-li"><strong>L</strong>inux : Le système d'exploitation
    </li><li class="formatter-li"><strong>A</strong>pache : Le serveur Web
    </li><li class="formatter-li"><strong>M</strong>ySQL : Le serveur de Base de données
    </li><li class="formatter-li"><strong>P</strong>HP : Le langage de script<br />
</li></ul><br />
<br />
Avec LAMP, on peut donc mettre en place un serveur Web, hébergeant un site web dynamique écrit en PHP, tout en allant chercher des données dans une base MySQL/Mariadb.<br />
Certaines distributions dont Mageia, proposent un métapaquet appelé LAMP pour installer le tout en une seule commande.<br />
<br />
Mageia a fait le choix dès sa version 2 de privilégier le fork de Mysql qui se nomme Mariadb. Vous ne remarquerez pas à l'usage de différence notable entre ces deux logiciels.<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-installation">Installation</h2><br />

<br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-avec-le-metapaquet">Avec le métapaquet </h3><br />

<br />
Installer le méta-paquetage task-lamp pour installer tous les services associés (Apache, MySQL/Mariadb et PHP)<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">urpmi task-lamp</pre></pre></div></div><br />
<br />
Ou simplement avec le CCM de Mageia.<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-important">Important</h3><br />

<br />
Cette méthode est spécifique à Mageia 6.<br />
(<span style="text-decoration: underline;"><em>Elle peut également fonctionner pour les versions précédentes de Mageia</em></span>).<br />
<br />
Vous pouvez consulter cette <a href="https://www.mageialinux-online.org/wiki/installer-un-serveur-lamp-sous-mageia" target="_blank">méthode</a>  très proche.<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-instructions">Instructions</h3><br />

<br />
Une fois que  "task-lamp" est installé.<br />
À l'aide de la "console", tout ce qui suivra sera à faire en "<strong>root</strong>"<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-configuration">Configuration</h2><br />

<br />
Pour démarrer le service "lamp"<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">systemctl start httpd</pre></pre></div></div><br />
<br />
et<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">systemctl <span style="color: #7a0874; font-weight: bold;">enable</span> mysqld</pre></pre></div></div><br />
<br />
ensuite taper<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">systemctl start mysqld</pre></pre></div></div><br />
<br />
Création du mot de passe root pour mariadb (par mesure de sécurité différent du root système).<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-u</span> root</pre></pre></div></div><br />
<br />
Vous verrez:   <strong>(Welcome to the MariaDB..............)</strong><br />
<br />
<br />
Dans un doc texte, taper ceci (en changeant la partie "votre_mot_de_passe")<br />
et coller le dans la "console":<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">&nbsp;
SET password FOR root<span style="color: #000000; font-weight: bold;">@</span>localhost = password<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'votre_mot_de_passe'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;
FLUSH privileges;
quit;
&nbsp;</pre></pre></div></div><br />
<br />
La création du password se fait<br />
<span style="text-decoration: underline;">vous verrez cette ligne</span>:<br />
<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">quit;</pre></pre></div></div><br />
<br />
(appuyez sur "ENTRÉE")<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-securise-le-programme">Sécurisé le programme</h3><br />

<br />
Taper dans la console:<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">mysql_secure_installation</pre></pre></div></div><br />
<br />
<br />
<div class="formatter-container formatter-code code-TEXT"><span class="formatter-title">Code TEXT : </span><div class="formatter-content"><pre style="display:inline;"><pre class="text" style="font-family:monospace;">&nbsp;
Enter current password for root (enter for none)
(Entrez le mot de passe actuel root (mariadb) ou taper juste "entrée" si pas de mot de passe):
&nbsp;
Change the root password? [Y/n] n <--- ici "n" si vous voulez garder le mot passe root ou "y" pour le changer
 ... skipping.
tout ce qui suit garder les choix par défaut (bien sur vous pouvez ne pas suivre le choix par défaut libre à vous)
Remove anonymous users? [Y/n] y
 ... Success!
Disallow root login remotely? [Y/n] y
 ... Success!
Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!
Reload privilege tables now? [Y/n] y
 ... Success!
Cleaning up...
All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
&nbsp;</pre></pre></div></div><br />
<br />
<br />
<br />
La sécurisation est finie.<br />
<br />
<br />
Rajouter les droits "<strong>chmod</strong>" pour lire écrire sur ce dossier:<br />
/var/www/html/<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-les-liens">Les liens</h3><br />

<br />
Ouvrir dans le navigateur:       <a href="http://127.0.0.1/" target="_blank">http://127.0.0.1/</a><br />
<br />
Si la page affiche: "It works!" apache est bien installé.<br />
<br />
<br />
L'accès à phpmyadmin: <a href="http://127.0.0.1/phpmyadmin" target="_blank">http://127.0.0.1/phpmyadmin</a><br />
<em><strong>Bienvenue à phpMyAdmin </strong></em><br />
login:   root<br />
pass:<br />
<br />
L'accès aux pages:    <a href="http://127.0.0.1/" target="_blank">http://127.0.0.1/</a><br />
L'accès au dossier de travail est ici: /var/www/html/<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-ajouter-le-ssl">Ajouter le SSL</h2><br />

<br />
Essayer d'ouvrir d'abord:<br />
<a href="https://127.0.0.1/" target="_blank">https://127.0.0.1/</a><br />
<br />
Si vous obtenez une page "<em>erreur</em>".<br />
<br />
<br />
Ajouter le paquet depuis votre CCM:<br />
<strong>apache-mod_ssl</strong><br />
<br />
Relancer:<br />
<a href="https://127.0.0.1/" target="_blank">https://127.0.0.1/</a><br />
Confirmer l'exception de sécurité.<br />
<br />
<span style="text-decoration: underline;">Voilà c'est fini</span>.<br />
<br />
<br />
<span style="text-decoration: underline;">Copie du tutoriel disponible ici</span>:  <a href="https://wiki.mageia.org/en/Installation_d%27un_serveur_LAMP" target="_blank">Task-lamp-installation-fr</a>]]></description>
                <pubDate>Wed, 27 Mar 2019 12:01:20 +0100</pubDate>
                
            </item>
		
            <item>
                <title><![CDATA[Synchroniser son agenda et son carnet d'adresses entre Thunderbird et Android]]></title>
                <link>https://www.mageialinux-online.org/wiki/synchroniser-son-agenda-et-son-carnet-d-adresses-entre-thunderbird-et-android</link>
                <guid>https://www.mageialinux-online.org/wiki/synchroniser-son-agenda-et-son-carnet-d-adresses-entre-thunderbird-et-android</guid>
                <description><![CDATA[<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-les-pre-requis">Les pré-requis</h2><br />

<br />
<br />
Pour commencer, il vous faut Thunderbird plus les extensions <strong>Lightning</strong>, ça c&#8217;est pour l&#8217;agenda et <strong>Cardbook</strong>, ça c&#8217;est pour le carnet d&#8217;adresses.<br />
<br />
<strong><span style="font-size: 15px;">OU</span></strong> <strong>TbSync</strong> et <strong>Provider for CalDAV & CardDAV</strong> qui utilisera Lightning et les carnets d&#8217;adresse de Thunderbird. Pour cette option, il faut une version de Thunderbird récente.<br />
<br />
<strong>À savoir</strong> : Lightning est intégré aux dernières versions de Thunderbird, il n&#8217;est donc pas nécessaire de l&#8217;ajouter à partir des versions 60.<br />
<br />
Ensuite, il vous faut un <strong>serveur Nextcloud</strong>, si vous ne savez pas où trouver ça, par exemple, faites un tour sur cette page du site<a href="https://chatons.org/fr/find?title=&field_chaton_services_tid=46&field_chaton_type_tid=All" target="_blank"> CHATONS.org</a>. La synchronisation des agendas et carnets d&#8217;adresse est généralement incluse dans la gestion du partage des fichiers. On aura besoin des identifiants et du mot de passe pour s&#8217;y connecter et paramétrer logiciel et téléphone.<br />
<br />
Et enfin, pour votre téléphone, vous aurez besoin de <strong>F-Droid</strong> qui est un magasin d&#8217;applications Android et sur lequel vous trouverez <strong>Davx5</strong> (nouveau nom de DAVdroid) qui va servir de liaison entre le serveur et votre téléphone.<br />
<em><br />
<strong>NB</strong> : si vous ne trouvez pas Davx5 ou DAVdroid sur l'application Android, vous pouvez la télécharger sur le site web de <a href="https://f-droid.org/fr/packages/at.bitfire.davdroid" target="_blank">F-droid</a>.</em><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-sauvegarder-agenda-et-carnet-deadresses-dans-thunderbird">Sauvegarder agenda et carnet d’adresses dans Thunderbird</h2><br />

<br />
<br />
La sauvegarde, à partir de Thunderbird, vous permettra, outre d&#8217;avoir une copie bien au chaud de ces deux éléments, de pouvoir les importer dans l&#8217;agenda en ligne et sur le carnet d&#8217;adresses du serveur.<br />
<br />
Pour ce faire, aller sur<strong> Évènements et tâches > Exporter l&#8217;agenda</strong>, sélectionner, le cas échéant l&#8217;agenda à exporter. Pour le carnet d&#8217;adresses, aller dans<strong> Outils > Carnet d&#8217;adresses</strong>, puis, dans le carnet d&#8217;adresses, sur <strong>Outils > Exporter</strong>.<br />
<br />
Dans les deux cas, il vous sera demandé de choisir le format. Garder les options par défaut, ics pour l&#8217;agenda et séparé par des virgules (csv) pour le carnet d&#8217;adresses.<br />
<br />
<strong>Création l&#8217;agenda sur le serveur et partage dans Thunderbird</strong><br />
<br />
Il faut procéder dans l&#8217;ordre : le serveur d&#8217;abord, Thunderbird ensuite.<br />
<br />
<strong>Connectez-vous à votre serveur</strong>, allez sur l&#8217;icône de l&#8217;<strong>Agenda</strong> et cliquez sur <strong>Nouvel agenda</strong>, donnez-lui un nom. Il est créé. Pour l&#8217;ajouter à Thunderbird, cliquez sur l&#8217;icône tout à droite du nom de l&#8217;agenda, celle avec les trois points pour ouvrir un petit menu, cliquez sur <strong>Lien</strong>. Copier l&#8217;adresse qui vous est donné ensuite.<br />
<br />
<strong>Dans Thunderbird</strong>, aller sur <strong>Évènements et tâches</strong>, clic droit dans la colonne Agendas, à gauche de la fenêtre. Cliquez sur <strong>Nouvel agenda</strong>, cochez <strong>Sur le réseau</strong> et appuyez sur le bouton Suivant. Dans la boite de dialogue suivante, <strong>cochez CalDAV</strong> et collez l&#8217;adresse du lien dans l&#8217;emplacement prévu. Appuyez sur le bouton Suivant. Dans la boite suivante, Thunderbird vous demandera de nommer l&#8217;agenda, de choisir sa couleur et d&#8217;indiquer une adresse électronique. Enfin, il vous sera demandé d&#8217;entrer votre identifiant au serveur ainsi que le mot de passe associé. Je suggère de cocher la case « Utiliser le gestionnaire de mots de passe pour se souvenir du mot de passe ». Appuyez sur le bouton OK.<br />
<br />
Pour que la synchronisation se fasse dans certaines versions de Thunderbird : Thunderbird ayant changé ses paramètres de sécurité, il va falloir modifier un paramètre avancé.<br />
<br />
Allez dans le menu <strong>Édition > Préférences</strong>, là dans l&#8217;onglet <strong>Avancé</strong>, cliquez sur le bouton <strong>Éditeur de préférences</strong>. Traitez par le mépris la boite vous disant Attention danger, appuyez sur Je prends le risque car on n&#8217;en prend pas. Recherchez la valeur :<br />
<br />
<div class="formatter-container formatter-code"><span class="formatter-title">Code : </span><div class="formatter-content"><code><span style="color: #000000">
network.cookie.same-site.enabled</span>
</code></div></div><br />
<br />
La modifier en passant de « true » à « false », double-cliquer dessus suffit, fermez la fenêtre et la boite précédente. Redémarrez le logiciel.<br />
<br />
<em>À savoir : ça n&#8217;est plus nécessaire avec Thunderbird 60.5.1 et Lightning 6.5.1.</em><br />
<strong><br />
Importer l&#8217;agenda pas connecté dans le nouveau</strong> : allez sur <strong>Évènements et tâches > Importer</strong>, il ne reste plus qu&#8217;à aller chercher le fichier .ics que vous avez précédemment enregistré et d&#8217;indiquer dans quel agenda vous désirez l&#8217;importer puis de cliquer sur le bouton OK.<br />
<br />
<strong>Création carnet d&#8217;adresses sur le serveur et partage dans Thunderbird</strong><br />
<br />
Il faut procéder dans l&#8217;ordre : le serveur d&#8217;abord, Thunderbird ensuite.<br />
<br />
<strong>Connectez-vous à votre serveur</strong>, allez sur l&#8217;icône du <strong>Carnet d&#8217;adresse</strong> et descendez en bas de la fenêtre sur les <strong>Paramètres</strong> (icônes en forme de roue dentée) donnez un nom à votre carnet d&#8217;adresses. Il est créé. Pour l&#8217;ajouter à Thunderbird, cliquez sur l&#8217;icône tout à droite de son nom, celle avec les trois points pour ouvrir un petit menu, cliquez sur <strong>Copier le lien</strong>, c&#8217;est copié !<br />
<br />
<strong>Dans Thunderbird</strong>, aller sur <strong>Outils > Cardbook</strong>, clic droit dans la colonne à gauche de la fenêtre. Cliquez sur <strong>Nouveau carnet d&#8217;adresses</strong>. Dans la nouvelle boite de dialogue, cochez <strong>Distant</strong>, appuyez sur le bouton Suivant, dans la nouvelle boite de dialogue, cochez <strong>CardDAV</strong>, collez le lien que vous avez copié au niveau d&#8217;URL, entrez votre identifiant au serveur ainsi que le mot de passe associé.<br />
<br />
<strong>Pour importer votre carnet d&#8217;adresses</strong> pas connecté dans le nouveau : aller sur <strong>Outils > CardBook</strong>. Cliquez sur l&#8217;icône avec les trois traits. Aller sur Carnet d&#8217;adresses, puis sur Importer des contacts depuis un fichier.<br />
<br />
<em>Pour que la synchronisation de votre carnet d&#8217;adresses fonctionne, il va falloir qu&#8217;elles figurent impérativement dans Cardbook. Ouvrez Cardbook, allez sur les Préférences et cochez les deux options d&#8217;intégration avec Thunderbird.</em><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-parametrer-tbsync">Paramétrer TbSync</h2><br />

<br />
<em>Si vous préférez utiliser TbSync, les préliminaires, export des agendas et carnets d&#8217;adresses et création des agendas et carnets d&#8217;adresse sur le serveur, sont les mêmes et c&#8217;est l&#8217;adresse que vous copiez-collez comme précédemment indiqué qui va vous servir.</em><br />
<br />
<strong>Dans Thunderbird</strong>, allez sur<strong> Outils > Préférences des modules</strong>, descendez sur TbSync.<br />
<br />
Dans la boite de dialogue qui s&#8217;ouvre, descendez tout en bas de la colonne <strong>Accounts Status</strong> pour aller sur <strong>Accounts actions</strong>. Cliquez sur la flèche pour pouvoir choisir le type de <strong>serveur</strong>, ici <strong>CalDAV & CardDAV</strong> (premier choix).<br />
<br />
La boite suivante vous demande d&#8217;indiquer un <strong>profil de serveur</strong>, prenez le premier, <strong>Discovery service</strong>, et cliquez sur le bouton Suivant.<br />
<br />
Dans l&#8217;étape suivante, vous devrez donner un nom de votre choix à ce nouveau compte, coller l&#8217;adresse du serveur que vous avez copiée sur votre nuage et saisir votre identifiant et votre mot de passe d&#8217;accès au serveur. Cliquez sur le bouton Terminer.<br />
<br />
De retour sur la page de paramétrage des comptes, vous allez voir votre nouveau compte figurer dans la colonne qui était vide auparavant. Cochez la case « Enable and synchronize this account » et cochez les éléments que vous désirez synchroniser, appuyez sur le bouton Synchronize now.<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-parametrage-du-telephone-android">Paramétrage du téléphone Android</h2><br />

<br />
<strong>Lancez DAVdroid</strong> pour paramétrer le compte à synchroniser et appuyez sur le + pour Ajouter un compte. <strong>Cochez l&#8217;option Connexion avec une URL et un nom d&#8217;utilisateur</strong>. Saisissez l&#8217;adresse WebDAV de votre serveur puis votre identifiant au serveur et le mot de passe associé.<br />
<br />
Nommez ce nouveau compte, donnez-lui un nom parlant, puis terminez en cliquant sur Créer un compte.<br />
<br />
À partir d&#8217;un autre logiciel<br />
<br />
Si vous utilisiez un autre logiciel de courrier électronique, la procédure est, grosso modo, la même. Il y a deux éléments qui peuvent varier :<br />
<br />
<ul class="formatter-ul">
    <li class="formatter-li">les possibilités offertes en format d&#8217;export, le format csv étant le plus universel ;
    </li><li class="formatter-li">la structure du carnet d&#8217;adresses qui peut varier, dans ce cas, il va falloir au préalable faire correspondre (ou mapper) les champs. Ce n&#8217;est pas difficile mais ça prendra plus de temps.<br />
</li></ul><br />
<br />
Il peut également y avoir quelques distorsions si vous partez d&#8217;un compte gmail, Google ne respecte pas les normes de format vcard.<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-pour-completer">Pour compléter</h2><br />

<br />
Pensez à faire un tour sur la documentation, wiki ou autre équivalent de votre nuage. En effet, c&#8217;est là que vous trouverez l&#8217;adresse de connexion générique à configurer dans votre téléphone. En outre, si vous avez un autre OS, il peut y avoir des tutoriels sur l&#8217;aspect spécifique à votre OS.<br />
<br />
<ul class="formatter-ul">
    <li class="formatter-li">Le <a href="https://wiki.zaclys.com/index.php/Accueil" target="_blank">wiki de la Mère Zaclys</a>, qui est plein de pages intéressantes sur le sujet.
</li><li class="formatter-li">Éventuellement opter pour <a href="https://www.memotoo.com/fr/" target="_blank">Memotoo</a> pour synchroniser n&#8217;importe quoi avec presque tout.<br />
</li></ul><br />
<br />]]></description>
                <pubDate>Tue, 12 Mar 2019 10:43:32 +0100</pubDate>
                
            </item>
		
            <item>
                <title><![CDATA[installer un certificat let'sencrypt pour apache]]></title>
                <link>https://www.mageialinux-online.org/wiki/installer-un-certificat-let-sencrypt-pour-apache</link>
                <guid>https://www.mageialinux-online.org/wiki/installer-un-certificat-let-sencrypt-pour-apache</guid>
                <description><![CDATA[Bonjour,<br />
<br />
Petit tutoriel pour installer un certificat let'sencrypt pour apache<br />
Installer le paquet lib64augeas-devel:<br />
urpmi lib64augeas-devel<br />
<br />
Le serveur doit être accessible sur le port 80.<br />
Taper dans un terminal en tant que root:<br />
<br />
 wget <a href="https://dl.eff.org/certbot-auto" target="_blank">https://dl.eff.org/certbot-auto</a><br />
chmod a+x ./certbot-auto<br />
./certbot-auto --apache --debug --apache-challenge-location /etc/httpd/conf/conf.d/<br />
<br />
<br />
Voilà, c'est fait<br />]]></description>
                <pubDate>Mon, 22 Oct 2018 13:28:42 +0200</pubDate>
                
            </item>
		
            <item>
                <title><![CDATA[Installer zoneminder depuis le RPM Mageia 2]]></title>
                <link>https://www.mageialinux-online.org/wiki/installer-zoneminder-depuis-le-rpm-mageia-2</link>
                <guid>https://www.mageialinux-online.org/wiki/installer-zoneminder-depuis-le-rpm-mageia-2</guid>
                <description><![CDATA[<p style="text-align: center;"> <img src="https://www.mageialinux-online.org/upload/zoneminder.png" alt="zoneminder" title="zoneminder" /> </p><br /><br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-presentation">Présentation</h2><br />
<br /><br />
<div class="formatter-container formatter-block">Zoneminder est une solution open source efficace de vidéosurveillance, acceptant des sources vidéo analogiques (connectées via une carte d'acquisition), des webcams ou encore des caméras réseau. Il est capable d'envoyer les images capturées sur un serveur déporté via FTP ou SMTP (mail) mais dispose également d'un serveur web dédié permettant de consulter les images et vidéos capturées ainsi que de contrôler le système de vidéo-surveillance&#8230; </div><br /><br />
Cet article est inspiré du très bon document rédigé sur le <a href="http://www.zoneminder.com/wiki/index.php/Mandriva_2008.0_free_installation">wiki Mandriva</a>. Il est simplement adapté à Mageia.<br /><br />
<strong>Préambule:</strong> Zoneminder est un logiciel libre de gestion de caméras sur un réseau.<br /><br />
<br /><br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-prerequis">Prérequis</h2><br />
<br /><br />
<strong>Pour installer Zoneminder</strong> sur une Mageia il faut:<br /><br />
<span class="message-helper notice"><br /><br />
<div class="formatter-container formatter-block"><ul class="formatter-ul">
<li class="formatter-li"> Installer le RPM
        </li><li class="formatter-li"> Créer la base mysql
        </li><li class="formatter-li"> Créer l'utilisateur de la base
        </li><li class="formatter-li"> Lancer ZoneMinder
        </li><li class="formatter-li"> Déclarer ses caméras<br /><br />
</li></ul></div></span><br /><br />
<br /><br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-installer-le-rpm">Installer le RPM</h2><br />
<br /><br />
Aller dans le centre de gestion des logiciels et rechercher le RPM: <span style="color:blue;">zoneminder</span>.<br /><br />
Si vous ne le voyez pas, vous avez sans doute les filtres mal configurés. Les mettre sur "tous" et "tous".<br /><br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-creer-la-base-mysql">Créer la base mysql</h3><br />
<br /><br />
Une fois l'installation des paquetages terminée, démarrez MySql:<br /><br />
 <div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">systemctl restart mysqld.service </pre></pre></div></div><br /><br />
Créez la base MySQL "zm" (elle ne semble pas créée automatiquement) :<br /><br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"> mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;"></</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>zoneminder<span style="color: #000000; font-weight: bold;">/</span>db<span style="color: #000000; font-weight: bold;">/</span>zm_create.sql
Enter password:
&nbsp;</pre></pre></div></div><br /><br />
(hop ! un petit coup de MySQL pour s'assurer que la base est bien créée : )<br /><br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"> mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span>
Enter password:
mysql<span style="color: #000000; font-weight: bold;">></span> show databases;
+--------------------+
<span style="color: #000000; font-weight: bold;">|</span> Database           <span style="color: #000000; font-weight: bold;">|</span>
+--------------------+
<span style="color: #000000; font-weight: bold;">|</span> information_schema <span style="color: #000000; font-weight: bold;">|</span>
<span style="color: #000000; font-weight: bold;">|</span> mysql              <span style="color: #000000; font-weight: bold;">|</span>
<span style="color: #000000; font-weight: bold;">|</span> zm                 <span style="color: #000000; font-weight: bold;">|</span>
+--------------------+
<span style="color: #000000;">3</span> rows <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.00</span> sec<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></pre></div></div><br /><br />
C'est bon.<br /><br />
<br /><br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-creer-l-utilisateur-de-la-base">Créer l'utilisateur de la base</h3><br />
<br /><br />
<div class="formatter-container formatter-code code-SQL"><span class="formatter-title">Code SQL : </span><div class="formatter-content"><pre style="display:inline;"><pre class="sql" style="font-family:monospace;">mysql<span style="color: #66cc66;">></span><span style="color: #993333; font-weight: bold;">USE</span> mysql;
<span style="color: #993333; font-weight: bold;">DATABASE</span> changed
mysql<span style="color: #66cc66;">></span><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">USER</span> <span style="color: #ff0000;">'zmuser'</span> <span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">'zmpass'</span>;
Query OK<span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">ROWS</span> affected <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0.02</span> sec<span style="color: #66cc66;">&#41;</span>
mysql<span style="color: #66cc66;">></span><span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">ALL</span> <span style="color: #993333; font-weight: bold;">ON</span> zm<span style="color: #66cc66;">.*</span> <span style="color: #993333; font-weight: bold;">TO</span> <span style="color: #ff0000;">'zmuser'</span>@<span style="color: #ff0000;">'localhost'</span>;
Query OK<span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">ROWS</span> affected <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0.00</span> sec<span style="color: #66cc66;">&#41;</span>
mysql<span style="color: #66cc66;">></span>quit
bye
&nbsp;</pre></pre></div></div><br /><br />
<span class="message-helper notice">NB: si vous décidez de changer le mot de passe par défaut "zmpass" (ce qui est une bonne idée), n'oubliez pas de reporter cette modification dans <strong>/etc/zm/zm.conf</strong>.</span><br /><br />
<br /><br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-lancer-zoneminder">Lancer ZoneMinder </h2><br />
<br /><br />
Démarrer le service<br /><br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span>
Mot de passe
systemctl start  zoneminder.service
Starting zoneminder <span style="color: #7a0874; font-weight: bold;">&#40;</span>via systemctl<span style="color: #7a0874; font-weight: bold;">&#41;</span>:   OK</pre></pre></div></div><br /><br />
<strong>Pour démarrer Zoneminder, démarrez votre navigateur web préféré et tapez cette adresse:</strong><br /><br />
<a href="http://localhost/zm">http://localhost/zm</a><br /><br />
Pour voir les log de démarrage de zoneminder, ça se trouve dans <strong>/var/log/syslog</strong> et <strong>/tmp/zmpkg.log</strong>.<br /><br />
<p style="text-align: right;"><span style="font-size: 10px;">Écrit par : <a href="https://www.mageialinux-online.org/member/member-4598.php">thierryR</a>, Le:  09/12/12</span></p><br /><br />
<p style="text-align: right;"><a href="https://www.mageialinux-online.org/wiki/utiliser-mageia">Retour :Utiliser Mageia</a></p>]]></description>
                <pubDate>Tue, 20 Dec 2016 16:12:04 +0100</pubDate>
                
            </item>
		
	</channel>
</rss>
