Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
elearning:workbooks:centos:8:avance:l104 [2021/08/23 10:46] – admin | elearning:workbooks:centos:8:avance:l104 [2022/02/22 15:15] (Version actuelle) – created admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
~~PDF: | ~~PDF: | ||
+ | |||
+ | Version : **2022.01** | ||
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
- | ======LCF604 - Gestion du Réseau====== | + | ======LCF604 - Présentation, |
=====Contenu du Module===== | =====Contenu du Module===== | ||
- | * **LCF604 - Gestion du Réseau** | + | * **LCF604 - Présentation, |
* Contenu du Module | * Contenu du Module | ||
- | * Configuration du Réseau | + | * Présentation |
- | * La Commande nmcli | + | * LAB #1 - Installation de KVM |
- | * Connections et Profils | + | * 1.1 - Installation des Paquets Requis |
- | * Ajouter une Deuxième Adresse IP à un Profil | + | * 1.2 - Activation et Démarrage |
- | * La Commande hostname | + | * 1.3 - Modules du Noyau |
- | * La Commande ip | + | * LAB #2 - Configuration de KVM |
- | * Activer/ | + | * 2.1 - Configuration |
- | * Routage Statique | + | * 2.2 - Configuration du Réseau |
- | * La commande ip | + | * 2.3 - Configuration |
- | * Activer/ | + | |
- | * Diagnostique | + | |
- | * ping | + | |
- | * netstat | + | |
- | * traceroute | + | |
- | * Connexions à Distance | + | |
- | * Telnet | + | |
- | * wget | + | |
- | * ftp | + | |
- | * SSH | + | |
- | * Introduction | + | |
- | * SSH-1 | + | |
- | * SSH-2 | + | |
- | * L' | + | |
- | * L' | + | |
- | * Installation | + | |
- | * Configuration | + | |
- | * Serveur | + | |
- | * Utilisation | + | |
- | * Tunnels SSH | + | |
- | * SCP | + | |
- | * Introduction | + | |
- | * Utilisation | + | |
- | * Mise en place des clefs | + | |
- | * La Configuration par firewalld | + | |
- | * La Configuration de Base de firewalld | + | |
- | * La Commande firewall-cmd | + | |
- | * La Configuration | + | |
- | * Le mode Panic de firewalld | + | |
- | =====Configuration du Réseau===== | + | =====Présentation===== |
- | RHEL/CentOS 7 utilise exclusivement **Network Manager** pour gérer le réseau. Network Manager est composé de deux éléments : | + | ====La Virtualisation==== |
- | | + | Le système de base hébergeant les machines virtuelles est appelé l'**hôte** tandis que les machines virtuelles sont appelées |
- | | + | |
- | <WRAP center round important> | + | Il existe différentes méthodes |
- | **Important** : Notez qu' | + | |
- | </ | + | |
- | Le service NetworkManager doit toujours | + | * **Virtualisation au niveau du système d' |
+ | * **Description** : Les systèmes invités utilisent le même noyau et une partie du système de fichiers de l' | ||
+ | * **L' | ||
+ | * **L' | ||
+ | * **Logiciels concernés** | ||
- | < | + | {{ :elearning:workbooks:centos:6:senior:inheritedpackageszones.png? |
- | [root@centos7 ~]# systemctl status NetworkManager.service | + | |
- | ● NetworkManager.service - Network Manager | + | |
- | | + | |
- | | + | |
- | Main PID: 673 (NetworkManager) | + | |
- | | + | |
- | | + | |
- | | + | |
- | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | + | * **Paravirtualisation ou // |
- | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | + | * **Description** |
- | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | + | * **L' |
- | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | + | * **L'inconvénient principal** |
- | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | + | * **Logiciels concernés** |
- | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | + | |
- | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | + | |
- | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | + | |
- | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | + | |
- | Aug 08 11:03:55 centos7.fenestros.loc dhclient[2673]: | + | |
- | </ | + | |
- | ====La Commande nmcli==== | + | {{ : |
- | La commande | + | |
+ | * **Description** : Le programme simule du matériel virtuel qui apparaît du point de vue de l' | ||
+ | * **L' | ||
+ | * **L' | ||
+ | * **Logiciels concernés** : VMWare(tm) Fusion, VMWare(tm) Player, VMWare(tm) Server, VMWare(tm) Fusion, Parallels Desktop, Parallels Server, Sun/Oracle %%VirtualBox%%, | ||
- | Les options et les sous-commandes peuvent être consultées en utilisant les commandes suivantes | + | {{ :elearning: |
- | < | + | * **Paravirtualisation avec prise en charge de matériel** |
- | [root@centos7 ~]# nmcli help | + | * **Description** : Les processeurs Intel-VT et AMD-V contiennent des instructions matérielles pour faciliter la virtualisation. Pour déterminer si le processeur dispose des fonctionnalités de virtualisation matérielles, |
- | Usage: nmcli [OPTIONS] OBJECT { COMMAND | help } | + | * **L' |
+ | * **L' | ||
+ | * **Logiciels concernés** : Xen, KVM | ||
- | OPTIONS | + | {{ : |
- | | + | |
- | -p[retty] | + | |
- | -m[ode] tabular|multiline | + | |
- | -f[ields] < | + | |
- | -e[scape] yes|no | + | |
- | -n[ocheck] | + | |
- | -a[sk] | + | |
- | -w[ait] < | + | |
- | -v[ersion] | + | |
- | -h[elp] | + | |
- | OBJECT | + | ====Xen==== |
- | g[eneral] | + | |
- | n[etworking] | + | |
- | r[adio] | + | |
- | c[onnection] | + | |
- | d[evice] | + | |
- | a[gent] | + | |
- | [root@centos7 ~]# nmcli g help | + | * **[[http:// |
- | Usage: nmcli general { COMMAND | + | * Xen est un produit en licence GPL, |
+ | * Il existe des systèmes de virtualisation commerciaux à base de Xen dont le plus connu est actuellement **Citrix %%XenServer%%**, | ||
+ | * Xen est un système de virtualisation principalement destiné à la virtualisation de serveurs, | ||
+ | * Xen est un système de **paravirtualisation** qui nécessite un noyau Linux modifié, | ||
+ | * Xen ne peut pas lancé donc un système non-modifié tel Windows(tm) en mode paravirtualisation, | ||
+ | * Xen peut lancer des systèmes non modifiés dans des **HVM** ( //Hardware Virtual Machine// ) depuis sa version 3 en utilisant une partie du code de QEMU combinée avec l' | ||
- | COMMAND := { status | hostname | permissions | logging } | + | ====KVM==== |
- | status | + | **[[http:// |
- | | + | |
+ | * ne fonctionne que sur les architectures x86 disposant des extensions Intel-VT ou AMD-V, | ||
+ | * est un projet issu de QEMU. | ||
- | permissions | + | <WRAP center round important 60%> |
+ | Important : Le module KVM est intégré dans le noyau Linux depuis la version 2.6.20 et permet la paravirtualisation depuis le noyau **2.6.25**. | ||
+ | </ | ||
- | logging [level <log level>] [domains <log domains> | + | **KVM** appartient à la société **Red Hat**. |
+ | KVM permet de virtualiser : | ||
- | [root@centos7 ~]# nmcli g status help | + | * Windows(tm) à partir de Windows(tm) 2000, |
- | Usage: nmcli general status { help } | + | * Toutes les distributions Linux, |
+ | * La majorité des Unix BSD, | ||
+ | * Solaris(tm) et openSolaris, | ||
+ | * Minux, Hurd, QNX, | ||
+ | * MSDOS. | ||
- | Show overall status of NetworkManager. | + | KVM offre un support du matériel suivant : |
- | ' | + | |
- | </ | + | * USB, |
+ | * Ethernet, | ||
+ | * PCI Hotplug, | ||
+ | * Carte Son, | ||
+ | * **Virtuo** - un périphérique disque paravirtualisé. | ||
- | ====Connections et Profils==== | + | Les avantages de KVM par rapport à Xen sont : |
- | NetworkManager inclus la notion | + | * l’utilisation |
+ | | ||
- | < | + | =====LAB |
- | [root@centos7 ~]# nmcli c show | + | |
- | NAME UUID TYPE DEVICE | + | |
- | Wired connection | + | |
- | </ | + | |
- | Comme on peut constater ici, il n' | + | ====1.1 - Installation des Paquets Requis==== |
- | Créez donc un profil IP fixe rattaché au périphérique | + | Avant d' |
- | + | ||
- | < | + | < |
- | [root@centos7 | + | [root@centos8 |
- | Connection ' | + | 8 |
</ | </ | ||
- | Constatez sa présence | + | La majorité des paquets necéssaires pour la virtualisation sous KVM ont été regroupés dans un **module** dénommé **virt**. Il convient donc de l' |
- | < | + | < |
- | [root@centos7 | + | [root@centos8 |
- | NAME UUID TYPE DEVICE | + | |
- | ip_fixe | + | |
- | Wired connection 1 45b701c1-0a21-4d76-a795-2f2bcba86955 | + | |
</ | </ | ||
- | Notez que la sortie n'indique pas que le profil | + | Si vous souhaitez utiliser l'interface graphique (non-recommandée) pour administrer les machines virtuelles, vous devez installer |
- | < | + | < |
- | [root@centos7 | + | [root@centos8 |
- | GENERAL.DEVICE: | + | |
- | GENERAL.TYPE: | + | |
- | GENERAL.HWADDR: | + | |
- | GENERAL.MTU: | + | |
- | GENERAL.STATE: | + | |
- | GENERAL.CONNECTION: | + | |
- | GENERAL.CON-PATH: / | + | |
- | WIRED-PROPERTIES.CARRIER: | + | |
- | IP4.ADDRESS[1]: | + | |
- | IP4.GATEWAY: | + | |
- | IP4.DNS[1]: | + | |
- | IP6.ADDRESS[1]: | + | |
- | IP6.GATEWAY: | + | |
- | + | ||
- | GENERAL.DEVICE: | + | |
- | GENERAL.TYPE: | + | |
- | GENERAL.HWADDR: | + | |
- | GENERAL.MTU: | + | |
- | GENERAL.STATE: | + | |
- | GENERAL.CONNECTION: | + | |
- | GENERAL.CON-PATH: | + | |
- | IP4.ADDRESS[1]: | + | |
- | IP4.GATEWAY: | + | |
- | IP6.ADDRESS[1]: | + | |
- | IP6.GATEWAY: | + | |
</ | </ | ||
- | Pour activer le profil ip_fixe, utilisez | + | Le paquet **bridge-utils** est requis pour la gestion des bridges réseau. Installez donc celui-ci |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
+ | [root@centos8 ~]# dnf install bridge-utils -y | ||
</ | </ | ||
- | Le profil ip_fixe est maintenant activé tandis que le profil enp0s3 a été désactivé | + | Dernièrement, |
- | < | + | < |
- | [root@centos7 | + | [root@centos8 |
- | NAME UUID TYPE DEVICE | + | |
- | ip_fixe | + | |
- | Wired connection 1 45b701c1-0a21-4d76-a795-2f2bcba86955 | + | |
- | [root@centos7 ~]# nmcli d show | + | |
- | GENERAL.DEVICE: | + | |
- | GENERAL.TYPE: | + | |
- | GENERAL.HWADDR: | + | |
- | GENERAL.MTU: | + | |
- | GENERAL.STATE: | + | |
- | GENERAL.CONNECTION: | + | |
- | GENERAL.CON-PATH: | + | |
- | WIRED-PROPERTIES.CARRIER: | + | |
- | IP4.ADDRESS[1]: | + | |
- | IP4.GATEWAY: | + | |
- | IP6.ADDRESS[1]: | + | |
- | IP6.GATEWAY: | + | |
- | + | ||
- | GENERAL.DEVICE: | + | |
- | GENERAL.TYPE: | + | |
- | GENERAL.HWADDR: | + | |
- | GENERAL.MTU: | + | |
- | GENERAL.STATE: | + | |
- | GENERAL.CONNECTION: | + | |
- | GENERAL.CON-PATH: | + | |
- | IP4.ADDRESS[1]: | + | |
- | IP4.GATEWAY: | + | |
- | IP6.ADDRESS[1]: | + | |
- | IP6.GATEWAY: | + | |
</ | </ | ||
- | Pour consulter les paramètres d'un profil, utilisez la commande | + | ====1.2 - Activation et Démarrage du Service libvirtd==== |
+ | |||
+ | Activez et démarrez le service **libvirtd** pour démarrer KVM. Notez l'utilisation de l' | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | =============================================================================== | + | |
- | Connection profile details (Wired connection 1) | + | |
- | =============================================================================== | + | |
- | connection.id: | + | |
- | connection.uuid: | + | |
- | connection.interface-name: | + | |
- | connection.type: | + | |
- | connection.autoconnect: | + | |
- | connection.autoconnect-priority: | + | |
- | connection.timestamp: | + | |
- | connection.read-only: | + | |
- | connection.permissions: | + | |
- | connection.zone: | + | |
- | connection.master: | + | |
- | connection.slave-type: | + | |
- | connection.autoconnect-slaves: | + | |
- | connection.secondaries: | + | |
- | connection.gateway-ping-timeout: | + | |
- | connection.metered: | + | |
- | ------------------------------------------------------------------------------- | + | |
- | 802-3-ethernet.port: | + | |
- | 802-3-ethernet.speed: | + | |
- | 802-3-ethernet.duplex: | + | |
- | 802-3-ethernet.auto-negotiate: | + | |
- | 802-3-ethernet.mac-address: | + | |
- | 802-3-ethernet.cloned-mac-address: | + | |
- | 802-3-ethernet.mac-address-blacklist: | + | |
- | 802-3-ethernet.mtu: | + | |
- | 802-3-ethernet.s390-subchannels: | + | |
- | 802-3-ethernet.s390-nettype: | + | |
- | 802-3-ethernet.s390-options: | + | |
- | 802-3-ethernet.wake-on-lan: | + | |
- | 802-3-ethernet.wake-on-lan-password: | + | |
- | ------------------------------------------------------------------------------- | + | |
- | ipv4.method: | + | |
- | ipv4.dns: | + | |
- | ipv4.dns-search: | + | |
- | ipv4.addresses: | + | |
- | ipv4.gateway: | + | |
- | ipv4.routes: | + | |
- | ipv4.route-metric: | + | |
- | ipv4.ignore-auto-routes: | + | |
- | ipv4.ignore-auto-dns: | + | |
- | ipv4.dhcp-client-id: | + | |
- | ipv4.dhcp-send-hostname: | + | |
- | ipv4.dhcp-hostname: | + | |
- | ipv4.never-default: | + | |
- | ipv4.may-fail: | + | |
- | ------------------------------------------------------------------------------- | + | |
- | ipv6.method: | + | |
- | ipv6.dns: | + | |
- | ipv6.dns-search: | + | |
- | ipv6.addresses: | + | |
- | ipv6.gateway: | + | |
- | ipv6.routes: | + | |
- | ipv6.route-metric: | + | |
- | ipv6.ignore-auto-routes: | + | |
- | ipv6.ignore-auto-dns: | + | |
- | ipv6.never-default: | + | |
- | ipv6.may-fail: | + | |
- | ipv6.ip6-privacy: | + | |
- | ipv6.dhcp-send-hostname: | + | |
- | ipv6.dhcp-hostname: | + | |
- | ------------------------------------------------------------------------------- | + | |
- | [root@centos7 ~]# nmcli -p connection show ip_fixe | + | |
- | =============================================================================== | + | |
- | | + | |
- | =============================================================================== | + | |
- | connection.id: | + | |
- | connection.uuid: | + | |
- | connection.interface-name: | + | |
- | connection.type: | + | |
- | connection.autoconnect: | + | |
- | connection.autoconnect-priority: | + | |
- | connection.timestamp: | + | |
- | connection.read-only: | + | |
- | connection.permissions: | + | |
- | connection.zone: | + | |
- | connection.master: | + | |
- | connection.slave-type: | + | |
- | connection.autoconnect-slaves: | + | |
- | connection.secondaries: | + | |
- | connection.gateway-ping-timeout: | + | |
- | connection.metered: | + | |
- | ------------------------------------------------------------------------------- | + | |
- | 802-3-ethernet.port: | + | |
- | 802-3-ethernet.speed: | + | |
- | 802-3-ethernet.duplex: | + | |
- | 802-3-ethernet.auto-negotiate: | + | |
- | 802-3-ethernet.mac-address: | + | |
- | 802-3-ethernet.cloned-mac-address: | + | |
- | 802-3-ethernet.mac-address-blacklist: | + | |
- | 802-3-ethernet.mtu: | + | |
- | 802-3-ethernet.s390-subchannels: | + | |
- | 802-3-ethernet.s390-nettype: | + | |
- | 802-3-ethernet.s390-options: | + | |
- | 802-3-ethernet.wake-on-lan: | + | |
- | 802-3-ethernet.wake-on-lan-password: | + | |
- | ------------------------------------------------------------------------------- | + | |
- | ipv4.method: | + | |
- | ipv4.dns: | + | |
- | ipv4.dns-search: | + | |
- | ipv4.addresses: | + | |
- | ipv4.gateway: | + | |
- | ipv4.routes: | + | |
- | ipv4.route-metric: | + | |
- | ipv4.ignore-auto-routes: | + | |
- | ipv4.ignore-auto-dns: | + | |
- | ipv4.dhcp-client-id: | + | |
- | ipv4.dhcp-send-hostname: | + | |
- | ipv4.dhcp-hostname: | + | |
- | ipv4.never-default: | + | |
- | ipv4.may-fail: | + | |
- | ------------------------------------------------------------------------------- | + | |
- | ipv6.method: | + | |
- | ipv6.dns: | + | |
- | ipv6.dns-search: | + | |
- | ipv6.addresses: | + | |
- | ipv6.gateway: | + | |
- | ipv6.routes: | + | |
- | ipv6.route-metric: | + | |
- | ipv6.ignore-auto-routes: | + | |
- | ipv6.ignore-auto-dns: | + | |
- | ipv6.never-default: | + | |
- | ipv6.may-fail: | + | |
- | ipv6.ip6-privacy: | + | |
- | ipv6.dhcp-send-hostname: | + | |
- | ipv6.dhcp-hostname: | + | |
- | ------------------------------------------------------------------------------- | + | |
- | =============================================================================== | + | |
- | Activate connection details (fb3a11d9-4e03-4032-b26e-09d1195d2bcd) | + | |
- | =============================================================================== | + | |
- | GENERAL.NAME: | + | |
- | GENERAL.UUID: | + | |
- | GENERAL.DEVICES: | + | |
- | GENERAL.STATE: | + | |
- | GENERAL.DEFAULT: | + | |
- | GENERAL.DEFAULT6: | + | |
- | GENERAL.VPN: | + | |
- | GENERAL.ZONE: | + | |
- | GENERAL.DBUS-PATH: | + | |
- | GENERAL.CON-PATH: | + | |
- | GENERAL.SPEC-OBJECT: | + | |
- | GENERAL.MASTER-PATH: | + | |
- | ------------------------------------------------------------------------------- | + | |
- | IP4.ADDRESS[1]: | + | |
- | IP4.GATEWAY: | + | |
- | ------------------------------------------------------------------------------- | + | |
- | IP6.ADDRESS[1]: | + | |
- | IP6.GATEWAY: | + | |
- | ------------------------------------------------------------------------------- | + | |
</ | </ | ||
- | Pour consulter la liste profils associés à un périphérique, | + | Vérifiez le statut du service avant de poursuivre |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/{0,1} | + | ● libvirtd.service |
- | CONNECTIONS.AVAILABLE-CONNECTIONS[1]: | + | Loaded: loaded (/ |
- | CONNECTIONS.AVAILABLE-CONNECTIONS[2]: fb3a11d9-4e03-4032-b26e-09d1195d2bcd | ip_fixe | + | |
+ | Docs: man: | ||
+ | https://libvirt.org | ||
+ | Main PID: 7502 (libvirtd) | ||
+ | Tasks: 19 (limit: 32768) | ||
+ | | ||
+ | | ||
+ | | ||
+ | ├─1943 / | ||
+ | | ||
+ | |||
+ | Sep 01 10:19:05 centos8.ittraining.loc systemd[1]: Starting Virtualization daemon... | ||
+ | Sep 01 10:19:05 centos8.ittraining.loc systemd[1]: Started Virtualization daemon. | ||
+ | Sep 01 10:19:06 centos8.ittraining.loc dnsmasq[1942]: | ||
+ | Sep 01 10:19:06 centos8.ittraining.loc dnsmasq[1942]: read / | ||
+ | Sep 01 10:19:06 centos8.ittraining.loc dnsmasq-dhcp[1942]: read / | ||
</ | </ | ||
- | Les fichiers de configuration pour le periphérique **enp0s3** se trouvent dans le répertoire **/ | + | ====1.3 |
- | < | + | Votre VM présente aux système hôte un processeur de type Intel(tm). Pour que KVM puisse fonctionner dans cet environnement il a besoin que deux modules soient chargés |
- | [root@centos7 ~]# ls -l / | + | |
- | -rw-r--r--. 1 root root 296 Aug 8 11:08 ifcfg-ip_fixe | + | |
- | -rw-r--r--. 1 root root 254 Sep 16 2015 ifcfg-lo | + | |
- | </ | + | |
- | L' | + | |
+ | * **kvm-intel** | ||
+ | |||
+ | Vérifiez donc le bon chargement des modules concernés | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | TYPE=Ethernet | + | filename: |
- | BOOTPROTO=none | + | license: |
- | IPADDR=10.0.2.16 | + | author: |
- | PREFIX=24 | + | rhelversion: |
- | GATEWAY=10.0.2.2 | + | srcversion: |
- | DEFROUTE=yes | + | depends: |
- | IPV4_FAILURE_FATAL=no | + | intree: |
- | IPV6INIT=yes | + | name: kvm |
- | IPV6_AUTOCONF=yes | + | vermagic: |
- | IPV6_DEFROUTE=yes | + | sig_id: |
- | IPV6_PEERDNS=yes | + | signer: |
- | IPV6_PEERROUTES=yes | + | sig_key: |
- | IPV6_FAILURE_FATAL=no | + | sig_hashalgo: |
- | NAME=ip_fixe | + | signature: |
- | UUID=fb3a11d9-4e03-4032-b26e-09d1195d2bcd | + | 8D: |
- | DEVICE=enp0s3 | + | 16: |
- | ONBOOT=yes | + | B1: |
+ | FF: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 60: | ||
+ | D0: | ||
+ | EC: | ||
+ | 7F: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
</ | </ | ||
- | |||
- | La résolution des noms est donc inactive : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | ping: unknown host www.free.fr | + | filename: |
+ | license: GPL | ||
+ | author: | ||
+ | rhelversion: | ||
+ | srcversion: | ||
+ | alias: | ||
+ | depends: | ||
+ | intree: | ||
+ | name: | ||
+ | vermagic: | ||
+ | sig_id: | ||
+ | signer: | ||
+ | sig_key: | ||
+ | sig_hashalgo: | ||
+ | signature: | ||
+ | 11: | ||
+ | 91: | ||
+ | BB: | ||
+ | E4: | ||
+ | 2B: | ||
+ | 56: | ||
+ | 3B: | ||
+ | 6C: | ||
+ | 51: | ||
+ | D0: | ||
+ | 25: | ||
+ | 97: | ||
+ | 7D: | ||
+ | AC: | ||
+ | 2E: | ||
+ | 8D: | ||
+ | D7: | ||
+ | A3: | ||
+ | E6: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
</ | </ | ||
- | Modifiez donc la configuration du profil **ip_fixe** : | + | =====LAB #2 - Configuration de KVM====== |
- | < | + | ====2.1 - Configuration du Pare-feu==== |
- | [root@centos7 ~]# nmcli connection mod ip_fixe ipv4.dns 8.8.8.8 | + | |
- | </ | + | |
- | L' | + | Si vous souhaitez vous connecter aux machines virtuelles créées sous KVM en utilisant le protocole VNC, vous devez ouvrir le port **5900/tcp** dans le système hôte : |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | TYPE=Ethernet | + | success |
- | BOOTPROTO=none | + | |
- | DEFROUTE=yes | + | [root@centos8 ~]# firewall-cmd --reload |
- | IPV4_FAILURE_FATAL=no | + | success |
- | IPV6INIT=yes | + | |
- | IPV6_AUTOCONF=yes | + | |
- | IPV6_DEFROUTE=yes | + | |
- | IPV6_FAILURE_FATAL=no | + | |
- | NAME=ip_fixe | + | |
- | UUID=fb3a11d9-4e03-4032-b26e-09d1195d2bcd | + | |
- | DEVICE=enp0s3 | + | |
- | ONBOOT=yes | + | |
- | IPADDR=10.0.2.16 | + | |
- | PREFIX=24 | + | |
- | GATEWAY=10.0.2.2 | + | |
- | DNS1=8.8.8.8 | + | |
- | IPV6_PEERDNS=yes | + | |
- | IPV6_PEERROUTES=yes | + | |
</ | </ | ||
- | Afin que la modification du serveur DNS soit prise en compte, re-démarrez le service NetworkManager : | + | ====2.2 |
- | < | + | Lors de l' |
- | [root@centos7 ~]# systemctl restart NetworkManager.service | + | |
- | [root@centos7 ~]# systemctl status NetworkManager.service | + | |
- | ● NetworkManager.service - Network Manager | + | |
- | | + | |
- | | + | |
- | Main PID: 8394 (NetworkManager) | + | |
- | | + | |
- | | + | |
- | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | + | * La plage des adresses IP disponible pour les machines virtuelles KVM va de **192.168.122.2/24** à **192.168.122.254/ |
- | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | + | |
- | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | + | |
- | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | + | |
- | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | + | |
- | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | + | Les configurations ci-dessus peuvent être visualisées grâce à la commande |
- | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | + | |
- | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | + | |
- | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | + | |
- | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | + | |
- | </ | + | |
- | + | ||
- | Vérifiez que le fichier | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | # Generated by NetworkManager | + | ... |
- | search fenestros.loc | + | 4: virbr0: < |
- | nameserver 8.8.8.8 | + | |
+ | inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0 | ||
+ | | ||
+ | 5: virbr0-nic: < | ||
+ | link/ether 52: | ||
</ | </ | ||
- | + | | |
- | Dernièrement vérifiez la resolution | + | Dans le cas où on ne souhaite pas ou on ne peut pas utiliser le pont créé par défaut, il convient de créer un autre pont. Dans notre cas, l' |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | PING www.free.fr (212.27.48.10) 56(84) bytes of data. | + | 3: ens19: < |
- | 64 bytes from www.free.fr (212.27.48.10): icmp_seq=1 ttl=63 time=10.4 ms | + | link/ether 46: |
- | 64 bytes from www.free.fr (212.27.48.10): icmp_seq=2 ttl=63 time=9.44 ms | + | |
- | 64 bytes from www.free.fr (212.27.48.10): | + | |
- | ^C | + | |
- | --- www.free.fr ping statistics --- | + | |
- | 3 packets transmitted, 3 received, 0% packet loss, time 2002ms | + | |
- | rtt min/avg/ | + | |
</ | </ | ||
- | <WRAP center round important> | + | Elle n'est pas visible dans la sortie de la commande |
- | **Important** : Notez qu'il existe un front-end graphique en mode texte, | + | |
- | </WRAP> | + | <code> |
- | + | [root@centos8 ~]# nmcli c show | |
- | ====Ajouter une Deuxième Adresse IP à un Profil==== | + | NAME |
+ | ip_fixe | ||
+ | virbr0 | ||
+ | ens18 fc4a4d23-b15e-47a7-bcfa-b2e08f49553e | ||
+ | </ | ||
- | Pour ajouter | + | Créez donc une adresse IP de 192.168.56.2/24 pour l'interface **ens19** |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
+ | Connection ' | ||
+ | [root@centos8 ~]# nmcli c show | ||
+ | NAME | ||
+ | ip_fixe | ||
+ | ip_kvm | ||
+ | virbr0 | ||
+ | ens18 fc4a4d23-b15e-47a7-bcfa-b2e08f49553e | ||
</ | </ | ||
- | Redémarrez | + | Utilisez |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | connection.id: | + | 3: ens19: < |
- | connection.uuid: | + | |
- | connection.interface-name: | + | |
- | connection.type: | + | valid_lft forever preferred_lft forever |
- | connection.autoconnect: yes | + | |
- | connection.autoconnect-priority: 0 | + | valid_lft forever preferred_lft forever |
- | connection.timestamp: | + | |
- | connection.read-only: | + | |
- | connection.permissions: | + | |
- | connection.zone: | + | |
- | connection.master: | + | |
- | connection.slave-type: | + | |
- | connection.autoconnect-slaves: | + | |
- | connection.secondaries: | + | |
- | connection.gateway-ping-timeout: 0 | + | |
- | connection.metered: unknown | + | |
- | 802-3-ethernet.port: -- | + | |
- | 802-3-ethernet.speed: 0 | + | |
- | 802-3-ethernet.duplex: -- | + | |
- | 802-3-ethernet.auto-negotiate: yes | + | |
- | 802-3-ethernet.mac-address: -- | + | |
- | 802-3-ethernet.cloned-mac-address: -- | + | |
- | 802-3-ethernet.mac-address-blacklist: | + | |
- | 802-3-ethernet.mtu: | + | |
- | 802-3-ethernet.s390-subchannels: | + | |
- | 802-3-ethernet.s390-nettype: | + | |
- | 802-3-ethernet.s390-options: | + | |
- | 802-3-ethernet.wake-on-lan: | + | |
- | 802-3-ethernet.wake-on-lan-password: | + | |
- | ipv4.method: | + | |
- | ipv4.dns: | + | |
- | ipv4.dns-search: | + | |
- | ipv4.addresses: | + | |
- | ipv4.gateway: | + | |
- | ipv4.routes: | + | |
- | ipv4.route-metric: | + | |
- | ipv4.ignore-auto-routes: | + | |
- | ipv4.ignore-auto-dns: | + | |
- | ipv4.dhcp-client-id: | + | |
- | ipv4.dhcp-send-hostname: | + | |
- | ipv4.dhcp-hostname: | + | |
- | ipv4.never-default: | + | |
- | ipv4.may-fail: | + | |
- | ipv6.method: | + | |
- | ipv6.dns: | + | |
- | ipv6.dns-search: | + | |
- | ipv6.addresses: | + | |
- | ipv6.gateway: | + | |
- | ipv6.routes: | + | |
- | ipv6.route-metric: | + | |
- | ipv6.ignore-auto-routes: | + | |
- | ipv6.ignore-auto-dns: | + | |
- | ipv6.never-default: | + | |
- | ipv6.may-fail: | + | |
- | ipv6.ip6-privacy: | + | |
- | ipv6.dhcp-send-hostname: | + | |
- | ipv6.dhcp-hostname: | + | |
- | GENERAL.NAME: | + | |
- | GENERAL.UUID: | + | |
- | GENERAL.DEVICES: | + | |
- | GENERAL.STATE: | + | |
- | GENERAL.DEFAULT: | + | |
- | GENERAL.DEFAULT6: | + | |
- | GENERAL.VPN: | + | |
- | GENERAL.ZONE: | + | |
- | GENERAL.DBUS-PATH: | + | |
- | GENERAL.CON-PATH: | + | |
- | GENERAL.SPEC-OBJECT: | + | |
- | GENERAL.MASTER-PATH: | + | |
- | IP4.ADDRESS[1]: | + | |
- | IP4.ADDRESS[2]: | + | |
- | IP4.GATEWAY: | + | |
- | IP4.DNS[1]: | + | |
- | IP6.ADDRESS[1]: | + | |
- | IP6.GATEWAY: | + | |
</ | </ | ||
- | <WRAP center round important> | + | Notez que cette configuration a été stockée dans le fichier **/ |
- | **Important** : Notez l' | + | |
- | </ | + | |
- | + | ||
- | Consultez maintenant | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
TYPE=Ethernet | TYPE=Ethernet | ||
+ | PROXY_METHOD=none | ||
+ | BROWSER_ONLY=no | ||
BOOTPROTO=none | BOOTPROTO=none | ||
+ | IPADDR=192.168.56.2 | ||
+ | PREFIX=24 | ||
+ | GATEWAY=192.168.56.1 | ||
DEFROUTE=yes | DEFROUTE=yes | ||
IPV4_FAILURE_FATAL=no | IPV4_FAILURE_FATAL=no | ||
Ligne 624: | Ligne 396: | ||
IPV6_DEFROUTE=yes | IPV6_DEFROUTE=yes | ||
IPV6_FAILURE_FATAL=no | IPV6_FAILURE_FATAL=no | ||
- | NAME=ip_fixe | + | IPV6_ADDR_GEN_MODE=stable-privacy |
- | UUID=fb3a11d9-4e03-4032-b26e-09d1195d2bcd | + | NAME=ip_kvm |
- | DEVICE=enp0s3 | + | UUID=afc8b175-f2cb-47b2-baca-66454058c36f |
+ | DEVICE=ens19 | ||
ONBOOT=yes | ONBOOT=yes | ||
- | DNS1=8.8.8.8 | ||
- | IPADDR=10.0.2.16 | ||
- | PREFIX=24 | ||
- | IPADDR1=192.168.1.2 | ||
- | PREFIX1=24 | ||
- | GATEWAY=10.0.2.2 | ||
- | IPV6_PEERDNS=yes | ||
- | IPV6_PEERROUTES=yes | ||
</ | </ | ||
- | <WRAP center round important> | + | Vérifiez maintenant que vous pouvez communiquer avec la passerelle par défaut |
- | **Important** : Notez l' | + | |
- | </ | + | |
- | + | ||
- | ====La Commande hostname==== | + | |
- | + | ||
- | La procédure de la modification du hostname est simplifiée et sa prise en compte est immédiate | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | [root@centos7 ~]# cat / | + | PING 192.168.56.1 (192.168.56.1) 56(84) bytes of data. |
- | centos.fenestros.loc | + | 64 bytes from 192.168.56.1: icmp_seq=1 ttl=64 time=14.6 ms |
- | [root@centos7 ~]# hostname | + | 64 bytes from 192.168.56.1: icmp_seq=2 ttl=64 time=0.209 ms |
- | centos.fenestros.loc | + | 64 bytes from 192.168.56.1: icmp_seq=3 ttl=64 time=0.160 ms |
- | [root@centos7 ~]# nmcli general hostname centos7.fenestros.loc | + | ^C |
- | [root@centos7 ~]# cat / | + | --- 192.168.56.1 ping statistics --- |
- | centos7.fenestros.loc | + | 3 packets transmitted, |
- | [root@centos7 ~]# hostname | + | rtt min/ |
- | centos7.fenestros.loc | + | |
</ | </ | ||
- | ====La Commande ip==== | + | Pour pouvoir gérer l' |
- | + | ||
- | Sous RHEL/CentOS 7 la commande | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | 1: lo: < | + | [root@centos8 |
- | link/loopback 00: | + | TYPE=Ethernet |
- | inet 127.0.0.1/8 scope host lo | + | BOOTPROTO=none |
- | | + | NAME=ip_kvm |
- | inet6 ::1/128 scope host | + | UUID=afc8b175-f2cb-47b2-baca-66454058c36f |
- | | + | DEVICE=ens19 |
- | 2: enp0s3: < | + | ONBOOT=yes |
- | link/ether 08: | + | BRIDGE=virbr0 |
- | inet 10.0.2.16/ | + | |
- | | + | |
- | inet 192.168.1.2/ | + | |
- | | + | |
- | inet6 fe80:: | + | |
- | | + | |
- | [root@centos7 | + | |
- | 1: lo: < | + | |
- | link/loopback 00: | + | |
- | inet 127.0.0.1/8 scope host lo | + | |
- | | + | |
- | inet6 ::1/128 scope host | + | |
- | valid_lft forever preferred_lft forever | + | |
- | 2: enp0s3: < | + | |
- | | + | |
- | inet 10.0.2.16/ | + | |
- | valid_lft forever preferred_lft forever | + | |
- | inet 192.168.1.2/ | + | |
- | | + | |
- | inet6 fe80:: | + | |
- | valid_lft forever preferred_lft forever | + | |
</ | </ | ||
- | ===Options | + | Pour créer le pont, il convient |
- | + | ||
- | Les options de cette commande sont : | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | Usage: ip [ OPTIONS ] OBJECT { COMMAND | help } | + | ls: cannot access '/ |
- | ip [ -force ] -batch filename | + | |
- | where OBJECT | + | |
- | | + | |
- | netns | l2tp | tcp_metrics | token } | + | |
- | | + | |
- | -f[amily] { inet | inet6 | ipx | dnet | bridge | link } | | + | |
- | -4 | -6 | -I | -D | -B | -0 | | + | |
- | -l[oops] { maximum-addr-flush-attempts } | | + | |
- | -o[neline] | -t[imestamp] | -b[atch] [filename] | | + | |
- | -rc[vbuf] [size]} | + | |
+ | [root@centos8 ~]# vi / | ||
+ | [root@centos8 ~]# cat / | ||
+ | TYPE=BRIDGE | ||
+ | DEVICE=virbr0 | ||
+ | BOOTPROTO=non | ||
+ | ONBOOT=yes | ||
+ | IPADDR=192.168.56.2 | ||
+ | NETMASK=255.255.255.0 | ||
+ | GATEWAY=192.168.56.1 | ||
</ | </ | ||
- | ====Activer/ | + | <WRAP center round important 60%> |
- | + | **Important** : Notez que le nom du pont est identique au pont existant. Ceci n'a pas d'importance. Notez aussi que l' | |
- | Deux commandes existent pour désactiver et activer manuellement une interface réseau : | + | |
- | + | ||
- | <code> | + | |
- | [root@centos7 ~]# nmcli device disconnect enp0s3 | + | |
- | [root@centos7 ~]# nmcli device connect enp0s3 | + | |
- | </ | + | |
- | + | ||
- | ====Routage Statique==== | + | |
- | + | ||
- | ===La commande ip=== | + | |
- | + | ||
- | Sous RHEL/CentOS 7, pour supprimer la route vers le réseau 192.168.1.0 il convient | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# ip route | + | |
- | default via 10.0.2.2 dev enp0s3 | + | |
- | 10.0.2.0/24 dev enp0s3 | + | |
- | 192.168.1.0/ | + | |
- | + | ||
- | [root@centos7 ~]# ip route del 192.168.1.0/ | + | |
- | + | ||
- | [root@centos7 ~]# ip route | + | |
- | default via 10.0.2.2 dev enp0s3 | + | |
- | 10.0.2.0/24 dev enp0s3 | + | |
- | </ | + | |
- | + | ||
- | Pour ajouter la route vers le réseau | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# ip route add 192.168.1.0/ | + | |
- | + | ||
- | [root@centos7 ~]# ip route | + | |
- | default via 10.0.2.2 dev enp0s3 | + | |
- | 10.0.2.0/24 dev enp0s3 | + | |
- | 192.168.1.0/ | + | |
- | </ | + | |
- | + | ||
- | <WRAP center round important> | + | |
- | La commande utilisée pour ajouter une passerelle | + | |
</ | </ | ||
- | ===Activer/ | + | Pour que la configuration puisse fonctionner, il est necéssaire |
- | + | ||
- | Pour activer le routage sur le serveur, il convient | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | [root@centos7 | + | [root@centos8 |
- | 1 | + | # The kernel allocates aio memory on demand, and this number limits the |
+ | # number of parallel aio requests; the only drawback of a larger limit is | ||
+ | # that a malicious guest could issue parallel requests to cause the kernel | ||
+ | # to set aside memory. | ||
+ | # 128 * (number of virtual disks on the host) | ||
+ | # Libvirt uses a default of 1M requests to allow 8k disks, with at most | ||
+ | # 64M of kernel memory if all disks hit an aio request at the same time. | ||
+ | fs.aio-max-nr = 1048576 | ||
+ | net.ipv4.ip_forward | ||
</ | </ | ||
- | Pour désactiver le routage sur le serveur, il convient de désactiver | + | En utilisant la commande **sysctl**, appliquez |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | [root@centos7 ~]# cat /proc/sys/net/ipv4/ip_forward | + | fs.aio-max-nr = 1048576 |
- | 0 | + | net.ipv4.ip_forward |
</ | </ | ||
- | =====Diagnostique du Réseau===== | + | Dernièrement, il est important de configurer le pare-feu pour le pont : |
- | + | ||
- | ====ping==== | + | |
- | + | ||
- | Pour tester l' | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | PING 10.0.2.2 (10.0.2.2) 56(84) bytes of data. | + | success |
- | 64 bytes from 10.0.2.2: icmp_seq=1 ttl=63 time=0.602 ms | + | [root@centos8 ~]# firewall-cmd --permanent |
- | 64 bytes from 10.0.2.2: icmp_seq=2 ttl=63 time=0.375 ms | + | success |
- | 64 bytes from 10.0.2.2: icmp_seq=3 ttl=63 time=0.512 ms | + | |
- | 64 bytes from 10.0.2.2: icmp_seq=4 ttl=63 time=0.547 ms | + | |
- | ^C | + | |
- | --- 10.0.2.2 ping statistics | + | |
- | 4 packets transmitted, | + | |
- | rtt min/ | + | |
</ | </ | ||
- | |||
- | ===Options de la commande ping=== | ||
- | |||
- | Les options de cette commande sont : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | ping: invalid option | + | success |
- | Usage: ping [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface] | + | |
- | [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos] | + | |
- | [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option] | + | |
- | [-w deadline] [-W timeout] [hop1 ...] destination | + | |
</ | </ | ||
- | ====netstat -i==== | + | La configuration faite, vérifiez la prise en charge en utilisant |
- | + | ||
- | Pour visualiser les statistiques réseaux, vous disposez de la commande **netstat** : | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | Kernel Interface table | + | 1: lo: < |
- | Iface MTU RX-OK RX-ERR RX-DRP RX-OVR | + | |
- | enp0s3 | + | |
- | lo | + | valid_lft forever preferred_lft forever |
+ | inet6 ::1/128 scope host | ||
+ | | ||
+ | 2: ens18: < | ||
+ | link/ether 4e: | ||
+ | inet 10.0.2.46/24 brd 10.0.2.255 scope global noprefixroute ens18 | ||
+ | | ||
+ | inet 192.168.1.2/ | ||
+ | | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | 3: ens19: < | ||
+ | link/ether 46: | ||
+ | inet 192.168.56.2/ | ||
+ | | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | 4: virbr0: < | ||
+ | link/ether 52: | ||
+ | inet 192.168.122.1/ | ||
+ | | ||
+ | 5: virbr0-nic: < | ||
+ | link/ether 52: | ||
</ | </ | ||
- | ===Options de la commande netstat=== | + | <WRAP center round important 60%> |
- | + | **Important** : Notez que la configuration n' | |
- | Les options de cette commande sont : | + | |
- | + | ||
- | <code> | + | |
- | [root@centos7 ~]# netstat --help | + | |
- | usage: netstat [-vWeenNcCF] [< | + | |
- | | + | |
- | | + | |
- | + | ||
- | -r, --route | + | |
- | -I, --interfaces=< | + | |
- | -i, --interfaces | + | |
- | -g, --groups | + | |
- | -s, --statistics | + | |
- | -M, --masquerade | + | |
- | + | ||
- | -v, --verbose | + | |
- | -W, --wide | + | |
- | -n, --numeric | + | |
- | --numeric-hosts | + | |
- | --numeric-ports | + | |
- | --numeric-users | + | |
- | -N, --symbolic | + | |
- | -e, --extend | + | |
- | -p, --programs | + | |
- | -o, --timers | + | |
- | -c, --continuous | + | |
- | + | ||
- | -l, --listening | + | |
- | -a, --all display all sockets (default: connected) | + | |
- | -F, --fib display Forwarding Information Base (default) | + | |
- | -C, --cache | + | |
- | -Z, --context | + | |
- | + | ||
- | < | + | |
- | | + | |
- | < | + | |
- | List of possible address families (which support routing): | + | |
- | inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) | + | |
- | netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) | + | |
- | x25 (CCITT X.25) | + | |
- | </ | + | |
- | + | ||
- | ====La commande traceroute==== | + | |
- | + | ||
- | La commande ping est à la base de la commande | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# traceroute www.i2tch.eu | + | |
- | traceroute to www.i2tch.eu (217.160.122.33), | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | 10 | + | |
- | 11 * * * | + | |
- | 12 * * * | + | |
- | 13 * * * | + | |
- | 14 * * * | + | |
- | 15 * * * | + | |
- | 16 * * * | + | |
- | 17 * * * | + | |
- | 18 * * * | + | |
- | ... | + | |
- | </ | + | |
- | + | ||
- | ===Options de la commande traceroute=== | + | |
- | + | ||
- | Les options de cette commande sont : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# traceroute --help | + | |
- | Usage: | + | |
- | traceroute [ -46dFITnreAUDV ] [ -f first_ttl ] [ -g gate,... ] [ -i device ] [ -m max_ttl ] [ -N squeries ] [ -p port ] [ -t tos ] [ -l flow_label ] [ -w waittime ] [ -q nqueries ] [ -s src_addr ] [ -z sendwait ] [ --fwmark=num ] host [ packetlen ] | + | |
- | Options: | + | |
- | -4 Use IPv4 | + | |
- | -6 Use IPv6 | + | |
- | -d --debug | + | |
- | -F --dont-fragment | + | |
- | -f first_ttl | + | |
- | Start from the first_ttl hop (instead from 1) | + | |
- | -g gate, | + | |
- | Route packets through the specified gateway | + | |
- | (maximum 8 for IPv4 and 127 for IPv6) | + | |
- | -I --icmp | + | |
- | -T --tcp Use TCP SYN for tracerouting (default port is 80) | + | |
- | -i device | + | |
- | Specify a network interface to operate with | + | |
- | -m max_ttl | + | |
- | Set the max number of hops (max TTL to be | + | |
- | reached). Default is 30 | + | |
- | -N squeries | + | |
- | Set the number of probes to be tried | + | |
- | simultaneously (default is 16) | + | |
- | -n Do not resolve IP addresses to their domain names | + | |
- | -p port --port=port | + | |
- | initial udp port value for " | + | |
- | (incremented by each probe, default is 33434), or | + | |
- | initial seq for " | + | |
- | default from 1), or some constant destination | + | |
- | port for other methods (with default of 80 for | + | |
- | " | + | |
- | -t tos --tos=tos | + | |
- | traffic class) value for outgoing packets | + | |
- | -l flow_label | + | |
- | Use specified flow_label for IPv6 packets | + | |
- | -w waittime | + | |
- | Set the number of seconds to wait for response to | + | |
- | a probe (default is 5.0). Non-integer (float | + | |
- | point) values allowed too | + | |
- | -q nqueries | + | |
- | Set the number of probes per each hop. Default is | + | |
- | 3 | + | |
- | -r Bypass the normal routing and send directly to a | + | |
- | host on an attached network | + | |
- | -s src_addr | + | |
- | Use source src_addr for outgoing packets | + | |
- | -z sendwait | + | |
- | Minimal time interval between probes (default 0). | + | |
- | If the value is more than 10, then it specifies a | + | |
- | number in milliseconds, | + | |
- | seconds (float point values allowed too) | + | |
- | -e --extensions | + | |
- | -A --as-path-lookups | + | |
- | print results directly after the corresponding | + | |
- | addresses | + | |
- | -M name --module=name | + | |
- | for traceroute operations. Most methods have | + | |
- | their shortcuts (`-I' | + | |
- | -O OPTS, | + | |
- | Use module-specific option OPTS for the | + | |
- | traceroute module. Several OPTS allowed, | + | |
- | separated by comma. If OPTS is " | + | |
- | about available options | + | |
- | --sport=num | + | |
- | `-N 1' | + | |
- | --fwmark=num | + | |
- | -U --udp Use UDP to particular port for tracerouting | + | |
- | (instead of increasing the port per each probe), | + | |
- | default port is 53 | + | |
- | -UL Use UDPLITE for tracerouting (default dest port | + | |
- | is 53) | + | |
- | -D --dccp | + | |
- | is 33434) | + | |
- | -P prot --protocol=prot | + | |
- | --mtu | + | |
- | `-F -N 1' | + | |
- | --back | + | |
- | print if it differs | + | |
- | -V --version | + | |
- | --help | + | |
- | + | ||
- | Arguments: | + | |
- | + | + | |
- | packetlen | + | |
- | header plus 40). Can be ignored or increased to a minimal | + | |
- | allowed value | + | |
- | </ | + | |
- | + | ||
- | =====Connexions à Distance===== | + | |
- | + | ||
- | ==== Telnet ==== | + | |
- | + | ||
- | <WRAP center round important> | + | |
- | La commande | + | |
</ | </ | ||
- | La commande **telnet** est utilisée | + | Consultez maintenant la list des réseaux configurés |
- | + | ||
- | < | + | |
- | # telnet numero_ip | + | |
- | </ | + | |
- | + | ||
- | <WRAP center round important> | + | |
- | Le service telnet revient à une redirection des canaux standards d' | + | |
- | </ | + | |
- | + | ||
- | ===Options de la commande telnet=== | + | |
- | + | ||
- | Les options de cette commande sont : | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | telnet: invalid option | + | |
- | Usage: telnet [-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user] | + | -------------------------------------------- |
- | [-n tracefile] [-b hostalias ] [-r] | + | |
- | [host-name [port]] | + | |
</ | </ | ||
- | ==== wget ==== | + | En utilisant la commande **virsh net-dumpxml**, il est possible de constater la configuration **actuelle** du pont : |
- | + | ||
- | La commande **wget** est utilisée pour récupérer un fichier via http, https ou ftp : | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | --2017-06-22 16: | + | < |
- | Resolving www.dropbox.com (www.dropbox.com)... 162.125.65.1 | + | |
- | Connecting to www.dropbox.com (www.dropbox.com)|162.125.65.1|: | + | <uuid>0679ee40-befd-4f48-841e-7fc64885eb49</ |
- | HTTP request sent, awaiting response... 302 Found | + | |
- | Location: https:// | + | |
- | --2017-06-22 16: | + | < |
- | Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 162.125.65.6 | + | |
- | Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|162.125.65.6|: | + | |
- | HTTP request sent, awaiting response... 200 OK | + | |
- | Length: 17 [text/ | + | |
- | Saving to: ‘fichier_test? | + | |
- | + | | |
- | 100%[====================================================================================>] 17 --.-K/ | + | |
- | + | </dhcp> | |
- | 2017-06-22 16:53:41 (480 KB/s) - ‘fichier_test? | + | </ip> |
- | </code> | + | </network> |
- | + | ||
- | ===Options de la commande wget=== | + | |
- | + | ||
- | Les options de cette commande sont : | + | |
- | + | ||
- | <code> | + | |
- | [root@centos7 ~]# wget --help | + | |
- | GNU Wget 1.14, a non-interactive network retriever. | + | |
- | Usage: wget [OPTION]... [URL]... | + | |
- | + | ||
- | Mandatory arguments to long options are mandatory for short options too. | + | |
- | + | ||
- | Startup: | + | |
- | | + | |
- | | + | |
- | -b, --background | + | |
- | -e, --execute=COMMAND | + | |
- | + | ||
- | Logging and input file: | + | |
- | -o, --output-file=FILE | + | |
- | | + | |
- | -d, --debug | + | |
- | -q, --quiet | + | |
- | -v, --verbose | + | |
- | -nv, --no-verbose | + | |
- | | + | |
- | -i, --input-file=FILE | + | |
- | -F, --force-html | + | |
- | -B, --base=URL | + | |
- | | + | |
- | | + | |
- | + | ||
- | Download: | + | |
- | -t, --tries=NUMBER | + | |
- | | + | |
- | -O, --output-document=FILE | + | |
- | -nc, --no-clobber | + | |
- | | + | |
- | -c, --continue | + | |
- | | + | |
- | -N, --timestamping | + | |
- | | + | |
- | --no-use-server-timestamps | + | |
- | the one on the server. | + | |
- | -S, --server-response | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | -Q, --quota=NUMBER | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | -6, --inet6-only | + | |
- | | + | |
- | one of IPv6, IPv4, or none. | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | Directories: | + | |
- | -nd, --no-directories | + | |
- | -x, --force-directories | + | |
- | -nH, --no-host-directories | + | |
- | | + | |
- | -P, --directory-prefix=PREFIX | + | |
- | | + | |
- | + | ||
- | HTTP options: | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | this is `index.html'.). | + | |
- | -E, --adjust-extension | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | -U, --user-agent=AGENT | + | |
- | --no-http-keep-alive | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | HTTPS (SSL/TLS) options: | + | |
- | | + | |
- | SSLv3, and TLSv1. | + | |
- | | + | |
- | --certificate=FILE | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | FTP options: | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | WARC options: | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | WARC writer. | + | |
- | + | ||
- | Recursive download: | + | |
- | -r, --recursive | + | |
- | -l, --level=NUMBER | + | |
- | --delete-after | + | |
- | -k, --convert-links | + | |
- | local files. | + | |
- | --backups=N | + | |
- | -K, --backup-converted | + | |
- | -m, --mirror | + | |
- | -p, --page-requisites | + | |
- | --strict-comments | + | |
- | + | ||
- | Recursive accept/ | + | |
- | -A, --accept=LIST | + | |
- | -R, --reject=LIST | + | |
- | | + | |
- | | + | |
- | | + | |
- | -D, --domains=LIST | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | -H, --span-hosts | + | |
- | -L, --relative | + | |
- | -I, --include-directories=LIST list of allowed directories. | + | |
- | --trust-server-names | + | |
- | url last component. | + | |
- | -X, --exclude-directories=LIST | + | |
- | -np, --no-parent | + | |
- | + | ||
- | Mail bug reports and suggestions to < | + | |
- | </code> | + | |
- | + | ||
- | ==== ftp ==== | + | |
- | + | ||
- | <WRAP center round important> | + | |
- | La commande **ftp** n'est pas installée par défaut sous CentOS 7. Installez-le à l'aide de la commande **yum install ftp** en tant que root. | + | |
- | </WRAP> | + | |
- | + | ||
- | La commande **ftp** est utilisée pour le transfert de fichiers: | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# ftp ftp2.fenestros.com | + | |
- | Connected to ftp2.fenestros.com (213.186.33.14). | + | |
- | 220 anonymous.ftp.ovh.net NcFTPd Server (licensed copy) ready. | + | |
- | Name (ftp2.fenestros.com: | + | |
- | 331 Guest login ok, send your complete e-mail address as password. | + | |
- | Password: | + | |
- | 230 Logged in anonymously. | + | |
- | Remote system type is UNIX. | + | |
- | Using binary mode to transfer files. | + | |
- | ftp> | + | |
- | </code> | + | |
- | + | ||
- | Une fois connecté, il convient d' | + | |
- | + | ||
- | <code> | + | |
- | ftp> help | + | |
- | Commands may be abbreviated. | + | |
- | + | ||
- | ! debug mdir sendport site | + | |
- | $ dir mget put size | + | |
- | account disconnect mkdir pwd status | + | |
- | append exit mls quit struct | + | |
- | ascii form mode quote system | + | |
- | bell get modtime recv sunique | + | |
- | binary glob mput reget tenex | + | |
- | bye hash newer rstatus tick | + | |
- | case help nmap rhelp trace | + | |
- | cd idle nlist rename type | + | |
- | cdup image ntrans reset user | + | |
- | chmod lcd open restart umask | + | |
- | close ls prompt rmdir verbose | + | |
- | cr macdef passive runique ? | + | |
- | delete mdelete proxy send | + | |
- | ftp> | + | |
</ | </ | ||
- | Le caractère | + | Il est donc nécessaire d' |
< | < | ||
- | ftp> !pwd | + | [root@centos8 ~]# virsh net-edit default |
- | /root | + | |
</ | </ | ||
- | Pour transférer un fichier vers le serveur, il convient d'utiliser la commande **put** | + | A l'issu de votre édition, votre fichier doit correspondre à l'exemple suivant |
< | < | ||
- | ftp> put nom_fichier_local nom_fichier_distant | + | < |
+ | < | ||
+ | < | ||
+ | <forward mode=' | ||
+ | <bridge name=' | ||
+ | <mac address=' | ||
+ | <ip address=' | ||
+ | < | ||
+ | <range start=' | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
</ | </ | ||
- | Vous pouvez également transférer plusieurs fichiers à la fois grâce à la commande **mput**. Dans ce cas précis, il convient de saisir la commande suivante: | + | Sortez du mode édition. Vous noterez que la commande |
- | + | ||
- | < | + | |
- | ftp> mput nom*.* | + | |
- | </ | + | |
- | + | ||
- | Pour transférer un fichier du serveur, il convient d' | + | |
- | + | ||
- | < | + | |
- | ftp> get nom_fichier | + | |
- | </ | + | |
- | + | ||
- | Vous pouvez également transférer plusieurs fichiers à la fois grâce à la commande | + | |
- | + | ||
- | Pour supprimer un fichier | + | |
- | + | ||
- | < | + | |
- | ftp> del nom_fichier | + | |
- | </ | + | |
- | + | ||
- | Pour fermer la session, il convient d' | + | |
< | < | ||
- | ftp> quit | + | [ESC]:q |
- | [root@centos7 | + | [root@centos8 |
+ | Network default XML configuration edited. | ||
</ | </ | ||
- | ====SSH==== | + | Par contre, la simple édition |
- | + | ||
- | ===Introduction=== | + | |
- | + | ||
- | La commande **[[wpfr> | + | |
- | + | ||
- | * Le **serveur SSH** | + | |
- | * le démon sshd, qui s' | + | |
- | * Le **client SSH** | + | |
- | * ssh ou scp, qui assure | + | |
- | * La **session** qui représente la connexion courante et qui commence juste après l' | + | |
- | * Les **clefs** | + | |
- | * **Couple de clef utilisateur asymétriques** et persistantes qui assurent l' | + | |
- | * **Clef hôte asymétrique et persistante** garantissant l' | + | |
- | * **Clef serveur asymétrique et temporaire** utilisée par le protocole SSH1 qui sert au chiffrement de la clé de session, | + | |
- | * **Clef de session symétrique qui est générée aléatoirement** et qui permet le chiiffrement de la communication entre le client et le serveur. Elle est détruite en fin de session. SSH-1 utilise une seule clef tandis que SSH-2 utilise une clef par direction de la communication, | + | |
- | * La **base de données des hôtes connus** qui stocke les clés des connexions précédentes. | + | |
- | + | ||
- | SSH fonctionne de la manière suivante pour la la mise en place d'un canal sécurisé: | + | |
- | + | ||
- | * Le client contacte le serveur sur son port 22, | + | |
- | * Les client et le serveur échangent leur version de SSH. En cas de non-compatibilité de versions, l'un des deux met fin au processus, | + | |
- | * Le serveur SSH s' | + | |
- | * Sa clé hôte, | + | |
- | * Sa clé serveur, | + | |
- | * Une séquence aléatoire de huit octets à inclure dans les futures réponses du client, | + | |
- | * Une liste de méthodes de chiffrage, compression et authentification, | + | |
- | * Le client et le serveur produisent un identifiant identique, un haché MD5 long de 128 bits contenant | + | |
- | * Le client génère sa clé de session symétrique et la chiffre deux fois de suite, une fois avec la clé hôte du serveur et la deuxième fois avec la clé serveur. Le client envoie cette clé au serveur accompagnée de la séquence aléatoire et un choix d' | + | |
- | * Le serveur déchiffre la clé de session, | + | |
- | * Le client et le serveur mettent | + | |
- | + | ||
- | ==SSH-1== | + | |
- | + | ||
- | SSH-1 utilise une paire de clefs de type RSA1. Il assure l' | + | |
- | + | ||
- | Afin de s' | + | |
- | + | ||
- | * **Kerberos**, | + | |
- | * **Rhosts**, | + | |
- | * **%%RhostsRSA%%**, | + | |
- | * Par **clef asymétrique**, | + | |
- | * **TIS**, | + | |
- | * Par **mot de passe**. | + | |
- | + | ||
- | ==SSH-2== | + | |
- | + | ||
- | SSH-2 utilise **DSA** ou **RSA**. Il assure l' | + | |
- | + | ||
- | * **SSH-TRANS** – Transport Layer Protocol, | + | |
- | * **SSH-AUTH** – Authentification Protocol, | + | |
- | * **SSH-CONN** – Connection Protocol. | + | |
- | + | ||
- | SSH-2 diffère de SSH-1 essentiellement dans la phase authentification. | + | |
- | + | ||
- | Trois méthodes d' | + | |
- | + | ||
- | * Par **clef asymétrique**, | + | |
- | * Identique à SSH-1 sauf avec l' | + | |
- | * **%%RhostsRSA%%**, | + | |
- | * Par **mot de passe**. | + | |
- | + | ||
- | ==Options de la commande== | + | |
- | + | ||
- | Les options de cette commande sont : | + | |
< | < | ||
- | [root@centos6 | + | [root@centos8 |
- | usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] | + | < |
- | [-D [bind_address: | + | < |
- | [-i identity_file] [-L [bind_address:]port:host:hostport] | + | < |
- | [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] | + | <forward mode=' |
- | [-R [bind_address:]port:host: | + | <nat> |
- | [-w local_tun[: | + | <port start=' |
+ | </ | ||
+ | </ | ||
+ | <bridge name=' | ||
+ | <mac address=' | ||
+ | <ip address=' | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
</ | </ | ||
- | ===L' | + | Notez que même en cas de re-démarrage |
- | + | ||
- | L' | + | |
- | + | ||
- | Avantage: | + | |
- | * Aucune configuration de clef asymétrique n'est nécessaire. | + | |
- | + | ||
- | Inconvénients: | + | |
- | * L' | + | |
- | * Moins sécurisé qu'un système par clef asymétrique. | + | |
- | + | ||
- | ===L' | + | |
- | + | ||
- | * Le **client** envoie au serveur une requête d' | + | |
- | * Le **serveur** recherche une correspondance pour ce module dans le fichier des clés autorisés **~/ | + | |
- | * Dans le cas où une correspondance n'est pas trouvée, le serveur met fin à la communication, | + | |
- | * Dans le cas contraire le serveur génère une chaîne aléatoire | + | |
- | * Le **client** reçoit le challenge et le décrypte avec la partie privée de sa clé. Il combine le challenge avec l' | + | |
- | * Le **serveur** génère le même haché et le compare avec celui reçu du client. Si les deux hachés sont identiques, l' | + | |
- | + | ||
- | ===Installation=== | + | |
- | + | ||
- | Pour installer/ | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | Loaded | + | [root@centos8 ~]# systemctl status libvirtd |
- | Loading mirror speeds from cached hostfile | + | ● libvirtd.service |
- | * base: centos.mirror.fr.planethoster.net | + | |
- | * extras: ftp.ciril.fr | + | Active: active (running) since Thu 2021-09-02 10:27:41 EDT; 7s ago |
- | * updates: centos.mirrors.ovh.net | + | Docs: man: |
- | Package openssh-server-6.6.1p1-25.el7_2.x86_64 already installed and latest version | + | |
- | Nothing to do | + | Main PID: 4037 (libvirtd) |
- | </code> | + | Tasks: 19 (limit: 32768) |
+ | | ||
+ | CGroup: /system.slice/ | ||
+ | ├─1950 / | ||
+ | | ||
+ | └─4037 | ||
- | <WRAP center round important> | + | Sep 02 10:27:41 centos8.ittraining.loc systemd[1]: Starting Virtualization daemon... |
- | **Important** - Pour les stations de travail, installez le client | + | Sep 02 10:27:41 centos8.ittraining.loc systemd[1]: Started Virtualization daemon. |
- | </ | + | Sep 02 10:27:41 centos8.ittraining.loc dnsmasq[1950]: read /etc/hosts - 2 addresses |
- | + | Sep 02 10:27:41 centos8.ittraining.loc dnsmasq[1950]: | |
- | ==Options de la commande== | + | Sep 02 10:27:41 centos8.ittraining.loc dnsmasq-dhcp[1950]: read /var/lib/libvirt/dnsmasq/default.hostsfile |
- | + | ||
- | Les options de la commande sont : | + | |
- | + | ||
- | < | + | |
- | SYNOPSIS | + | |
- | sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-f config_file] [-g login_grace_time] [-h host_key_file] [-k key_gen_time] [-o option] [-p port] [-u len] | + | |
- | </ | + | |
- | + | ||
- | ===Configuration=== | + | |
- | + | ||
- | <WRAP center round important> | + | |
- | **Important** - La configuration doit s' | + | |
- | </ | + | |
- | + | ||
- | ==Serveur== | + | |
- | + | ||
- | La configuration du serveur s' | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# cat / | + | |
- | # $OpenBSD: sshd_config, | + | |
- | + | ||
- | # This is the sshd server system-wide configuration file. See | + | |
- | # sshd_config(5) for more information. | + | |
- | + | ||
- | # This sshd was compiled with PATH=/ | + | |
- | + | ||
- | # The strategy used for options in the default sshd_config shipped with | + | |
- | # OpenSSH is to specify options with their default value where | + | |
- | # possible, but leave them commented. | + | |
- | # default value. | + | |
- | + | ||
- | # If you want to change the port on a SELinux system, you have to tell | + | |
- | # SELinux about this change. | + | |
- | # semanage port -a -t ssh_port_t -p tcp # | + | |
- | # | + | |
- | #Port 22 | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | + | ||
- | # The default requires explicit activation of protocol 1 | + | |
- | #Protocol 2 | + | |
- | + | ||
- | # HostKey for protocol version 1 | + | |
- | # | + | |
- | # HostKeys for protocol version | + | |
- | HostKey / | + | |
- | #HostKey / | + | |
- | HostKey / | + | |
- | HostKey / | + | |
- | + | ||
- | # Lifetime and size of ephemeral version 1 server key | + | |
- | # | + | |
- | # | + | |
- | + | ||
- | # Ciphers and keying | + | |
- | #RekeyLimit default none | + | |
- | + | ||
- | # Logging | + | |
- | # obsoletes QuietMode and FascistLogging | + | |
- | # | + | |
- | SyslogFacility AUTHPRIV | + | |
- | #LogLevel INFO | + | |
- | + | ||
- | # Authentication: | + | |
- | + | ||
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | + | ||
- | # | + | |
- | # | + | |
- | + | ||
- | # The default is to check both .ssh/ | + | |
- | # but this is overridden so installations will only check .ssh/authorized_keys | + | |
- | AuthorizedKeysFile .ssh/authorized_keys | + | |
- | + | ||
- | # | + | |
- | + | ||
- | # | + | |
- | # | + | |
- | + | ||
- | # For this to work you will also need host keys in /etc/ | + | |
- | # | + | |
- | # similar for protocol version 2 | + | |
- | # | + | |
- | # Change to yes if you don't trust ~/.ssh/ | + | |
- | # RhostsRSAAuthentication and HostbasedAuthentication | + | |
- | # | + | |
- | # Don't read the user's ~/.rhosts and ~/.shosts files | + | |
- | # | + | |
- | + | ||
- | # To disable tunneled clear text passwords, change to no here! | + | |
- | # | + | |
- | # | + | |
- | PasswordAuthentication yes | + | |
- | + | ||
- | # Change to no to disable s/key passwords | + | |
- | # | + | |
- | ChallengeResponseAuthentication no | + | |
- | + | ||
- | # Kerberos options | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | + | ||
- | # GSSAPI options | + | |
- | GSSAPIAuthentication yes | + | |
- | GSSAPICleanupCredentials no | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | + | ||
- | # Set this to ' | + | |
- | # and session processing. If this is enabled, PAM authentication will | + | |
- | # be allowed through the ChallengeResponseAuthentication and | + | |
- | # PasswordAuthentication. | + | |
- | # PAM authentication via ChallengeResponseAuthentication may bypass | + | |
- | # the setting of " | + | |
- | # If you just want the PAM account and session checks to run without | + | |
- | # PAM authentication, | + | |
- | # and ChallengeResponseAuthentication to ' | + | |
- | # WARNING: ' | + | |
- | # problems. | + | |
- | UsePAM yes | + | |
- | + | ||
- | # | + | |
- | # | + | |
- | # | + | |
- | X11Forwarding yes | + | |
- | # | + | |
- | # | + | |
- | #PermitTTY yes | + | |
- | #PrintMotd yes | + | |
- | # | + | |
- | # | + | |
- | #UseLogin no | + | |
- | UsePrivilegeSeparation sandbox # Default for new installations. | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | #UseDNS yes | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | + | ||
- | # no default banner path | + | |
- | #Banner none | + | |
- | + | ||
- | # Accept locale-related environment variables | + | |
- | AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES | + | |
- | AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT | + | |
- | AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE | + | |
- | AcceptEnv XMODIFIERS | + | |
- | + | ||
- | # override default of no subsystems | + | |
- | Subsystem sftp /usr/libexec/ | + | |
- | # Example of overriding settings on a per-user basis | + | [root@centos8 ~]# virsh net-dumpxml default |
- | #Match User anoncvs | + | < |
- | # | + | < |
- | # | + | < |
- | # PermitTTY no | + | < |
- | # | + | < |
+ | <port start=' | ||
+ | </ | ||
+ | </ | ||
+ | <bridge name=' | ||
+ | <mac address=' | ||
+ | <ip address=' | ||
+ | < | ||
+ | <range start=' | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
</ | </ | ||
- | Pour ôter les lignes de commentaires dans ce fichier, utilisez la commande suivante | + | Re-démarrez donc votre VM : |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | [root@centos7 tmp]# cat sshd_config | + | |
- | HostKey / | + | |
- | HostKey / | + | |
- | HostKey / | + | |
- | SyslogFacility AUTHPRIV | + | |
- | AuthorizedKeysFile .ssh/ | + | |
- | PasswordAuthentication yes | + | |
- | ChallengeResponseAuthentication no | + | |
- | GSSAPIAuthentication yes | + | |
- | GSSAPICleanupCredentials no | + | |
- | UsePAM yes | + | |
- | X11Forwarding yes | + | |
- | UsePrivilegeSeparation sandbox # Default for new installations. | + | |
- | AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES | + | |
- | AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT | + | |
- | AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE | + | |
- | AcceptEnv XMODIFIERS | + | |
- | Subsystem sftp / | + | |
</ | </ | ||
- | Pour sécuriser le serveur ssh, ajoutez ou modifiez les directives suivantes : | + | Connectez-vous de nouveau à votre VM et contrôler la sortie |
- | + | ||
- | < | + | |
- | AllowGroups adm | + | |
- | Banner / | + | |
- | HostbasedAuthentication no | + | |
- | IgnoreRhosts yes | + | |
- | LoginGraceTime 60 | + | |
- | LogLevel INFO | + | |
- | PermitEmptyPasswords no | + | |
- | PermitRootLogin no | + | |
- | PrintLastLog yes | + | |
- | Protocol 2 | + | |
- | StrictModes yes | + | |
- | X11Forwarding no | + | |
- | </ | + | |
- | + | ||
- | Votre fichier ressemblera à celui-ci : | + | |
- | + | ||
- | < | + | |
- | AllowGroups adm | + | |
- | Banner / | + | |
- | HostbasedAuthentication no | + | |
- | IgnoreRhosts yes | + | |
- | LoginGraceTime 60 | + | |
- | LogLevel INFO | + | |
- | PermitEmptyPasswords no | + | |
- | PermitRootLogin no | + | |
- | PrintLastLog yes | + | |
- | Protocol 2 | + | |
- | StrictModes yes | + | |
- | X11Forwarding no | + | |
- | HostKey / | + | |
- | HostKey / | + | |
- | HostKey / | + | |
- | SyslogFacility AUTHPRIV | + | |
- | AuthorizedKeysFile .ssh/ | + | |
- | PasswordAuthentication yes | + | |
- | ChallengeResponseAuthentication no | + | |
- | GSSAPIAuthentication yes | + | |
- | GSSAPICleanupCredentials no | + | |
- | UsePAM yes | + | |
- | UsePrivilegeSeparation sandbox # Default for new installations. | + | |
- | AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES | + | |
- | AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT | + | |
- | AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE | + | |
- | AcceptEnv XMODIFIERS | + | |
- | Subsystem sftp / | + | |
- | </ | + | |
- | + | ||
- | <WRAP center round todo> | + | |
- | **A Faire** - Renommez le fichier **/ | + | |
- | </ | + | |
- | + | ||
- | Pour générer les clefs sur le serveur saisissez | + | |
- | + | ||
- | Lors de la génération des clefs, la passphrase doit être **vide**. | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | Generating public/ | + | NAME |
- | Enter file in which to save the key (/ | + | ip_fixe |
- | Enter passphrase (empty for no passphrase): | + | virbr0 |
- | Enter same passphrase again: | + | ip_kvm |
- | Your identification has been saved in / | + | ens18 fc4a4d23-b15e-47a7-bcfa-b2e08f49553e |
- | Your public key has been saved in / | + | |
- | The key fingerprint is: | + | |
- | d5: | + | |
- | The key's randomart image is: | + | |
- | +--[ DSA 1024]----+ | + | |
- | | +oBB.| | + | |
- | | o *.o*| | + | |
- | | . o +.o| | + | |
- | | | + | |
- | | S .=..| | + | |
- | | .o.| | + | |
- | | o| | + | |
- | | E| | + | |
- | | | | + | |
- | +-----------------+ | + | |
</ | </ | ||
- | <WRAP center round important> | + | Utilisez ensuite |
- | Le chemin à indiquer pour le fichier est **/ | + | |
- | </ | + | |
- | + | ||
- | Les clefs publiques générées possèdent | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | moduli | + | 1: lo: < |
- | ssh_config | + | link/loopback 00: |
+ | inet 127.0.0.1/8 scope host lo | ||
+ | valid_lft forever preferred_lft forever | ||
+ | inet6 ::1/128 scope host | ||
+ | | ||
+ | 2: ens18: < | ||
+ | link/ether 4e: | ||
+ | inet 10.0.2.46/24 brd 10.0.2.255 scope global noprefixroute ens18 | ||
+ | | ||
+ | | ||
+ | | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | 3: ens19: < | ||
+ | link/ether 46: | ||
+ | 4: virbr0: < | ||
+ | link/ether 52: | ||
+ | inet 192.168.56.10/ | ||
+ | | ||
+ | 5: virbr0-nic: < | ||
+ | link/ether 52: | ||
</ | </ | ||
- | Re-démarrez ensuite le service sshd : | + | Dernièrement, |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
+ | PING 192.168.56.1 (192.168.56.1) 56(84) bytes of data. | ||
+ | 64 bytes from 192.168.56.1: | ||
+ | 64 bytes from 192.168.56.1: | ||
+ | 64 bytes from 192.168.56.1: | ||
+ | ^C | ||
+ | --- 192.168.56.1 ping statistics --- | ||
+ | 3 packets transmitted, | ||
+ | rtt min/ | ||
</ | </ | ||
- | Saisissez maintenant les commandes suivantes en tant que **trainee** : | + | ====2.3 - Configuration du Stockage==== |
- | <WRAP center round important> | + | KVM a besoin d'un emplacement pour stocker les VMs créées. L' |
- | Lors de la génération des clefs, la passphrase doit être **vide**. | + | |
- | </ | + | |
< | < | ||
- | [trainee@centos7 | + | [root@centos8 |
- | Generating public/ | + | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT |
- | Enter file in which to save the key (/ | + | sda 8:0 0 |
- | Created directory '/ | + | ├─sda1 |
- | Enter passphrase (empty for no passphrase): | + | └─sda2 |
- | Enter same passphrase again: | + | |
- | Your identification has been saved in / | + | |
- | Your public key has been saved in / | + | sdb 8:16 |
- | The key fingerprint is: | + | sdc 8:32 |
- | 97: | + | └─sdc1 |
- | The key's randomart image is: | + | sdd 8:48 0 |
- | +--[ DSA 1024]----+ | + | sr0 11:0 1 1024M 0 rom |
- | | .. ..=| | + | |
- | | | + | |
- | | ... | + | |
- | | o.. ..E.| | + | |
- | | S.o..oo .| | + | |
- | | .oo o.+. | | + | |
- | | . . =. | | + | |
- | | . | | + | |
- | | | | + | |
- | +-----------------+ | + | |
- | [trainee@centos7 ~]$ ssh-keygen -t rsa | + | |
- | Generating public/private rsa key pair. | + | |
- | Enter file in which to save the key (/ | + | |
- | Enter passphrase (empty for no passphrase): | + | |
- | Enter same passphrase again: | + | |
- | Your identification has been saved in / | + | |
- | Your public key has been saved in / | + | |
- | The key fingerprint is: | + | |
- | 80: | + | |
- | The key's randomart image is: | + | |
- | +--[ RSA 2048]----+ | + | |
- | | +o=o.. | + | |
- | | | + | |
- | | . B.Bo. | | + | |
- | | | + | |
- | | o.S | | + | |
- | | | + | |
- | | | | + | |
- | | | | + | |
- | | | | + | |
- | +-----------------+ | + | |
- | [trainee@centos7 ~]$ ssh-keygen -t ecdsa | + | |
- | Generating public/ | + | |
- | Enter file in which to save the key (/ | + | |
- | Enter passphrase (empty for no passphrase): | + | |
- | Enter same passphrase again: | + | |
- | Your identification has been saved in / | + | |
- | Your public key has been saved in / | + | |
- | The key fingerprint is: | + | |
- | 41: | + | |
- | The key's randomart image is: | + | |
- | +--[ECDSA | + | |
- | | ..... .. o+ | | + | |
- | | ... | + | |
- | |. .. . = .| | + | |
- | | o E . = . | | + | |
- | | | + | |
- | | . | + | |
- | | o . o . | | + | |
- | | . o . . | | + | |
- | | ..... . | | + | |
- | +-----------------+ | + | |
- | [trainee@centos7 ~]$ ssh-keygen -t ed25519 | + | |
- | Generating public/ | + | |
- | Enter file in which to save the key (/ | + | |
- | Enter passphrase (empty for no passphrase): | + | |
- | Enter same passphrase again: | + | |
- | Your identification has been saved in /home/ | + | |
- | Your public key has been saved in / | + | |
- | The key fingerprint is: | + | |
- | 66: | + | |
- | The key's randomart image is: | + | |
- | +--[ED25519 | + | |
- | | . . +..oo. | + | |
- | | o +..o. . | + | |
- | | | + | |
- | | . . o . . | | + | |
- | | . . S + E | | + | |
- | | o = o + | | + | |
- | | . + | + | |
- | | | + | |
- | | | | + | |
- | +-----------------+ | + | |
</ | </ | ||
- | <WRAP center round important> | + | Créez donc sur **/dev/sdd** un volume physique ainsi qu'un groupe de volumes appelé **kvm_storage** |
- | Les clés générées seront placées dans le répertoire | + | |
- | </ | + | |
- | + | ||
- | ==Utilisation== | + | |
- | + | ||
- | La commande ssh prend la forme suivante: | + | |
- | + | ||
- | ssh -l nom_de_compte numero_ip (nom_de_machine) | + | |
- | + | ||
- | En saisissant cette commande sur votre propre machine, vous obtiendrez | + | |
< | < | ||
- | [trainee@centos7 | + | [root@centos8 |
- | Mot de passe : | + | |
- | Dernière connexion : lundi 9 mai 2016 à 22:47:48 CEST sur pts/0 | + | [root@centos8 |
- | + | | |
- | [root@centos7 | + | |
- | The authenticity of host ' | + | |
- | ECDSA key fingerprint is 19: | + | |
- | Are you sure you want to continue connecting (yes/no)? yes | + | |
- | Warning: Permanently added ' | + | |
- | trainee@localhost' | + | |
- | Last login: Mon May 9 23:25:15 2016 from localhost.localdomain | + | |
</ | </ | ||
- | |||
- | ===Tunnels SSH=== | ||
- | |||
- | Le protocole SSH peut être utilisé pour sécuriser les protocoles tels telnet, pop3 etc.. En effet, on peut créer un //tunnel// SSH dans lequel passe les communications du protocole non-sécurisé. | ||
- | |||
- | La commande pour créer un tunnel ssh prend la forme suivante : | ||
- | |||
- | ssh -N -f compte@hôte -Lport-local: | ||
- | |||
- | Dans votre cas, vous allez créer un tunnel dans votre propre vm entre le port 15023 et le port 23 : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | trainee@localhost' | + | VG #PV #LV #SN Attr |
+ | cl_centos8 | ||
+ | | ||
</ | </ | ||
- | Installez maintenant | + | Créez ensuite un volume logique, dénommé **kvm_lv**, occupant toute l' |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
+ | Logical volume " | ||
+ | |||
+ | [root@centos8 ~]# lvs | ||
+ | LV | ||
+ | root | ||
+ | swap | ||
+ | kvm_lv kvm_storage -wi-a----- <32.00g | ||
</ | </ | ||
- | Telnet n'est ni démarré ni activé. Il convient donc de le démarrer et de l' | + | Créez ensuite un système |
+ | |||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | ● telnet.socket | + | meta-data=/dev/mapper/kvm_storage-kvm_lv isize=512 |
- | | + | = |
- | Active: inactive (dead) | + | = |
- | Docs: man: | + | = |
- | Listen: [::]:23 (Stream) | + | data |
- | Accepted: | + | = |
- | + | naming | |
- | [root@centos7 ~]# systemctl start telnet.socket | + | log =internal log |
- | + | = | |
- | [root@centos7 ~]# systemctl status telnet.socket | + | realtime =none |
- | ● telnet.socket - Telnet Server Activation Socket | + | Discarding blocks...Done. |
- | | + | |
- | | + | |
- | Docs: man: | + | |
- | | + | |
- | | + | |
- | + | ||
- | May 09 23:40:13 centos7.fenestros.loc systemd[1]: Listening on Telnet Server Activation Socket. | + | |
- | May 09 23:40:13 centos7.fenestros.loc systemd[1]: Starting Telnet Server Activation Socket. | + | |
- | + | ||
- | [root@centos7 ~]# systemctl enable telnet.socket | + | |
- | Created symlink from / | + | |
- | [root@centos7 ~]# systemctl status telnet.socket | + | |
- | ● telnet.socket - Telnet Server Activation Socket | + | |
- | Loaded: loaded (/ | + | |
- | Active: active (listening) since Mon 2016-05-09 23:40:13 CEST; 36s ago | + | |
- | Docs: man: | + | |
- | Listen: [::]:23 (Stream) | + | |
- | | + | |
- | + | ||
- | May 09 23:40:13 centos7.fenestros.loc systemd[1]: Listening on Telnet Server Activation Socket. | + | |
- | May 09 23:40:13 centos7.fenestros.loc systemd[1]: Starting Telnet Server Activation Socket. | + | |
</ | </ | ||
- | Connectez-vous | + | Éditez |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | Trying 127.0.0.1... | + | [root@centos8 ~]# cat /etc/fstab |
- | Connected to localhost. | + | |
- | Escape character is '^]'. | + | |
- | Kernel 3.10.0-327.13.1.el7.x86_64 on an x86_64 | + | # |
- | centos7 login: trainee | + | # /etc/fstab |
- | Password: | + | # Created by anaconda on Wed Jun 16 06:21:32 2021 |
- | Last login: Mon May 9 23:26:32 from localhost.localdomain | + | # |
- | [trainee@centos7 ~]$ | + | # Accessible filesystems, |
+ | # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info. | ||
+ | # | ||
+ | # After editing this file, run ' | ||
+ | # units generated | ||
+ | # | ||
+ | / | ||
+ | UUID=1c04981e-5317-4b73-9695-3ce25246835d /boot | ||
+ | / | ||
+ | UUID=f76d6b66-985b-4a91-af9c-4987e8c1443c /home | ||
+ | ## KVM Guest Image Store | ||
+ | / | ||
</ | </ | ||
- | <WRAP center round important> | + | Montez ensuite |
- | Notez bien que votre communication telnet passe par le tunnel SSH. | + | |
- | </ | + | |
- | + | ||
- | ====SCP==== | + | |
- | + | ||
- | ===Introduction=== | + | |
- | + | ||
- | La commande **scp** est le successeur et la remplaçante de la commande **rcp** de la famille des commandes **remote**. Il permet de faire des transferts sécurisés à partir d'une machine distante : | + | |
- | + | ||
- | $ scp compte@numero_ip(nom_de_machine):/ | + | |
- | + | ||
- | ou vers une machine distante : | + | |
- | + | ||
- | $ scp / | + | |
- | + | ||
- | ===Utilisation=== | + | |
- | + | ||
- | Nous allons maintenant utiliser **scp** pour chercher un fichier sur le << | + | |
- | + | ||
- | Créez le fichier **/ | + | |
< | < | ||
- | [trainee@centos7 | + | [root@centos8 |
- | /home/trainee | + | Filesystem |
- | [trainee@centos7 ~]$ touch scp_test | + | devtmpfs |
- | </code> | + | tmpfs 1.9G |
+ | tmpfs 1.9G 9.5M 1.9G 1% /run | ||
+ | tmpfs 1.9G | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | tmpfs 374M | ||
+ | tmpfs 374M 1.2M 373M 1% /run/user/42 | ||
- | Récupérez le fichier **scp_test** en utilisant scp : | + | [root@centos8 ~]# mount -a |
- | < | + | [root@centos8 |
- | [trainee@centos7 | + | Filesystem |
- | [trainee@centos7 ~]$ scp trainee@127.0.0.1:/home/trainee/ | + | devtmpfs |
- | The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established. | + | tmpfs 1.9G |
- | ECDSA key fingerprint is 19:cd:05:58: | + | tmpfs 1.9G 9.5M 1.9G 1% /run |
- | Are you sure you want to continue connecting (yes/no)? yes | + | tmpfs 1.9G 0 1.9G 0% / |
- | Warning: Permanently added ' | + | / |
- | trainee@127.0.0.1's password: trainee | + | /dev/ |
- | scp_test | + | / |
- | [trainee@centos7 ~]$ ls /tmp/scp_test | + | tmpfs |
- | /tmp/scp_test | + | tmpfs |
+ | /dev/ | ||
</ | </ | ||
- | ==Mise en place des clefs== | + | Notez que ce volume est actuellement vide : |
- | + | ||
- | Il convient maintenant de se connecter sur le << | + | |
- | + | ||
- | En saisissant cette commande, vous obtiendrez une fenêtre similaire à celle-ci | + | |
< | < | ||
- | [trainee@centos7 ~]$ ssh -l trainee 127.0.0.1 | + | [root@centos8 |
- | trainee@127.0.0.1' | + | |
- | Last login: Mon May 9 23:42:46 2016 from localhost.localdomain | + | |
- | [trainee@centos7 ~]$ ls -la | grep .ssh | + | |
- | drwx------. | + | |
- | [trainee@centos7 ~]$ exit | + | |
- | logout | + | |
- | Connection to 127.0.0.1 closed. | + | |
- | </ | + | |
- | + | ||
- | <WRAP center round important> | + | |
- | Si le dossier distant .ssh n' | + | |
- | </ | + | |
- | + | ||
- | Ensuite, il convient de transférer le fichier local **.ssh/ | + | |
- | + | ||
- | < | + | |
- | [trainee@centos7 ~]$ scp .ssh/ | + | |
- | trainee@127.0.0.1' | + | |
- | id_ecdsa.pub | + | |
- | </ | + | |
- | + | ||
- | Connectez-vous via telnet et insérer les clefs publiques restantes dans le fichier .ssh/ | + | |
- | + | ||
- | < | + | |
- | root@centos7 ~]# ssh -l trainee localhost | + | |
- | trainee@localhost' | + | |
- | Last login: Tue May 10 01:39:33 2016 from localhost.localdomain | + | |
- | [trainee@centos7 ~]$ cat .ssh/ | + | |
- | [trainee@centos7 ~]$ cat .ssh/ | + | |
- | [trainee@centos7 ~]$ cat .ssh/ | + | |
- | [trainee@centos7 ~]$ cat .ssh/ | + | |
- | ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBG5BtOMFLrUbxD// | + | |
- | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9KOuEH5+kyihhm99Na8UTA4Gi5AfiOVeJyS3UzH7ta73ewmv7JZqaXzar1NlHcpEMkCUs2yKxHyO/ | + | |
- | ssh-dss AAAAB3NzaC1kc3MAAACBAK9/ | + | |
- | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIENas3A3hmXFj1cb+lrn2NAt6g95Pla6qUFQHd1wg2y1 trainee@centos7.fenestros.loc | + | |
- | ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBG5BtOMFLrUbxD// | + | |
- | </ | + | |
- | + | ||
- | Lors de la connexion suivante au serveur, l' | + | |
- | + | ||
- | < | + | |
- | [trainee@centos7 ~]$ ssh -l trainee localhost | + | |
- | Last login: Tue May 10 01:50:39 2016 from localhost.localdomain | + | |
- | [trainee@centos7 ~]$ exit | + | |
- | déconnexion | + | |
- | Connection to localhost closed. | + | |
- | </ | + | |
- | + | ||
- | <WRAP center round important> | + | |
- | Le fichier **authorized_keys** doit avoir les permissions de 600. | + | |
- | </ | + | |
- | + | ||
- | =====La Configuration par firewalld sous RHEL/CentOS 7===== | + | |
- | + | ||
- | <WRAP center round important> | + | |
- | **Important** : Importez une machine virtuelle vierge de CentOS 7. | + | |
- | </ | + | |
- | + | ||
- | firewalld est à Netfilter ce que NetworkManager est au réseau. firewalld utilise des **zones** - des jeux de règles pré-définis dans lesquels sont placés les interfaces : | + | |
- | + | ||
- | * **trusted** - un réseau fiable. Dans ce cas tous les ports sont autorisés, | + | |
- | * **work**, **home**, **internal** - un réseau partiellement fiable. Dans ce cas quelques ports sont autorisés, | + | |
- | * **dmz**, **public**, **external** - un réseau non fiable. Dans ce cas peu de ports sont autorisés, | + | |
- | * **block**, **drop** - tout est interdit. La zone drop n' | + | |
- | + | ||
- | <WRAP center round important> | + | |
- | Une interface ne peut être que dans une zone à la fois tandis que plusieurs interfaces peuvent être dans la même zone. | + | |
- | </ | + | |
- | + | ||
- | Le service firewalld doit toujours être lancé : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# systemctl status firewalld.service | + | |
- | firewalld.service - firewalld - dynamic firewall daemon | + | |
- | | + | |
- | | + | |
- | Main PID: 493 (firewalld) | + | |
- | | + | |
- | | + | |
- | + | ||
- | Jul 07 15:53:56 centos7.fenestros.loc systemd[1]: Started firewalld - dynamic firewall daemon. | + | |
- | </ | + | |
- | + | ||
- | ==La Configuration de Base de firewalld== | + | |
- | + | ||
- | La configuration par défaut de firewalld se trouve dans **/ | + | |
- | + | ||
- | < | + | |
- | [root@centos7 | + | |
- | total 12 | + | |
- | drwxr-x---. 2 root root 4096 Jun 4 09:52 icmptypes | + | |
- | drwxr-x---. 2 root root 4096 Jun 4 09:52 services | + | |
- | drwxr-x---. 2 root root 4096 Jun 4 09:52 zones | + | |
- | [root@centos7 ~]# ls -l / | + | |
- | total 36 | + | |
- | -rw-r-----. 1 root root 299 Mar 6 00:35 block.xml | + | |
- | -rw-r-----. 1 root root 293 Mar 6 00:35 dmz.xml | + | |
- | -rw-r-----. 1 root root 291 Mar 6 00:35 drop.xml | + | |
- | -rw-r-----. 1 root root 304 Mar 6 00:35 external.xml | + | |
- | -rw-r-----. 1 root root 400 Mar 6 00:35 home.xml | + | |
- | -rw-r-----. 1 root root 415 Mar 6 00:35 internal.xml | + | |
- | -rw-r-----. 1 root root 315 Mar 6 00:35 public.xml | + | |
- | -rw-r-----. 1 root root 162 Mar 6 00:35 trusted.xml | + | |
- | -rw-r-----. 1 root root 342 Mar 6 00:35 work.xml | + | |
- | [root@centos7 ~]# ls -l / | + | |
- | total 192 | + | |
- | -rw-r-----. 1 root root 412 Mar 6 00:35 amanda-client.xml | + | |
- | -rw-r-----. 1 root root 320 Mar 6 00:35 bacula-client.xml | + | |
- | -rw-r-----. 1 root root 346 Mar 6 00:35 bacula.xml | + | |
- | -rw-r-----. 1 root root 305 Mar 6 00:35 dhcpv6-client.xml | + | |
- | -rw-r-----. 1 root root 234 Mar 6 00:35 dhcpv6.xml | + | |
- | -rw-r-----. 1 root root 227 Mar 6 00:35 dhcp.xml | + | |
- | -rw-r-----. 1 root root 346 Mar 6 00:35 dns.xml | + | |
- | -rw-r-----. 1 root root 374 Mar 6 00:35 ftp.xml | + | |
- | -rw-r-----. 1 root root 476 Mar 6 00:35 high-availability.xml | + | |
- | -rw-r-----. 1 root root 448 Mar 6 00:35 https.xml | + | |
- | -rw-r-----. 1 root root 353 Mar 6 00:35 http.xml | + | |
- | -rw-r-----. 1 root root 372 Mar 6 00:35 imaps.xml | + | |
- | -rw-r-----. 1 root root 454 Mar 6 00:35 ipp-client.xml | + | |
- | -rw-r-----. 1 root root 427 Mar 6 00:35 ipp.xml | + | |
- | -rw-r-----. 1 root root 517 Mar 6 00:35 ipsec.xml | + | |
- | -rw-r-----. 1 root root 233 Mar 6 00:35 kerberos.xml | + | |
- | -rw-r-----. 1 root root 221 Mar 6 00:35 kpasswd.xml | + | |
- | -rw-r-----. 1 root root 232 Mar 6 00:35 ldaps.xml | + | |
- | -rw-r-----. 1 root root 199 Mar 6 00:35 ldap.xml | + | |
- | -rw-r-----. 1 root root 385 Mar 6 00:35 libvirt-tls.xml | + | |
- | -rw-r-----. 1 root root 389 Mar 6 00:35 libvirt.xml | + | |
- | -rw-r-----. 1 root root 424 Mar 6 00:35 mdns.xml | + | |
- | -rw-r-----. 1 root root 211 Mar 6 00:35 mountd.xml | + | |
- | -rw-r-----. 1 root root 190 Mar 6 00:35 ms-wbt.xml | + | |
- | -rw-r-----. 1 root root 171 Mar 6 00:35 mysql.xml | + | |
- | -rw-r-----. 1 root root 324 Mar 6 00:35 nfs.xml | + | |
- | -rw-r-----. 1 root root 389 Mar 6 00:35 ntp.xml | + | |
- | -rw-r-----. 1 root root 335 Mar 6 00:35 openvpn.xml | + | |
- | -rw-r-----. 1 root root 433 Mar 6 00:35 pmcd.xml | + | |
- | -rw-r-----. 1 root root 474 Mar 6 00:35 pmproxy.xml | + | |
- | -rw-r-----. 1 root root 544 Mar 6 00:35 pmwebapis.xml | + | |
- | -rw-r-----. 1 root root 460 Mar 6 00:35 pmwebapi.xml | + | |
- | -rw-r-----. 1 root root 357 Mar 6 00:35 pop3s.xml | + | |
- | -rw-r-----. 1 root root 181 Mar 6 00:35 postgresql.xml | + | |
- | -rw-r-----. 1 root root 261 Mar 6 00:35 proxy-dhcp.xml | + | |
- | -rw-r-----. 1 root root 446 Mar 6 00:35 radius.xml | + | |
- | -rw-r-----. 1 root root 517 Mar 6 00:35 RH-Satellite-6.xml | + | |
- | -rw-r-----. 1 root root 214 Mar 6 00:35 rpc-bind.xml | + | |
- | -rw-r-----. 1 root root 384 Mar 6 00:35 samba-client.xml | + | |
- | -rw-r-----. 1 root root 461 Mar 6 00:35 samba.xml | + | |
- | -rw-r-----. 1 root root 550 Mar 6 00:35 smtp.xml | + | |
- | -rw-r-----. 1 root root 463 Mar 6 00:35 ssh.xml | + | |
- | -rw-r-----. 1 root root 393 Mar 6 00:35 telnet.xml | + | |
- | -rw-r-----. 1 root root 301 Mar 6 00:35 tftp-client.xml | + | |
- | -rw-r-----. 1 root root 437 Mar 6 00:35 tftp.xml | + | |
- | -rw-r-----. 1 root root 211 Mar 6 00:35 transmission-client.xml | + | |
- | -rw-r-----. 1 root root 475 Mar 6 00:35 vnc-server.xml | + | |
- | -rw-r-----. 1 root root 310 Mar 6 00:35 wbem-https.xml | + | |
- | [root@centos7 ~]# ls -l / | + | |
- | total 36 | + | |
- | -rw-r-----. 1 root root 222 Mar 6 00:35 destination-unreachable.xml | + | |
- | -rw-r-----. 1 root root 173 Mar 6 00:35 echo-reply.xml | + | |
- | -rw-r-----. 1 root root 210 Mar 6 00:35 echo-request.xml | + | |
- | -rw-r-----. 1 root root 225 Mar 6 00:35 parameter-problem.xml | + | |
- | -rw-r-----. 1 root root 185 Mar 6 00:35 redirect.xml | + | |
- | -rw-r-----. 1 root root 227 Mar 6 00:35 router-advertisement.xml | + | |
- | -rw-r-----. 1 root root 223 Mar 6 00:35 router-solicitation.xml | + | |
- | -rw-r-----. 1 root root 248 Mar 6 00:35 source-quench.xml | + | |
- | -rw-r-----. 1 root root 253 Mar 6 00:35 time-exceeded.xml | + | |
- | </ | + | |
- | + | ||
- | Ces fichiers sont au format **xml**, par exemple : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# cat / | + | |
- | <?xml version=" | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | <service name=" | + | |
- | <service name=" | + | |
- | <service name=" | + | |
- | <service name=" | + | |
- | <service name=" | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | La configuration de firewalld ainsi que les définitions et règles personnalisées se trouvent dans **/ | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# ls -l / | + | |
- | total 8 | + | |
- | -rw-r-----. 1 root root 1026 Mar 6 00:35 firewalld.conf | + | |
- | drwxr-x---. 2 root root 6 Mar 6 00:35 icmptypes | + | |
- | -rw-r-----. 1 root root 271 Mar 6 00:35 lockdown-whitelist.xml | + | |
- | drwxr-x---. 2 root root 6 Mar 6 00:35 services | + | |
- | drwxr-x---. 2 root root 23 Mar 6 00:35 zones | + | |
- | [root@centos7 ~]# ls -l / | + | |
- | total 4 | + | |
- | -rw-r--r--. 1 root root 315 Mar 8 14:05 public.xml | + | |
- | [root@centos7 ~]# ls -l / | + | |
- | total 0 | + | |
- | [root@centos7 ~]# ls -l / | + | |
total 0 | total 0 | ||
</ | </ | ||
- | Le fichier de configuration de firewalld est **/ | + | Utilisez la commande |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | # firewalld config file | + | Name |
- | + | --------------------------- | |
- | # default zone | + | |
- | # The default zone used if an empty zone string is used. | + | |
- | # Default: public | + | |
- | DefaultZone=public | + | |
- | + | ||
- | # Minimal mark | + | |
- | # Marks up to this minimum are free for use for example in the direct | + | |
- | # interface. If more free marks are needed, increase the minimum | + | |
- | # Default: 100 | + | |
- | MinimalMark=100 | + | |
- | + | ||
- | # Clean up on exit | + | |
- | # If set to no or false the firewall configuration will not get cleaned up | + | |
- | # on exit or stop of firewalld | + | |
- | # Default: yes | + | |
- | CleanupOnExit=yes | + | |
- | + | ||
- | # Lockdown | + | |
- | # If set to enabled, firewall changes with the D-Bus interface will be limited | + | |
- | # to applications that are listed in the lockdown whitelist. | + | |
- | # The lockdown whitelist file is lockdown-whitelist.xml | + | |
- | # Default: no | + | |
- | Lockdown=no | + | |
- | + | ||
- | # IPv6_rpfilter | + | |
- | # Performs a reverse path filter test on a packet for IPv6. If a reply to the | + | |
- | # packet would be sent via the same interface that the packet arrived on, the | + | |
- | # packet will match and be accepted, otherwise dropped. | + | |
- | # The rp_filter for IPv4 is controlled using sysctl. | + | |
- | # Default: yes | + | |
- | IPv6_rpfilter=yes | + | |
</ | </ | ||
- | ===La Commande firewall-cmd=== | + | Définissez le pool de stockage **kvm-storagepool** dans KVM grâce à la commande **virsh pool-define-as** : |
- | + | ||
- | firewalld s' | + | |
- | + | ||
- | <WRAP center round important> | + | |
- | firewall-cmd est le front-end de firewalld en ligne de commande. Il existe aussi la commande **firewall-config** qui lance un outi de configuration graphique. | + | |
- | </ | + | |
- | + | ||
- | Pour obtenir la liste de toutes les zones prédéfinies, | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | block dmz drop external home internal public trusted work | + | Pool kvm-storagepool defined |
- | </ | + | |
- | + | ||
- | Pour obtenir la liste de toutes les services prédéfinis, | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --get-services | + | |
- | RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps ipp ipp-client ipsec kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind samba samba-client smtp ssh telnet tftp tftp-client transmission-client vnc-server wbem-https | + | |
- | </ | + | |
- | + | ||
- | Pour obtenir la liste de toutes les types ICMP prédéfinis, | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --get-icmptypes | + | |
- | destination-unreachable echo-reply echo-request parameter-problem redirect router-advertisement router-solicitation source-quench time-exceeded | + | |
- | </ | + | |
- | + | ||
- | Pour obtenir la liste des zones de la configuration courante, utilisez la commande suivante : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --get-active-zones | + | |
- | public | + | |
- | interfaces: enp0s3 | + | |
- | </ | + | |
- | + | ||
- | Pour obtenir la liste des zones de la configuration courante pour une interface spécifique, | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --get-zone-of-interface=enp0s3 | + | |
- | public | + | |
- | </ | + | |
- | + | ||
- | Pour obtenir la liste des services autorisés pour la zone public, utilisez la commande suivante : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --zone=public --list-services | + | |
- | dhcpv6-client ssh | + | |
- | </code> | + | |
- | + | ||
- | Pour obtenir toute la configuration pour la zone public, utilisez la commande suivante : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --zone=public --list-all | + | |
- | public (default, active) | + | |
- | interfaces: enp0s3 | + | |
- | sources: | + | |
- | services: dhcpv6-client ssh | + | |
- | ports: | + | |
- | masquerade: no | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | + | ||
- | + | ||
- | </ | + | |
- | + | ||
- | Pour obtenir la liste complète de toutes les zones et leurs configurations, | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --list-all-zones | + | |
- | block | + | |
- | interfaces: | + | |
- | sources: | + | |
- | services: | + | |
- | ports: | + | |
- | masquerade: no | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | + | ||
- | dmz | + | |
- | interfaces: | + | |
- | sources: | + | |
- | services: ssh | + | |
- | ports: | + | |
- | masquerade: no | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | + | ||
- | drop | + | |
- | interfaces: | + | |
- | sources: | + | |
- | services: | + | |
- | ports: | + | |
- | masquerade: no | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | + | ||
- | external | + | |
- | interfaces: | + | |
- | sources: | + | |
- | services: ssh | + | |
- | ports: | + | |
- | masquerade: yes | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | + | ||
- | home | + | |
- | interfaces: | + | |
- | sources: | + | |
- | services: dhcpv6-client ipp-client mdns samba-client ssh | + | |
- | ports: | + | |
- | masquerade: no | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | + | ||
- | internal | + | |
- | interfaces: | + | |
- | sources: | + | |
- | services: dhcpv6-client ipp-client mdns samba-client ssh | + | |
- | ports: | + | |
- | masquerade: no | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | + | ||
- | public (default, active) | + | |
- | interfaces: enp0s3 | + | |
- | sources: | + | |
- | services: dhcpv6-client ssh | + | |
- | ports: | + | |
- | masquerade: no | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | + | ||
- | trusted | + | |
- | interfaces: | + | |
- | sources: | + | |
- | services: | + | |
- | ports: | + | |
- | masquerade: no | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | + | ||
- | work | + | |
- | interfaces: | + | |
- | sources: | + | |
- | services: dhcpv6-client ipp-client ssh | + | |
- | ports: | + | |
- | masquerade: no | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | </ | + | |
- | + | ||
- | Pour changer la zone par défaut de public à work, utilisez la commande suivante : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --set-default-zone=work | + | |
- | success | + | |
- | [root@centos7 ~]# firewall-cmd --get-active-zones | + | |
- | work | + | |
- | interfaces: enp0s3 | + | |
- | </ | + | |
- | + | ||
- | Pour ajouter l' | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --add-interface=ip_fixe | + | |
- | success | + | |
- | [root@centos7 ~]# firewall-cmd --get-active-zones | + | |
- | work | + | |
- | interfaces: enp0s3 ip_fixe | + | |
- | </ | + | |
- | + | ||
- | Pour supprimer l' | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --remove-interface=ip_fixe | + | |
- | success | + | |
- | [root@centos7 ~]# firewall-cmd --get-active-zones | + | |
- | work | + | |
- | interfaces: enp0s3 | + | |
- | </ | + | |
- | + | ||
- | Pour ajouter le service **http** à la zone **work**, utilisez la commande suivante : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --add-service=http | + | |
- | success | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --list-services | + | |
- | dhcpv6-client http ipp-client ssh | + | |
- | </ | + | |
- | + | ||
- | Pour supprimer le service **http** de la zone **work**, utilisez la commande suivante : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --remove-service=http | + | |
- | success | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --list-services | + | |
- | dhcpv6-client ipp-client ssh | + | |
- | </ | + | |
- | + | ||
- | Pour ajouter un nouveau bloc ICMP, utilisez la commande suivante : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --add-icmp-block=echo-reply | + | |
- | success | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --list-icmp-blocks | + | |
- | echo-reply | + | |
- | </ | + | |
- | + | ||
- | Pour supprimer un bloc ICMP, utilisez la commande suivante : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --remove-icmp-block=echo-reply | + | |
- | success | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --list-icmp-blocks | + | |
- | [root@centos7 ~]# | + | |
- | </ | + | |
- | + | ||
- | Pour ajouter le port 591/tcp à la zone work, utilisez la commande suivante : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --add-port=591/ | + | |
- | success | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --list-ports | + | |
- | 591/tcp | + | |
- | </ | + | |
- | + | ||
- | Pour supprimer le port 591/tcp à la zone work, utilisez la commande suivante : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --remove-port=591/ | + | |
- | success | + | |
- | [root@centos7 ~]# firewall-cmd --zone=work --list-ports | + | |
- | [root@centos7 ~]# | + | |
- | </ | + | |
- | + | ||
- | Pour créer un nouveau service, il convient de : | + | |
- | + | ||
- | * copier un fichier existant se trouvant dans le répertoire **/usr/lib/firewalld/ | + | |
- | * modifier le fichier, | + | |
- | * recharger la configuration de firewalld, | + | |
- | * vérifier que firewalld voit le nouveau service. | + | |
- | + | ||
- | Par exemple : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# cp / | + | |
- | [root@centos7 ~]# | + | |
- | [root@centos7 ~]# cat / | + | |
- | <?xml version=" | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | <port protocol=" | + | |
- | </ | + | |
- | [root@centos7 ~]# | + | |
- | [root@centos7 ~]# firewall-cmd --reload | + | |
- | success | + | |
- | [root@centos7 ~]# | + | |
- | [root@centos7 ~]# firewall-cmd --get-services | + | |
- | RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns filemaker ftp high-availability http https imaps ipp ipp-client ipsec kerberos kpasswd ldap ldaps libvirt | + | |
- | </ | + | |
- | + | ||
- | ==La Configuration Avancée de firewalld== | + | |
- | + | ||
- | La configuration de base de firewalld ne permet que la configuration des zones, services, blocs ICMP et les ports non-standard. Cependant firewalld peut également être configuré avec des **Rich Rules** ou **//Règles Riches//**. Rich Rules ou Règles Riches évaluent des **critères** pour ensuite entreprendre une **action**. | + | |
- | + | ||
- | Les **Critères** sont : | + | |
- | + | ||
- | * **source address="< | + | |
- | * **destination address="< | + | |
- | * **rule port port="< | + | |
- | * **service name=< | + | |
- | + | ||
- | Les **Actions** sont : | + | |
- | + | ||
- | * **accept**, | + | |
- | * **reject**, | + | |
- | * une Action reject peut être associée avec un message d' | + | |
- | * **drop**. | + | |
- | + | ||
- | Saisissez la commande suivante pour ouvrir le port 80 : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# firewall-cmd --add-rich-rule=' | + | |
- | success | + | |
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
- | Notez que la Rich Rule doit être entourée de caractères | + | **Important** : Consultez **[[https:// |
</ | </ | ||
- | Saisissez la commande suivante | + | Consultez **[[https:// |
- | < | + | Démarrez maintenant le pool **kvm-storagepool** |
- | [root@centos7 ~]# iptables | + | |
- | ACCEPT | + | |
- | </ | + | |
- | + | ||
- | Saisissez la commande suivante pour visualiser la règle iptables pour IPv6 : | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | ACCEPT | + | Pool kvm-storagepool started |
- | ACCEPT | + | |
</ | </ | ||
- | <WRAP center round important 50%> | + | Contrôlez |
- | Notez que la Rich Rule a créé deux règles, une pour IPv4 et une deuxième pour IPv6. Une règle peut être créée pour IPv4 seul en incluant le Critère **family=ipv4**. De la même façon, une règle peut être créée pour IPv6 seul en incluant le Critère **family=ipv6**. | + | |
- | </ | + | |
- | + | ||
- | Cette nouvelle règle est écrite en mémoire mais non pas sur disque. Pour l'écrire sur disque dans le fichier zone se trouvant dans **/ | + | |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | success | + | |
- | [root@centos7 ~]# | + | --------------------------------------- |
- | [root@centos7 ~]# cat / | + | kvm-storagepool |
- | <?xml version=" | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | <service name=" | + | |
- | <service name=" | + | |
- | < | + | |
- | < | + | |
- | <port protocol=" | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
- | Attention ! La règle ajoutée avec l' | + | **Important** : Notez que le pool ne sera pas démarré automatiquement parce que la valeur d**'autostart** est **no**. |
</ | </ | ||
- | Pour visualiser cette règle dans la configuration de firewalld, il convient de saisir | + | Fixez la valeur d' |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | ... | + | Pool kvm-storagepool marked as autostarted |
- | work (default, active) | + | |
- | interfaces: enp0s3 | + | |
- | sources: | + | |
- | services: dhcpv6-client ipp-client ssh | + | |
- | ports: | + | |
- | masquerade: no | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | rule port port=" | + | |
+ | [root@centos8 ~]# virsh pool-list | ||
+ | | ||
+ | --------------------------------------- | ||
+ | | ||
</ | </ | ||
- | Notez que la Rich Rule est créée dans la Zone par Défaut. Il est possible de créer une Rich Rule dans une autre zone en utilisant l' | + | Dernièrement, |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | success | + | Name State |
- | [root@centos7 ~]# firewall-cmd --list-all-zones | + | ------------------------------------------------------------------------------------------ |
- | ... | + | kvm-storagepool |
- | public | + | |
- | interfaces: | + | |
- | sources: | + | |
- | services: dhcpv6-client ssh | + | |
- | ports: | + | |
- | masquerade: no | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | rule port port=" | + | |
- | trusted | + | |
- | interfaces: | + | |
- | sources: | + | |
- | services: | + | |
- | ports: | + | |
- | masquerade: no | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | + | ||
- | work (default, active) | + | |
- | interfaces: enp0s3 | + | |
- | sources: | + | |
- | services: dhcpv6-client ipp-client ssh | + | |
- | ports: | + | |
- | masquerade: no | + | |
- | forward-ports: | + | |
- | icmp-blocks: | + | |
- | rich rules: | + | |
- | rule port port=" | + | |
</ | </ | ||
- | |||
- | |||
- | Pour supprimer une Rich Rule, il faut copier la ligne entière la concernant qui se trouve dans la sortie de la commande **firewall-cmd --list-all-zones** : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | success | + | Filesystem |
+ | / | ||
</ | </ | ||
- | |||
- | ==Le mode Panic de firewalld== | ||
- | |||
- | Le mode Panic de firewalld permet de bloquer tout le trafic avec une seule commande. Pour connaître l' | ||
- | |||
- | < | ||
- | [root@centos7 ~]# firewall-cmd --query-panic | ||
- | no | ||
- | </ | ||
- | |||
- | Pour activer le mode Panic, il convient de saisir la commande suivante : | ||
- | |||
- | < | ||
- | [root@centos7 ~]# firewall-cmd --panic-on | ||
- | success | ||
- | [root@centos7 ~]# firewall-cmd --query-panic | ||
- | yes | ||
- | </ | ||
- | |||
- | Pour désactiver le mode Panic, il convient de saisir la commande suivante : | ||
- | |||
- | < | ||
- | [root@centos7 ~]# firewall-cmd --panic-off | ||
- | success | ||
- | [root@centos7 ~]# firewall-cmd --query-panic | ||
- | no | ||
- | </ | ||
- | |||
- | ======LCF307 - Gestion du Serveur NFS====== | ||
- | |||
- | =====Contenu du Module===== | ||
- | |||
- | * **LCF307 - Gestion du Serveur NFS** | ||
- | * Contenu du Module | ||
- | * Présentation | ||
- | * Les Services et Processus du Serveur NFSv3 | ||
- | * Les Services RPC | ||
- | * Options d'un Partage NFS | ||
- | * Commandes de Base | ||
- | * Installation | ||
- | * Mise en Place | ||
- | * Configuration du Serveur | ||
- | * Configuration du Client | ||
- | * Surveillance du Serveur | ||
- | * La Commande rpcinfo | ||
- | * La Commande nfsstat | ||
- | |||
- | =====Présentation===== | ||
- | |||
- | Quand on parle de NFS, on parle d' | ||
- | |||
- | Le Network File System (NFS) est le protocole de partage de fichiers historique sur des systèmes Unix. Lors de l' | ||
- | |||
- | * le partage ainsi que ses caractéristiques sont configurés par rapport à l' | ||
- | * aucun mot de passe n'est demandé lors de la connexion d'un utilisateur à une ressource car le serveur NFS présume que l' | ||
- | |||
- | Cependant l' | ||
- | |||
- | Il existe actuellement 3 versions de NFS : | ||
- | |||
- | ^ Version ^ Protocole Utilisé ^ Dépendance ^ | ||
- | | **NFSv2** | TCP et UDP | portmap | | ||
- | | **NFSv3** | TCP et UDP | portmap | | ||
- | | **NFSv4** | TCP | Aucune - les fonctions de portmap sont incluses dans NFSv4 | | ||
- | |||
- | La version utilisée par défaut sous CentOS/ | ||
- | |||
- | ====Les Services et Processus du Serveur NFSv3==== | ||
- | |||
- | La version NFSv3 utilise les services suivants : | ||
- | |||
- | ^ Services ^ Fonction ^ | ||
- | | **nfs** | Démarre le service NFS ainsi que les processus RPC pour recevoir et traiter les demandes des clients | | ||
- | | **nfslock** | Démarre les processus RPC qui permettent aux clients de verrouiller les fichiers sur le serveur | ||
- | | **portmap** | Gestion des réservations des ports pour les services RPC locaux afin que les services RPC distants puissent se connecter | | ||
- | |||
- | ===Les Services RPC=== | ||
- | |||
- | Les services RPC ( //Remote Procedure Calls// ou appel de procédures distantes ) ont été inventé par SUN Microsystem pour faciliter le travail des développeurs | ||
- | |||
- | Lorsque le client veut faire une requête à un service RPC, il contacte en premier lieu le service **rpcbind** qui assigne un numéro de port au délà du numéro **32768** à un numéro de programme RPC. | ||
- | |||
- | |||
- | ====Options d'un Partage NFS==== | ||
- | |||
- | Certaines options, appliquées à un partage, modifient le comportement du serveur NFS pour le partage concerné lors de son démarrage : | ||
- | |||
- | ^ Option ^ Comportement ^ | ||
- | | **ro** | Accès en lecture seule | | ||
- | | **rw** | Accès en lecture / écriture | | ||
- | | **sync** | Ecriture synchrone ( écriture immédiate sur disque ) | | ||
- | | **async** | Ecriture asynchrone ( écriture sur disque en utilisant une cache ) | | ||
- | | **root_squash** | Root perd ses prérogatives sur le partage concerné | | ||
- | | **no_root_squash** | Root garde ses prérogatives sur le partage concerné | | ||
- | | **no_lock** | Pas de verrous sur les fichiers accédés | | ||
- | | **all_squash** | Force la mapping de tous les utilisateurs vers l' | ||
- | | **anonuid** | Fixe l'UID de l' | ||
- | | **anongid** | Fixe le GID de l' | ||
- | |||
- | <WRAP center round important> | ||
- | **Important** : Si plusieurs options sont spécifiées, | ||
- | </ | ||
- | |||
- | ====Commandes de Base==== | ||
- | |||
- | Plusieurs commandes permettent de gérer et de s' | ||
- | |||
- | ^ Commande ^ Comportement ^ | ||
- | | **exportfs** | Affiche les partages actifs sur le serveur courant | | ||
- | | **nfsstat** | Affiche les statistiques de l' | ||
- | | **rpcinfo** | Affiche les démons gérés en effectuant une requête RPC sur le serveur courant | | ||
- | | **showmount** | Affiche les partages actifs sur un serveur distant | | ||
- | | **mount** | Permet de monter un partage distant sur un répertoire local | | ||
- | |||
- | =====Mise en Place===== | ||
- | |||
- | ====Configuration du Serveur==== | ||
- | |||
- | <WRAP center round important> | ||
- | **Important** : Arrêtez votre VM. Dans la fenêtre de Oracle VM VirtualBox, cliquez sur **Fichier > Paramètres > Réseau** et créez un réseau NAT appelé **NatNetwork**. Dans les paramètres de votre VM, cliquez sur **Réseau** et configurez la Carte 1 en Réseau NAT dans le réseau NatNetwork. Démarrez votre VM. | ||
- | </ | ||
- | |||
- | Configurez votre interface réseau si ce n'est pas déjà fait : | ||
- | |||
- | < | ||
- | [root@centos7 ~]# nmcli connection add con-name ip_fixe ifname enp0s3 type ethernet ip4 10.0.2.16/ | ||
- | Connection ' | ||
- | [root@centos7 ~]# nmcli connection mod ip_fixe ipv4.dns 8.8.8.8 | ||
- | [root@centos7 ~]# nmcli connection up ip_fixe | ||
- | Connection successfully activated (D-Bus active path: / | ||
- | [root@centos7 ~]# systemctl restart NetworkManager.service | ||
- | </ | ||
- | |||
- | Ajoutez une autre adresse IP pour le NFS : | ||
- | |||
- | < | ||
- | [root@centos7 ~]# nmcli connection mod ip_fixe +ipv4.addresses 192.168.1.2/ | ||
- | </ | ||
- | |||
- | Continuez maintenant par la mise en place du service **nfs** : | ||
- | |||
- | < | ||
- | [root@centos7 ~]# systemctl status nfs.service | ||
- | nfs-server.service - NFS server and services | ||
- | | ||
- | | ||
- | |||
- | [root@centos7 ~]# systemctl enable nfs-server.service | ||
- | ln -s '/ | ||
- | [root@centos7 ~]# systemctl status nfs.service | ||
- | nfs-server.service - NFS server and services | ||
- | | ||
- | | ||
- | </ | ||
- | |||
- | La mise en place d'un partage ponctuel se fait en utilisant la commande **exportfs** en indiquant en argument le répertoire sous la forme de // | ||
- | |||
- | < | ||
- | [root@centos7 ~]# exportfs | ||
- | [root@centos7 ~]# exportfs 192.168.1.2:/ | ||
- | [root@centos7 ~]# exportfs | ||
- | / | ||
- | </ | ||
- | |||
- | Démarrez maintenant le service **nfs** : | ||
- | |||
- | < | ||
- | [root@centos7 ~]# systemctl start nfs.service | ||
- | [root@centos7 ~]# systemctl status nfs.service | ||
- | nfs-server.service - NFS server and services | ||
- | | ||
- | | ||
- | Process: 9552 ExecStart=/ | ||
- | Process: 9551 ExecStartPre=/ | ||
- | Main PID: 9552 (code=exited, | ||
- | | ||
- | |||
- | Oct 01 13:18:13 centos7.fenestros.loc systemd[1]: Starting NFS server and services... | ||
- | Oct 01 13:18:13 centos7.fenestros.loc systemd[1]: Started NFS server and services. | ||
- | </ | ||
- | |||
- | Afin de mettre en place un ou des partages **permanents**, | ||
- | |||
- | < | ||
- | / | ||
- | / | ||
- | </ | ||
- | |||
- | <WRAP center round important> | ||
- | **Important** : Dans ce cas, nous avons partagé le répertoire **/ | ||
- | </ | ||
- | |||
- | Redémarrez maintenant le service nfs afin que le fichier **/ | ||
- | |||
- | < | ||
- | [root@centos7 ~]# systemctl restart nfs.service | ||
- | [root@centos7 ~]# systemctl status nfs.service | ||
- | nfs-server.service - NFS server and services | ||
- | | ||
- | | ||
- | Process: 4642 ExecStopPost=/ | ||
- | Process: 4639 ExecStopPost=/ | ||
- | Process: 4638 ExecStop=/ | ||
- | Process: 4650 ExecStart=/ | ||
- | Process: 4649 ExecStartPre=/ | ||
- | Main PID: 4650 (code=exited, | ||
- | | ||
- | |||
- | Oct 01 14:24:50 centos7.fenestros.loc systemd[1]: Starting NFS server and services... | ||
- | Oct 01 14:24:50 centos7.fenestros.loc exportfs[4649]: | ||
- | Oct 01 14:24:50 centos7.fenestros.loc exportfs[4649]: | ||
- | Oct 01 14:24:50 centos7.fenestros.loc systemd[1]: Started NFS server and services. | ||
- | </ | ||
- | |||
- | Puisque aucune option ne soit spécifiée pour les montages, ceux-ci ont été exportés avec des option par défaut. En utilisant l' | ||
- | |||
- | < | ||
- | [root@centos7 ~]# exportfs -v | ||
- | / | ||
- | /tmp < | ||
- | </ | ||
- | |||
- | ====Configuration du Client==== | ||
- | |||
- | <WRAP center round important> | ||
- | **Important** : Arrêtez votre VM. Créez une clône de votre VM. Démarrez la VM clonée. | ||
- | </ | ||
- | |||
- | Re-configurez ensuite l' | ||
- | |||
- | < | ||
- | [root@centos7 ~]# nmcli connection del ip_fixe | ||
- | |||
- | [root@centos7 ~]# nmcli connection show ip_fixe | ||
- | Error: ip_fixe - no such connection profile. | ||
- | |||
- | [root@centos7 ~]# nmcli connection add con-name ip_fixe ifname enp0s3 type ethernet ip4 10.0.2.17/ | ||
- | Connection ' | ||
- | |||
- | [root@centos7 ~]# nmcli connection mod ip_fixe ipv4.dns 8.8.8.8 | ||
- | |||
- | [root@centos7 ~]# nmcli connection mod ip_fixe +ipv4.addresses 192.168.1.1/ | ||
- | |||
- | [root@centos7 ~]# nmcli connection up ip_fixe | ||
- | Connection successfully activated (D-Bus active path: / | ||
- | |||
- | [root@centos7 ~]# systemctl restart NetworkManager.service | ||
- | </ | ||
- | |||
- | <WRAP center round important > | ||
- | **Important** : Démarrez la VM d' | ||
- | </ | ||
- | |||
- | Dans la VM d' | ||
- | |||
- | < | ||
- | [root@centos7 ~]# getenforce | ||
- | Enforcing | ||
- | [root@centos7 ~]# setenforce permissive | ||
- | [root@centos7 ~]# systemctl status firewalld.service | ||
- | firewalld.service - firewalld - dynamic firewall daemon | ||
- | | ||
- | | ||
- | Main PID: 479 (firewalld) | ||
- | | ||
- | | ||
- | |||
- | Oct 01 14:54:57 centos7.fenestros.loc systemd[1]: Started firewalld - dynamic firewall daemon. | ||
- | [root@centos7 ~]# systemctl stop firewalld.service | ||
- | </ | ||
- | |||
- | A partir de votre client, consultez les répertoire exportés du serveur : | ||
- | |||
- | < | ||
- | [root@centos7 ~]# showmount --exports 192.168.1.2 | ||
- | Export list for 192.168.1.2: | ||
- | /tmp * | ||
- | / | ||
- | </ | ||
- | |||
- | Créez maintenant le répertoire **/nfs** dans le client et montez le partage **192.168.1.2:/ | ||
- | |||
- | < | ||
- | [root@centos7 ~]# mkdir /nfs | ||
- | [root@centos7 ~]# mount -t nfs 192.168.1.2:/ | ||
- | </ | ||
- | |||
- | Notez que quand vous essayer de rentrer dans le répertoire en tant que root, vous obtenez le message **-bash: cd: /nfs: Permission non accordée** : | ||
- | |||
- | < | ||
- | [root@centos7 ~]# cd /nfs | ||
- | -bash: cd: /nfs: Permission denied | ||
- | </ | ||
- | |||
- | <WRAP center round important> | ||
- | **Important** : Puisque le répertoire **/ | ||
- | </ | ||
- | |||
- | Retournez donc dans le serveur et modifiez le fichier **/ | ||
- | |||
- | < | ||
- | [root@centos7 ~]# cat / | ||
- | / | ||
- | /tmp * | ||
- | </ | ||
- | |||
- | Redémarrez le service nfs : | ||
- | |||
- | < | ||
- | [root@centos7 ~]# systemctl restart nfs.service | ||
- | </ | ||
- | |||
- | Vous noterez que maintenant vous êtes capable de vous positionner dans le répertoire **/nfs** du client en tant que **root** | ||
- | |||
- | < | ||
- | [root@centos7 ~]# cd /nfs | ||
- | [root@centos7 nfs]# | ||
- | </ | ||
- | |||
- | =====Surveillance du Serveur===== | ||
- | |||
- | ====La Commande rpcinfo==== | ||
- | |||
- | La commande **rpcinfo** permet de faire une requête RPC sur le serveur et de voir les démons gérés : | ||
- | |||
- | < | ||
- | [root@centos6 ~]# rpcinfo | ||
- | | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100024 | ||
- | 100024 | ||
- | 100024 | ||
- | 100024 | ||
- | 100011 | ||
- | 100011 | ||
- | 100011 | ||
- | 100011 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100003 | ||
- | 100003 | ||
- | 100003 | ||
- | 100227 | ||
- | 100227 | ||
- | 100003 | ||
- | 100003 | ||
- | 100003 | ||
- | 100227 | ||
- | 100227 | ||
- | 100003 | ||
- | 100003 | ||
- | 100003 | ||
- | 100227 | ||
- | 100227 | ||
- | 100003 | ||
- | 100003 | ||
- | 100003 | ||
- | 100227 | ||
- | 100227 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | </ | ||
- | |||
- | < | ||
- | [root@centos7 ~]# rpcinfo | ||
- | | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100000 | ||
- | 100024 | ||
- | 100024 | ||
- | 100024 | ||
- | 100024 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100005 | ||
- | 100003 | ||
- | 100003 | ||
- | 100227 | ||
- | 100003 | ||
- | 100003 | ||
- | 100227 | ||
- | 100003 | ||
- | 100003 | ||
- | 100227 | ||
- | 100003 | ||
- | 100003 | ||
- | 100227 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | 100021 | ||
- | </ | ||
- | |||
- | ====La Commande nfsstat==== | ||
- | |||
- | La Commande **nfsstat** permet de vérifier l' | ||
- | |||
- | < | ||
- | [root@centos6 ~]# nfsstat | ||
- | Server rpc stats: | ||
- | calls badcalls | ||
- | 50 | ||
- | |||
- | Server nfs v4: | ||
- | null | ||
- | 2 4% 48 | ||
- | |||
- | Server nfs v4 operations: | ||
- | op0-unused | ||
- | 0 0% 0 0% 0 0% 5 4% 0 0% 0 | ||
- | create | ||
- | 0 0% 0 0% 0 0% 45 41% 5 4% 0 | ||
- | lock | ||
- | 0 0% 0 0% 0 0% 3 2% 0 0% 0 | ||
- | open | ||
- | 0 0% 0 0% 0 0% 0 0% 46 42% 0 | ||
- | putrootfh | ||
- | 2 1% 0 0% 3 2% 0 0% 0 0% 0 | ||
- | renew restorefh | ||
- | 0 0% 0 0% 0 0% 0 0% 0 0% 0 | ||
- | setcltidconf verify | ||
- | 0 0% 0 0% 0 0% 0 0% 0 0% 0 | ||
- | exchange_id | ||
- | 0 0% 0 0% 0 0% 0 0% 0 0% 0 | ||
- | getdevlist | ||
- | 0 0% 0 0% 0 0% 0 0% 0 0% 0 | ||
- | set_ssv | ||
- | 0 0% 0 0% 0 0% 0 0% 0 | ||
- | </ | ||
- | |||
- | < | ||
- | [root@centos7 ~]# nfsstat | ||
- | Server rpc stats: | ||
- | calls badcalls | ||
- | 34 | ||
- | |||
- | Server nfs v4: | ||
- | null | ||
- | 1 2% 33 | ||
- | |||
- | Server nfs v4 operations: | ||
- | op0-unused | ||
- | 0 0% 0 0% 0 0% 5 7% 0 0% 0 | ||
- | create | ||
- | 0 0% 0 0% 0 0% 22 31% 4 5% 0 | ||
- | lock | ||
- | 0 0% 0 0% 0 0% 5 7% 0 0% 0 | ||
- | open | ||
- | 0 0% 0 0% 0 0% 0 0% 23 33% 0 | ||
- | putrootfh | ||
- | 1 1% 0 0% 0 0% 0 0% 0 0% 0 | ||
- | renew restorefh | ||
- | 5 7% 0 0% 0 0% 0 0% 0 0% 2 | ||
- | setcltidconf verify | ||
- | 2 2% 0 0% 0 0% 0 0% 0 0% 0 | ||
- | exchange_id | ||
- | 0 0% 0 0% 0 0% 0 0% 0 0% 0 | ||
- | getdevlist | ||
- | 0 0% 0 0% 0 0% 0 0% 0 0% 0 | ||
- | set_ssv | ||
- | 0 0% 0 0% 0 0% 0 0% 0 | ||
- | </ | ||
- | |||
----- | ----- | ||
- | < | + | Copyright © 2022 Hugh Norris. |
- | <div align=" | + | |
- | Copyright © 2021 Hugh Norris. | + | |
- | </ | + |