Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
elearning:workbooks:centos:8:avance:l103 [2021/06/02 15:34] – created adminelearning:workbooks:centos:8:avance:l103 [2022/03/09 18:44] (Version actuelle) admin
Ligne 1: Ligne 1:
 ~~PDF:LANDSCAPE~~ ~~PDF:LANDSCAPE~~
 +
 +Version : **2022.01**
  
 Dernière mise-à-jour : ~~LASTMOD~~ Dernière mise-à-jour : ~~LASTMOD~~
  
-======LCF303 - Gestion du Noyau et des Quotas======+======LCF603 - Gestion du Réseau======
  
 =====Contenu du Module===== =====Contenu du Module=====
  
-  * **LCF303 - Gestion du Noyau et des Quotas**+  * **LCF603 - Gestion du Réseau**
     * Contenu du Module     * Contenu du Module
-    * Rôle du noyau +    * Présentation 
-    * Compilation et installation du noyau et des modules +      * La Commande nmcli 
-      * Déplacer /home +    * LAB #1 - Configuration du Réseau 
-      * Créer un Nouveau Noyau +      * 1.1 - Connections et Profils 
-      * Préparer l'Arborescence Source du Noyau +      * 1.2 - Résolution des Noms  
-      * Paramétrage du noyau +      * 1.3 - Ajouter une Deuxième Adresse IP à un Profil 
-      * Compiler le Noyau +      * 1.4 - La Commande hostname 
-      * Installer le Nouveau Noyau +      * 1.5 - La Commande ip 
-    * Gestion des Quotas +      * 1.6 - Activer/Désactiver une Interface Manuellement 
-      * La Commande quotacheck +      * 1.7 - Routage Statique 
-      * La Commande edquota +        * La commande ip 
-      * La Commande quotaon +        * Activer/désactiver le routage sur le serveur 
-      * La Commande repquota +    * LAB #2 - Diagnostique du Réseau 
-      * La Commande quota +      * 2.1 - ping 
-      * La Commande warnquota+      * 2.2 - netstat -i 
 +      * 2.3 - traceroute 
 +    * LAB #3 - Connexions à Distance 
 +      * 3.1 - Telnet 
 +      * 3.2 - wget 
 +      * 3.3 - ftp 
 +      * 3.4 - SSH 
 +        * Présentation 
 +          * SSH-1 
 +          * SSH-2 
 +        * Authentification par mot de passe 
 +        * Authentification par clef asymétrique 
 +        * Configuration du Serveur 
 +        * Configuration du Client 
 +        * Tunnels SSH 
 +      * 3.5 - SCP 
 +        * Présentation 
 +        * Utilisation 
 +      * 3.6 - Mise en Place des Clefs Asymétriques
  
-=====Rôle du noyau=====+=====Présentation=====
  
-Le noyau ou //kernel// est la partie du système d'exploitation qui gère les entrées/sorties avec des périphériquesDans certains cas il est préférable de recompiler le noyau de Linux. La motivation de cette recompilation peut être :+RHEL/CentOS 8 utilise **Network Manager** pour gérer le réseauNetwork Manager est composé de deux éléments :
  
-  * la diminution de la taille du noyau+  * un service qui gère les connexions réseaux et rapporte leurs états
-  * la prise en charge de nouveau matériel, +  * des front-ends qui passent par un API de configuration du service.
-  * l'ajout de fonctionnalités, +
-  * l'optimisation du code, +
-  * la correction de bogues, +
-  * le besoin d'une fonctionnalité expérimentale.+
  
-Commencez par identifier le noyau utilisé par votre machine :+<WRAP center round important 60%> 
 +**Important** : Notez qu'avec cette version de NetworkManager, IPv6 est activée par défaut. 
 +</WRAP> 
 + 
 +Le service NetworkManager doit toujours être lancé :
  
 <code> <code>
-[root@centos7 ~]# uname -r +[root@centos8 ~]# systemctl status NetworkManager.service 
-3.10.0-327.13.1.el7.x86_64+● NetworkManager.service Network Manager 
 +   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor pr> 
 +   Active: active (running) since Thu 2021-07-22 05:05:29 EDT; 1 months 7 days ago 
 +     Docs: man:NetworkManager(8) 
 + Main PID: 1002 (NetworkManager) 
 +    Tasks: 3 (limit: 23535) 
 +   Memory: 6.8M 
 +   CGroup: /system.slice/NetworkManager.service 
 +           └─1002 /usr/sbin/NetworkManager --no-daemon 
 + 
 +Warning: Journal has been rotated since unit was startedLog output is incomplete or> 
 +lines 1-11/11 (END) 
 +[^q]
 </code> </code>
  
-Dans le cas d'une utilisation courante de Linux, il est cependant préférable de faire appel aux **modules**. Les modules se trouvent dans le répertoire **/lib/modules/<version-du-noyau>** :+===La Commande nmcli=== 
 + 
 +La commande **nmcli** (Network Manager Command Line Interface) est utilisée pour configurer NetworkManager. 
 + 
 +Les options et les sous-commandes peuvent être consultées en utilisant les commandes suivantes :
  
 <code> <code>
-[root@centos7 ~]# ls /lib/modules/`uname -r`/ +[root@centos8 ~]# nmcli help 
-build   modules.alias      modules.builtin      modules.dep.bin  modules.modesetting  modules.softdep      source   weak-updates +Usage: nmcli [OPTIONS] OBJECT { COMMAND | help } 
-extra   modules.alias.bin  modules.builtin.bin  modules.devname  modules.networking   modules.symbols      updates + 
-kernel  modules.block      modules.dep          modules.drm      modules.order        modules.symbols.bin  vdso+OPTIONS 
 +  -a, --ask                                ask for missing parameters 
 +  -c, --colors auto|yes|no                 whether to use colors in output 
 +  -e, --escape yes|no                      escape columns separators in values 
 +  -f, --fields <field,...>|all|common      specify fields to output 
 +  -g, --get-values <field,...>|all|common  shortcut for -m tabular -t -f 
 +  -h, --help                               print this help 
 +  -m, --mode tabular|multiline             output mode 
 +  -o, --overview                           overview mode 
 +  -p, --pretty                             pretty output 
 +  -s, --show-secrets                       allow displaying passwords 
 +  -t, --terse                              terse output 
 +  -v, --version                            show program version 
 +  -w, --wait <seconds>                     set timeout waiting for finishing operations 
 + 
 +OBJECT 
 +  g[eneral]       NetworkManager's general status and operations 
 +  n[etworking]    overall networking control 
 +  r[adio]         NetworkManager radio switches 
 +  c[onnection]    NetworkManager's connections 
 +  d[evice]        devices managed by NetworkManager 
 +  a[gent]         NetworkManager secret agent or polkit agent 
 +  m[onitor]       monitor NetworkManager changes
 </code> </code>
  
-Les commandes pour manipuler les modules sont :+=====LAB #1 - Configuration du Réseau=====
  
-  * insmod +====1.1 - Connections et Profils====
-  * rmmod +
-  * lsmod +
-  * modprobe+
  
-Par exemple :+NetworkManager inclus la notion de **connections** ou **profils** permettant des configurations différentes en fonction de la localisation. Pour voir les connections actuelles, utilisez la commande **nmcli c** avec la sous-commande **show** :
  
 <code> <code>
-[root@centos7 ~]# lsmod +[root@centos8 ~]# nmcli c show 
-Module                  Size  Used by +NAME    UUID                                  TYPE      DEVICE  
-ip6t_rpfilter          12546  1  +ens18   fc4a4d23-b15e-47a7-bcfa-b2e08f49553e  ethernet  ens18   
-ip6t_REJECT            12939  2  +virbr0  03f6c432-2a09-47e7-9693-208431a572ee  bridge    virbr0 
-ipt_REJECT             12541   +
-xt_conntrack           12760  9  +
-ebtable_nat            12807  0  +
-ebtable_broute         12731  0  +
-bridge                119562  1 ebtable_broute +
-stp                    12976  1 bridge +
-llc                    14552  2 stp,bridge +
-ebtable_filter         12827  0  +
-ebtables               30913  3 ebtable_broute,ebtable_nat,ebtable_filter +
-ip6table_nat           12864  1  +
-nf_conntrack_ipv6      18738  6  +
-nf_defrag_ipv6         34768  1 nf_conntrack_ipv6 +
-nf_nat_ipv6            14131  1 ip6table_nat +
-ip6table_mangle        12700  1  +
-ip6table_security      12710  1  +
-ip6table_raw           12683  1  +
-ip6table_filter        12815  1  +
-ip6_tables             27025  5 ip6table_filter,ip6table_mangle,ip6table_security,ip6table_nat,ip6table_raw +
-iptable_nat            12875  1  +
-nf_conntrack_ipv4      14862  5  +
-nf_defrag_ipv4         12729  1 nf_conntrack_ipv4 +
-nf_nat_ipv4            14115  1 iptable_nat +
-nf_nat                 26146  2 nf_nat_ipv4,nf_nat_ipv6 +
-nf_conntrack          105745  6 nf_nat,nf_nat_ipv4,nf_nat_ipv6,xt_conntrack,nf_conntrack_ipv4,nf_conntrack_ipv6 +
-iptable_mangle         12695  1  +
-iptable_security       12705  1  +
-iptable_raw            12678  1  +
-iptable_filter         12810  1  +
-dm_mirror              22135  0  +
-dm_region_hash         20862  1 dm_mirror +
-dm_log                 18411  2 dm_region_hash,dm_mirror +
-dm_mod                113292  2 dm_log,dm_mirror +
-crc32_pclmul           13113  0  +
-ghash_clmulni_intel    13259  0  +
-aesni_intel            69884  0  +
-lrw                    13286  1 aesni_intel +
-gf128mul               14951  1 lrw +
-glue_helper            13990  1 aesni_intel +
-snd_intel8x0           38274  1  +
-ablk_helper            13597  1 aesni_intel +
-cryptd                 20359  3 ghash_clmulni_intel,aesni_intel,ablk_helper +
-snd_ac97_codec        130605  1 snd_intel8x0 +
-ac97_bus               12730  1 snd_ac97_codec +
-ppdev                  17671  0  +
-snd_seq                66691  0  +
-snd_seq_device         14356  1 snd_seq +
-snd_pcm               105835  2 snd_ac97_codec,snd_intel8x0 +
-pcspkr                 12718  0  +
-sg                     40721  0  +
-parport_pc             28165  0  +
-parport                42348  2 ppdev,parport_pc +
-snd_timer              29639  2 snd_pcm,snd_seq +
-snd                    83425  8 snd_ac97_codec,snd_intel8x0,snd_timer,snd_pcm,snd_seq,snd_seq_device +
-soundcore              15047  1 snd +
-i2c_piix4              22106  0  +
-video                  24400  0  +
-i2c_core               40582  1 i2c_piix4 +
-nfsd                  302418  1  +
-auth_rpcgss            59343  1 nfsd +
-nfs_acl                12837  1 nfsd +
-lockd                  93600  1 nfsd +
-grace                  13295  2 nfsd,lockd +
-sunrpc                300464  7 nfsd,auth_rpcgss,lockd,nfs_acl +
-ip_tables              27240  5 iptable_security,iptable_filter,iptable_mangle,iptable_nat,iptable_raw +
-xfs                   939662  2  +
-libcrc32c              12644  1 xfs +
-sd_mod                 45497  4  +
-crc_t10dif             12714  1 sd_mod +
-crct10dif_generic      12647  0  +
-sr_mod                 22416  0  +
-cdrom                  42556  1 sr_mod +
-ata_generic            12910  0  +
-pata_acpi              13038  0  +
-ahci                   29907  3  +
-libahci                32031  1 ahci +
-ata_piix               35038  0  +
-crct10dif_pclmul       14289  1  +
-crct10dif_common       12595  3 crct10dif_pclmul,crct10dif_generic,crc_t10dif +
-crc32c_intel           22079  1  +
-serio_raw              13462  0  +
-libata                218730  5 ahci,pata_acpi,libahci,ata_generic,ata_piix +
-e1000                 149323 +
 </code> </code>
  
-Pour ajouter un module, on peut utiliser la commande **insmod** ou **modprobe**. Cette dernière ajoute non seulement le module passé en argument mais également ses dépendances :+Créez donc un profil IP fixe rattaché au périphérique **ens18** :
  
 <code> <code>
-[root@centos7 ~]# modprobe bonding +[root@centos8 ~]# nmcli connection add con-name ip_fixe ifname ens18 type ethernet ip4 10.0.2.46/24 gw4 10.0.2.
-[root@centos7 ~]# lsmod | more +Connection 'ip_fixe' (0f48c74d-5d16-4c37-8220-24644507b589) successfully added.
-Module                  Size  Used by +
-bonding               136705   +
-ip6t_rpfilter          12546  1  +
-ip6t_REJECT            12939   +
-ipt_REJECT             12541  2  +
-xt_conntrack           12760  9  +
-ebtable_nat            12807   +
-ebtable_broute         12731  0  +
-bridge                119562  1 ebtable_broute +
-stp                    12976  1 bridge +
-llc                    14552  stp,bridge +
-ebtable_filter         12827  0  +
-ebtables               30913  3 ebtable_broute,ebtable_nat,ebtable_filter +
-ip6table_nat           12864  1  +
-nf_conntrack_ipv6      18738  6  +
-nf_defrag_ipv6         34768  1 nf_conntrack_ipv6 +
-nf_nat_ipv6            14131  1 ip6table_nat +
-ip6table_mangle        12700  1  +
-ip6table_security      12710  1  +
-ip6table_raw           12683  1  +
-ip6table_filter        12815  1  +
-ip6_tables             27025  5 ip6table_filter,ip6table_mangle,ip6table_securit +
-y,ip6table_nat,ip6table_raw +
---More--+
 </code> </code>
  
-Pour supprimer un module, on peut utiliser la commande **rmmod** ou **modprobe -r**. Cette dernière essaie de supprimer les dépendances non-utilisées :+Constatez sa présence :
  
 <code> <code>
-[root@centos7 ~]# modprobe -r bonding +[root@centos8 ~]# nmcli c show 
-[root@centos7 ~]# lsmod | more +NAME     UUID                                  TYPE      DEVICE  
-Module                  Size  Used by +ens18    fc4a4d23-b15e-47a7-bcfa-b2e08f49553e  ethernet  ens18   
-ip6t_rpfilter          12546  1  +virbr0   03f6c432-2a09-47e7-9693-208431a572ee  bridge    virbr0  
-ip6t_REJECT            12939   +ip_fixe  0f48c74d-5d16-4c37-8220-24644507b589  ethernet  --   
-ipt_REJECT             12541  2  +
-xt_conntrack           12760  9  +
-ebtable_nat            12807  0  +
-ebtable_broute         12731  0  +
-bridge                119562  1 ebtable_broute +
-stp                    12976  1 bridge +
-llc                    14552  2 stp,bridge +
-ebtable_filter         12827  0  +
-ebtables               30913  3 ebtable_broute,ebtable_nat,ebtable_filter +
-ip6table_nat           12864  1  +
-nf_conntrack_ipv6      18738  6  +
-nf_defrag_ipv6         34768  1 nf_conntrack_ipv6 +
-nf_nat_ipv6            14131  1 ip6table_nat +
-ip6table_mangle        12700  1  +
-ip6table_security      12710  1  +
-ip6table_raw           12683  1  +
-ip6table_filter        12815  1  +
-ip6_tables             27025  5 ip6table_filter,ip6table_mangle,ip6table_securit +
-y,ip6table_nat,ip6table_raw +
-iptable_nat            12875  1  +
---More--+
 </code> </code>
  
-Les dépendances des modules sont résolues par la commande **modprobe** grâce aux fichier **/lib/modules/<version-du-noyau>/modules.dep**. Ce dernier peut être créé manuellement grâce à la commande **depmod** :+Notez que la sortie n'indique pas que le profil **ip_fixe** soit associé au periphérique **ens18** car le profil **ip_fixe** n'est pas activé :
  
 <code> <code>
-[root@centos7 ~]# more /lib/modules/`uname -r`/modules.dep +[root@centos8 ~]# nmcli d show 
-kernel/arch/x86/kernel/cpu/mcheck/mce-inject.ko+GENERAL.DEVICE:                         ens18 
-kernel/arch/x86/kernel/test_nx.ko+GENERAL.TYPE                          ethernet 
-kernel/arch/x86/crypto/ablk_helper.kokernel/crypto/cryptd.ko +GENERAL.HWADDR                        4E:B1:31:BD:5D:B2 
-kernel/arch/x86/crypto/glue_helper.ko+GENERAL.MTU                           1500 
-kernel/arch/x86/crypto/camellia-x86_64.kokernel/crypto/xts.ko kernel/crypto/lrw.ko kernel/crypto/gf128mul.ko kernel/arch/x86/crypto/glue_helper.ko +GENERAL.STATE                         100 (connected) 
-kernel/arch/x86/crypto/blowfish-x86_64.kokernel/crypto/blowfish_common.ko +GENERAL.CONNECTION                    ens18 
-kernel/arch/x86/crypto/twofish-x86_64.kokernel/crypto/twofish_common.ko +GENERAL.CON-PATH                      /org/freedesktop/NetworkManager/ActiveConnect> 
-kernel/arch/x86/crypto/twofish-x86_64-3way.kokernel/arch/x86/crypto/twofish-x86_64.ko kernel/crypto/twofish_common.ko kernel/crypto/xts.ko kernel/cryp +WIRED-PROPERTIES.CARRIER              on 
-to/lrw.ko kernel/crypto/gf128mul.ko kernel/arch/x86/crypto/glue_helper.ko +IP4.ADDRESS[1]                        10.0.2.45/24 
-kernel/arch/x86/crypto/salsa20-x86_64.ko: +IP4.GATEWAY:                            10.0.2.1 
-kernel/arch/x86/crypto/serpent-sse2-x86_64.kokernel/crypto/xts.ko kernel/crypto/serpent_generic.ko kernel/crypto/lrw.ko kernel/crypto/gf128mul.ko kern +IP4.ROUTE[1]                          dst = 10.0.2.0/24, nh = 0.0.0.0, mt = 100 
-el/arch/x86/crypto/glue_helper.ko kernel/arch/x86/crypto/ablk_helper.ko kernel/crypto/cryptd.ko +IP4.ROUTE[2]                          dst = 0.0.0.0/0, nh = 10.0.2.1, mt = 100 
-kernel/arch/x86/crypto/aesni-intel.kokernel/crypto/lrw.ko kernel/crypto/gf128mul.ko kernel/arch/x86/crypto/glue_helper.ko kernel/arch/x86/crypto/ablk_ +IP4.DNS[1]                            8.8.8.8 
-helper.ko kernel/crypto/cryptd.ko +IP6.ADDRESS[1]                        fe80::86b6:8d39:cab2:d84d/64 
-kernel/arch/x86/crypto/ghash-clmulni-intel.ko: kernel/crypto/cryptd.ko +IP6.GATEWAY                           -- 
-kernel/arch/x86/crypto/crc32c-intel.ko: +IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 100 
-kernel/arch/x86/crypto/sha-mb/sha1-mb.ko: kernel/crypto/mcryptd.ko +IP6.ROUTE[2]:                           dst = ff00::/8, nh = ::, mt = 256, table=255
-kernel/arch/x86/crypto/crc32-pclmul.ko: +
-kernel/arch/x86/crypto/sha512-ssse3.kokernel/crypto/sha512_generic.ko +
-kernel/arch/x86/crypto/crct10dif-pclmul.kokernel/crypto/crct10dif_common.ko +
-kernel/arch/x86/crypto/camellia-aesni-avx-x86_64.kokernel/arch/x86/crypto/camellia-x86_64.ko kernel/crypto/xts.ko kernel/crypto/lrw.ko kernel/crypto/g +
-f128mul.ko kernel/arch/x86/crypto/glue_helper.ko kernel/arch/x86/crypto/ablk_helper.ko kernel/crypto/cryptd.ko +
-kernel/arch/x86/crypto/cast5-avx-x86_64.kokernel/crypto/cast5_generic.ko kernel/crypto/cast_common.ko kernel/arch/x86/crypto/ablk_helper.ko kernel/cry +
---More--(0%) +
-</code>+
  
-Il est possible d'obtenir des informations sur un module grâce à la commande **modinfo** :+GENERAL.DEVICE                        virbr0 
 +GENERAL.TYPE:                           bridge 
 +GENERAL.HWADDR:                         52:54:00:79:02:66 
 +GENERAL.MTU:                            1500 
 +GENERAL.STATE:                          100 (connected (externally)) 
 +GENERAL.CONNECTION:                     virbr0 
 +GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnect> 
 +IP4.ADDRESS[1]:                         192.168.122.1/24 
 +IP4.GATEWAY:                            -- 
 +IP4.ROUTE[1]:                           dst = 192.168.122.0/24, nh = 0.0.0.0, mt = 0 
 +IP6.GATEWAY:                            --
  
-<code> +GENERAL.DEVICE                        lo 
-[root@centos7 ~]# modinfo bonding +GENERAL.TYPE                          loopback 
-filename      /lib/modules/3.10.0-327.13.1.el7.x86_64/kernel/drivers/net/bonding/bonding.ko +GENERAL.HWADDR                        00:00:00:00:00:00 
-author:         Thomas Davis, tadavis@lbl.gov and many others +GENERAL.MTU                           65536 
-description   Ethernet Channel Bonding Driver, v3.7.1 +GENERAL.STATE                         10 (unmanaged
-version:        3.7.1 +GENERAL.CONNECTION                    -- 
-license       GPL +GENERAL.CON-PATH                      -- 
-alias         rtnl-link-bond +IP4.ADDRESS[1]                        127.0.0.1/8 
-rhelversion   7.2 +IP4.GATEWAY                           -- 
-srcversion    49765A3F5CDFF2C3DCFD8E6 +IP6.ADDRESS[1]                        ::1/128 
-depends        +IP6.GATEWAY                           -- 
-intree        Y +IP6.ROUTE[1]                          dst = ::1/128nh = ::, mt = 256 
-vermagic:       3.10.0-327.13.1.el7.x86_64 SMP mod_unload modversions  + 
-signer        CentOS Linux kernel signing key +GENERAL.DEVICE                        virbr0-nic 
-sig_key       6F:33:78:18:7D:83:CD:18:A4:3B:2E:0A:C4:9A:ED:8A:EF:FC:3A:C7 +GENERAL.TYPE                          tun 
-sig_hashalgo:   sha256 +GENERAL.HWADDR                        52:54:00:79:02:66 
-parm:           max_bonds:Max number of bonded devices (int+GENERAL.MTU                           1500 
-parm          tx_queues:Max number of transmit queues (default = 16) (int) +GENERAL.STATE                         10 (unmanaged
-parm          num_grat_arp:Number of peer notifications to send on failover event (alias of num_unsol_na) (int) +GENERAL.CONNECTION                    -
-parm          num_unsol_na:Number of peer notifications to send on failover event (alias of num_grat_arp) (int) +GENERAL.CON-PATH                      -- 
-parm          miimon:Link check interval in milliseconds (int) +lines 28-50/50 (END
-parm          updelay:Delay before considering link up, in milliseconds (int) +[q]
-parm          downdelay:Delay before considering link down, in milliseconds (int) +
-parm:           use_carrier:Use netif_carrier_ok (vs MII ioctls) in miimon; 0 for off, for on (default) (int) +
-parm          mode:Mode of operation; 0 for balance-rr, 1 for active-backup, 2 for balance-xor, 3 for broadcast, 4 for 802.3ad, 5 for balance-tlb, 6 for balance-alb (charp) +
-parm          primary:Primary network device to use (charp) +
-parm          primary_reselect:Reselect primary slave once it comes up; 0 for always (default), for only if speed of primary is better2 for only on active slave failure (charp) +
-parm          lacp_rate:LACPDU tx rate to request from 802.3ad partner; 0 for slow1 for fast (charp) +
-parm          ad_select:803.ad aggregation selection logic; 0 for stable (default), 1 for bandwidth, 2 for count (charp) +
-parm          min_links:Minimum number of available links before turning on carrier (int) +
-parm          xmit_hash_policy:balance-xor and 802.3ad hashing method; 0 for layer 2 (default), 1 for layer 3+4, 2 for layer 2+3, 3 for encap layer 2+3, 4 for encap layer 3+4 (charp) +
-parm          arp_interval:arp interval in milliseconds (int) +
-parm:           arp_ip_target:arp targets in n.n.n.n form (array of charp) +
-parm          arp_validate:validate src/dst of ARP probes; 0 for none (default), 1 for active, 2 for backup, 3 for all (charp) +
-parm          arp_all_targets:fail on any/all arp targets timeout; 0 for any (default), 1 for all (charp+
-parm          fail_over_mac:For active-backup, do not set all slaves to the same MAC; 0 for none (default), 1 for active, 2 for follow (charp) +
-parm:           all_slaves_active:Keep all frames received on an interface by setting active flag for all slaves; 0 for never (default), 1 for always(int) +
-parm          resend_igmp:Number of IGMP membership reports to send on link failure (int) +
-parm:           packets_per_slave:Packets to send per slave in balance-rr mode; 0 for a random slave, 1 packet per slave (default), >1 packets per slave. (int+
-parm:           lp_interval:The number of seconds between instances where the bonding driver sends learning packets to each slaves peer switch. The default is 1. (uint)+
 </code> </code>
  
-Dernièrement, les fichiers dans le repertoire **/etc/modprobe.d** sont utilisés pour spécifier les options éventuelles à passer aux modules lors de leur chargement ainsi que les alias utilisés pour leur faire référence :+Pour activer le profil ip_fixe, utilisez la commande suivante :
  
 <code> <code>
-[root@centos7 ~]# ls /etc/modprobe.d +[root@centos8 ~]# nmcli connection up ip_fixe
-mlx4.conf+
  
-[root@centos7 ~]# cat /etc/modprobe.d/mlx4.conf 
-# This file is intended for users to select the various module options 
-# they need for the mlx4 driver.  On upgrade of the rdma package, 
-# any user made changes to this file are preserved.  Any changes made 
-# to the libmlx4.conf file in this directory are overwritten on 
-# pacakge upgrade. 
-# 
-# Some sample options and what they would do 
-# Enable debugging output, device managed flow control, and disable SRIOV 
-#options mlx4_core debug_level=1 log_num_mgm_entry_size=-1 probe_vf=0 num_vfs=0 
-# 
-# Enable debugging output and create SRIOV devices, but don't attach any of 
-# the child devices to the host, only the parent device 
-#options mlx4_core debug_level=1 probe_vf=0 num_vfs=7 
-# 
-# Enable debugging output, SRIOV, and attach one of the SRIOV child devices 
-# in addition to the parent device to the host 
-#options mlx4_core debug_level=1 probe_vf=1 num_vfs=7 
-# 
-# Enable per priority flow control for send and receive, setting both priority 
-# 1 and 2 as no drop priorities 
-#options mlx4_en pfctx=3 pfcrx=3 
 </code> </code>
  
-=====Compilation et installation du noyau et des modules=====+Notez que votre terminal est bloqué à cause du changement de l'adresse IP. 
  
-Commencez par installer les paquets necessaires :+<WRAP center round todo 60%> 
 +**A faire** - Revenez à l'accueil du cloud IT Training et re-connectez-vous à la VM en tant que trainee en utilisant la connexion **CentOS8_SSH_10.0.2.46**. 
 +</WRAP>
  
-<code> +Le profil ip_fixe est maintenant activé tandis que le profil enp0s3 a été désactivé :
-[root@centos7 ~]# yum install qt3-devel libXi-devel gcc-c++ rpmdevtools ncurses-devel +
-Loaded pluginsfastestmirror, langpacks +
-Loading mirror speeds from cached hostfile +
- * base: centos.mirrors.ovh.net +
- * extras: centos.mirror.fr.planethoster.net +
- * updates: mirror1.evolution-host.com +
-Resolving Dependencies +
---> Running transaction check +
----> Package gcc-c++.x86_64 0:4.8.5-4.el7 will be installed +
---> Processing Dependency: libstdc++-devel = 4.8.5-4.el7 for package: gcc-c++-4.8.5-4.el7.x86_64 +
----> Package libXi-devel.x86_64 0:1.7.4-2.el7 will be installed +
---> Processing Dependency: xorg-x11-proto-devel for package: libXi-devel-1.7.4-2.el7.x86_64 +
---> Processing Dependency: pkgconfig(xfixes) for package: libXi-devel-1.7.4-2.el7.x86_64 +
---> Processing Dependency: pkgconfig(xext) for package: libXi-devel-1.7.4-2.el7.x86_64 +
---> Processing Dependency: pkgconfig(x11) for package: libXi-devel-1.7.4-2.el7.x86_64 +
---> Processing Dependency: pkgconfig(inputproto) for package: libXi-devel-1.7.4-2.el7.x86_64 +
----> Package ncurses-devel.x86_64 0:5.9-13.20130511.el7 will be installed +
----> Package qt3-devel.x86_64 0:3.3.8b-51.el7 will be installed +
---> Processing Dependency: qt3 = 3.3.8b-51.el7 for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: mesa-libGLU-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: mesa-libGL-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libpng-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libmng-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libjpeg-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libXt-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libXrender-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libXrandr-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libXinerama-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libXft-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libXcursor-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libSM-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libICE-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: freetype-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: fontconfig-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libqui.so.1()(64bit) for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libqt-mt.so.3()(64bit) for package: qt3-devel-3.3.8b-51.el7.x86_64 +
---> Processing Dependency: libmng.so.1()(64bit) for package: qt3-devel-3.3.8b-51.el7.x86_64 +
----> Package rpmdevtools.noarch 0:8.3-5.el7 will be installed +
---> Processing Dependency: rpm-build >= 4.4.2.3 for package: rpmdevtools-8.3-5.el7.noarch +
---> Running transaction check +
----> Package fontconfig-devel.x86_64 0:2.10.95-7.el7 will be installed +
---> Processing Dependency: pkgconfig(expat) for package: fontconfig-devel-2.10.95-7.el7.x86_64 +
----> Package freetype-devel.x86_64 0:2.4.11-11.el7 will be installed +
---> Processing Dependency: zlib-devel for package: freetype-devel-2.4.11-11.el7.x86_64 +
----> Package libICE-devel.x86_64 0:1.0.9-2.el7 will be installed +
----> Package libSM-devel.x86_64 0:1.2.2-2.el7 will be installed +
----> Package libX11-devel.x86_64 0:1.6.3-2.el7 will be installed +
---> Processing Dependency: pkgconfig(xcb) >= 1.1.92 for package: libX11-devel-1.6.3-2.el7.x86_64 +
---> Processing Dependency: pkgconfig(xcb) for package: libX11-devel-1.6.3-2.el7.x86_64 +
----> Package libXcursor-devel.x86_64 0:1.1.14-2.1.el7 will be installed +
----> Package libXext-devel.x86_64 0:1.3.3-3.el7 will be installed +
----> Package libXfixes-devel.x86_64 0:5.0.1-2.1.el7 will be installed +
----> Package libXft-devel.x86_64 0:2.3.2-2.el7 will be installed +
----> Package libXinerama-devel.x86_64 0:1.1.3-2.1.el7 will be installed +
----> Package libXrandr-devel.x86_64 0:1.4.2-2.el7 will be installed +
----> Package libXrender-devel.x86_64 0:0.9.8-2.1.el7 will be installed +
----> Package libXt-devel.x86_64 0:1.1.4-6.1.el7 will be installed +
----> Package libjpeg-turbo-devel.x86_64 0:1.2.90-5.el7 will be installed +
----> Package libmng.x86_64 0:1.0.10-14.el7 will be installed +
----> Package libmng-devel.x86_64 0:1.0.10-14.el7 will be installed +
----> Package libpng-devel.x86_64 2:1.5.13-7.el7_2 will be installed +
----> Package libstdc++-devel.x86_64 0:4.8.5-4.el7 will be installed +
----> Package mesa-libGL-devel.x86_64 0:10.6.5-3.20150824.el7 will be installed +
---> Processing Dependency: pkgconfig(xshmfence) >= 1.1 for package: mesa-libGL-devel-10.6.5-3.20150824.el7.x86_64 +
---> Processing Dependency: pkgconfig(libdrm) >= 2.4.38 for package: mesa-libGL-devel-10.6.5-3.20150824.el7.x86_64 +
---> Processing Dependency: pkgconfig(xxf86vm) for package: mesa-libGL-devel-10.6.5-3.20150824.el7.x86_64 +
---> Processing Dependency: pkgconfig(xdamage) for package: mesa-libGL-devel-10.6.5-3.20150824.el7.x86_64 +
---> Processing Dependency: gl-manpages for package: mesa-libGL-devel-10.6.5-3.20150824.el7.x86_64 +
----> Package mesa-libGLU-devel.x86_64 0:9.0.0-4.el7 will be installed +
----> Package qt3.x86_64 0:3.3.8b-51.el7 will be installed +
----> Package rpm-build.x86_64 0:4.11.3-17.el7 will be installed +
---> Processing Dependency: system-rpm-config for package: rpm-build-4.11.3-17.el7.x86_64 +
---> Processing Dependency: perl(Thread::Queue) for package: rpm-build-4.11.3-17.el7.x86_64 +
----> Package xorg-x11-proto-devel.noarch 0:7.7-12.el7 will be installed +
---> Running transaction check +
----> Package expat-devel.x86_64 0:2.1.0-8.el7 will be installed +
----> Package gl-manpages.noarch 0:1.1-7.20130122.el7 will be installed +
----> Package libXdamage-devel.x86_64 0:1.1.4-4.1.el7 will be installed +
----> Package libXxf86vm-devel.x86_64 0:1.1.3-2.1.el7 will be installed +
----> Package libdrm-devel.x86_64 0:2.4.60-3.el7 will be installed +
----> Package libxcb-devel.x86_64 0:1.11-4.el7 will be installed +
---> Processing Dependency: pkgconfig(xau) >= 0.99.2 for package: libxcb-devel-1.11-4.el7.x86_64 +
----> Package libxshmfence-devel.x86_64 0:1.2-1.el7 will be installed +
----> Package perl-Thread-Queue.noarch 0:3.02-2.el7 will be installed +
----> Package redhat-rpm-config.noarch 0:9.1.0-68.el7.centos will be installed +
---> Processing Dependency: dwz >= 0.4 for package: redhat-rpm-config-9.1.0-68.el7.centos.noarch +
---> Processing Dependency: perl-srpm-macros for package: redhat-rpm-config-9.1.0-68.el7.centos.noarch +
----> Package zlib-devel.x86_64 0:1.2.7-15.el7 will be installed +
---> Running transaction check +
----> Package dwz.x86_64 0:0.11-3.el7 will be installed +
----> Package libXau-devel.x86_64 0:1.0.8-2.1.el7 will be installed +
----> Package perl-srpm-macros.noarch 0:1-8.el7 will be installed +
---> Finished Dependency Resolution+
  
-Dependencies Resolved+<code> 
 +[root@centos8 ~]# nmcli c show 
 +NAME     UUID                                  TYPE      DEVICE  
 +ip_fixe  0f48c74d-5d16-4c37-8220-24644507b589  ethernet  ens18   
 +virbr0   03f6c432-2a09-47e7-9693-208431a572ee  bridge    virbr0  
 +ens18    fc4a4d23-b15e-47a7-bcfa-b2e08f49553e  ethernet  --   
 +    
 +[root@centos8 ~]# nmcli d show 
 +GENERAL.DEVICE:                         ens18 
 +GENERAL.TYPE:                           ethernet 
 +GENERAL.HWADDR:                         4E:B1:31:BD:5D:B2 
 +GENERAL.MTU:                            1500 
 +GENERAL.STATE:                          100 (connected) 
 +GENERAL.CONNECTION:                     ip_fixe 
 +GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnect> 
 +WIRED-PROPERTIES.CARRIER:               on 
 +IP4.ADDRESS[1]:                         10.0.2.46/24 
 +IP4.GATEWAY:                            10.0.2.1 
 +IP4.ROUTE[1]:                           dst = 10.0.2.0/24, nh = 0.0.0.0, mt = 100 
 +IP4.ROUTE[2]:                           dst = 0.0.0.0/0, nh = 10.0.2.1, mt = 100 
 +IP6.ADDRESS[1]:                         fe80::5223:aee1:998e:9f27/64 
 +IP6.GATEWAY:                            -- 
 +IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 100 
 +IP6.ROUTE[2]:                           dst = ff00::/8, nh = ::, mt = 256, table=255
  
-======================================================================================================================================================================== +GENERAL.DEVICE                        virbr0 
- Package                                       Arch                            Version                                           Repository                        Size +GENERAL.TYPE:                           bridge 
-======================================================================================================================================================================== +GENERAL.HWADDR:                         52:54:00:79:02:66 
-Installing+GENERAL.MTU:                            1500 
- gcc-c++                                       x86_64                          4.8.5-4.el7                                       base                             7.2 M +GENERAL.STATE:                          100 (connected (externally)) 
- libXi-devel                                   x86_64                          1.7.4-2.el7                                       base                             105 k +GENERAL.CONNECTION:                     virbr0 
- ncurses-devel                                 x86_64                          5.9-13.20130511.el7                               base                             713 k +GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnect> 
- qt3-devel                                     x86_64                          3.3.8b-51.el7                                     base                             8.8 M +IP4.ADDRESS[1]:                         192.168.122.1/24 
- rpmdevtools                                   noarch                          8.3-5.el7                                         base                              97 k +IP4.GATEWAY:                            -- 
-Installing for dependencies: +IP4.ROUTE[1]:                           dst = 192.168.122.0/24, nh = 0.0.0.0, mt = 
- dwz                                           x86_64                          0.11-3.el7                                        base                              99 k +IP6.GATEWAY:                            --
- expat-devel                                   x86_64                          2.1.0-8.el7                                       base                              56 k +
- fontconfig-devel                              x86_64                          2.10.95-7.el7                                     base                             128 k +
- freetype-devel                                x86_64                          2.4.11-11.el7                                     base                             356 k +
- gl-manpages                                   noarch                          1.1-7.20130122.el7                                base                             994 k +
- libICE-devel                                  x86_64                          1.0.9-2.el7                                       base                              49 k +
- libSM-devel                                   x86_64                          1.2.2-2.el7                                       base                              13 k +
- libX11-devel                                  x86_64                          1.6.3-2.el7                                       base                             980 k +
- libXau-devel                                  x86_64                          1.0.8-2.1.el7                                     base                              14 k +
- libXcursor-devel                              x86_64                          1.1.14-2.1.el7                                    base                              23 k +
- libXdamage-devel                              x86_64                          1.1.4-4.1.el7                                     base                             9.7 k +
- libXext-devel                                 x86_64                          1.3.3-3.el7                                       base                              75 k +
- libXfixes-devel                               x86_64                          5.0.1-2.1.el7                                     base                              13 k +
- libXft-devel                                  x86_64                          2.3.2-2.el7                                       base                              19 k +
- libXinerama-devel                             x86_64                          1.1.3-2.1.el7                                     base                              13 k +
- libXrandr-devel                               x86_64                          1.4.2-2.el7                                       base                              21 k +
- libXrender-devel                              x86_64                          0.9.8-2.1.el7                                     base                              16 k +
- libXt-devel                                   x86_64                          1.1.4-6.1.el7                                     base                             445 k +
- libXxf86vm-devel                              x86_64                          1.1.3-2.1.el7                                     base                              18 k +
- libdrm-devel                                  x86_64                          2.4.60-3.el7                                      base                              92 k +
- libjpeg-turbo-devel                           x86_64                          1.2.90-5.el7                                      base                              98 k +
- libmng                                        x86_64                          1.0.10-14.el7                                     base                             171 k +
- libmng-devel                                  x86_64                          1.0.10-14.el7                                     base                              85 k +
- libpng-devel                                  x86_64                          2:1.5.13-7.el7_2                                  updates                          122 k +
- libstdc++-devel                               x86_64                          4.8.5-4.el7                                       base                             1.5 M +
- libxcb-devel                                  x86_64                          1.11-4.el7                                        base                             1.1 M +
- libxshmfence-devel                            x86_64                          1.2-1.el7                                         base                             5.4 k +
- mesa-libGL-devel                              x86_64                          10.6.5-3.20150824.el7                             base                             147 k +
- mesa-libGLU-devel                             x86_64                          9.0.0-4.el7                                       base                             9.0 +
- perl-Thread-Queue                             noarch                          3.02-2.el7                                        base                              17 k +
- perl-srpm-macros                              noarch                          1-8.el7                                           base                             4.6 k +
- qt3                                           x86_64                          3.3.8b-51.el7                                     base                             3.5 M +
- redhat-rpm-config                             noarch                          9.1.0-68.el7.centos                               base                              77 k +
- rpm-build                                     x86_64                          4.11.3-17.el7                                     base                             143 k +
- xorg-x11-proto-devel                          noarch                          7.7-12.el7                                        base                             281 k +
- zlib-devel                                    x86_64                          1.2.7-15.el7                                      base                              50 k+
  
-Transaction Summary +GENERAL.DEVICE:                         lo 
-======================================================================================================================================================================== +GENERAL.TYPE:                           loopback 
-Install  5 Packages (+36 Dependent packages)+GENERAL.HWADDR:                         00:00:00:00:00:00 
 +GENERAL.MTU:                            65536 
 +GENERAL.STATE:                          10 (unmanaged) 
 +GENERAL.CONNECTION:                     -- 
 +GENERAL.CON-PATH:                       -- 
 +IP4.ADDRESS[1]:                         127.0.0.1/
 +IP4.GATEWAY:                            -- 
 +IP6.ADDRESS[1]:                         ::1/128 
 +IP6.GATEWAY:                            -- 
 +IP6.ROUTE[1]:                           dst ::1/128, nh ::, mt 256
  
-Total download size27 M +GENERAL.DEVICE                        virbr0-nic 
-Installed size90 M +GENERAL.TYPE                          tun 
-Is this ok [y/d/N]: y+GENERAL.HWADDR:                         52:54:00:79:02:66 
 +GENERAL.MTU:                            1500 
 +GENERAL.STATE:                          10 (unmanaged) 
 +GENERAL.CONNECTION:                     -- 
 +GENERAL.CON-PATH:                       -- 
 +lines 27-49/49 (END) 
 +[q]
 </code> </code>
  
-<WRAP center round alert> +Pour consulter les paramètres du profil **ens18**utilisez la commande suivante :
-Il n'est pas conseillé de compiler en tant que root pour des raisons de sécurité. Pour pouvoir utiliser le compte d'un utilisateur pour créer un nouveau noyaucelui-ci doit disposer de plusieurs Go d'espace libre. +
-</WRAP>+
  
-====Déplacer /home====+<code> 
 +[root@centos8 ~]# nmcli -p connection show ens18 
 +=============================================================================== 
 +                      Connection profile details (ens18) 
 +=============================================================================== 
 +connection.id:                          ens18 
 +connection.uuid:                        fc4a4d23-b15e-47a7-bcfa-b2e08f49553e 
 +connection.stable-id:                   -- 
 +connection.type:                        802-3-ethernet 
 +connection.interface-name:              ens18 
 +connection.autoconnect:                 yes 
 +connection.autoconnect-priority:        0 
 +connection.autoconnect-retries:         -1 (default) 
 +connection.multi-connect:               0 (default) 
 +connection.auth-retries:                -1 
 +connection.timestamp:                   1630224060 
 +connection.read-only:                   no 
 +connection.permissions:                 -- 
 +connection.zone:                        -- 
 +connection.master:                      -- 
 +connection.slave-type:                  -- 
 +connection.autoconnect-slaves:          -1 (default) 
 +connection.secondaries:                 -- 
 +connection.gateway-ping-timeout:        0 
 +connection.metered:                     unknown 
 +connection.lldp:                        default 
 +connection.mdns:                        -1 (default) 
 +connection.llmnr:                       -1 (default) 
 +connection.wait-device-timeout:         -1 
 +------------------------------------------------------------------------------- 
 +802-3-ethernet.port:                    -- 
 +802-3-ethernet.speed:                   0 
 +802-3-ethernet.duplex:                  -- 
 +802-3-ethernet.auto-negotiate:          no 
 +802-3-ethernet.mac-address:             -- 
 +802-3-ethernet.cloned-mac-address:      -- 
 +802-3-ethernet.generate-mac-address-mask:-- 
 +802-3-ethernet.mac-address-blacklist:   -- 
 +802-3-ethernet.mtu:                     auto 
 +802-3-ethernet.s390-subchannels:        -- 
 +802-3-ethernet.s390-nettype:            -- 
 +802-3-ethernet.s390-options:            -- 
 +802-3-ethernet.wake-on-lan:             default 
 +802-3-ethernet.wake-on-lan-password:    -- 
 +------------------------------------------------------------------------------- 
 +ipv4.method:                            manual 
 +ipv4.dns:                               8.8.8.8 
 +ipv4.dns-search:                        ittraining.loc 
 +ipv4.dns-options:                       -- 
 +ipv4.dns-priority:                      0 
 +ipv4.addresses:                         10.0.2.45/24 
 +ipv4.gateway:                           10.0.2.1 
 +ipv4.routes:                            -- 
 +ipv4.route-metric:                      -1 
 +ipv4.route-table:                       0 (unspec) 
 +ipv4.routing-rules:                     -- 
 +ipv4.ignore-auto-routes:                no 
 +ipv4.ignore-auto-dns:                   no 
 +ipv4.dhcp-client-id:                    -- 
 +ipv4.dhcp-iaid:                         -- 
 +ipv4.dhcp-timeout:                      0 (default) 
 +ipv4.dhcp-send-hostname:                yes 
 +ipv4.dhcp-hostname:                     -- 
 +ipv4.dhcp-fqdn:                         -- 
 +ipv4.dhcp-hostname-flags:               0x0 (none) 
 +ipv4.never-default:                     no 
 +ipv4.may-fail:                          yes 
 +ipv4.dad-timeout:                       -1 (default) 
 +ipv4.dhcp-vendor-class-identifier:      -- 
 +ipv4.dhcp-reject-servers:               -- 
 +------------------------------------------------------------------------------- 
 +ipv6.method:                            auto 
 +ipv6.dns:                               -- 
 +ipv6.dns-search:                        -- 
 +ipv6.dns-options:                       -- 
 +ipv6.dns-priority:                      0 
 +ipv6.addresses:                         -- 
 +ipv6.gateway:                           -- 
 +ipv6.routes:                            -- 
 +ipv6.route-metric:                      -1 
 +ipv6.route-table:                       0 (unspec) 
 +ipv6.routing-rules:                     -- 
 +ipv6.ignore-auto-routes:                no 
 +ipv6.ignore-auto-dns:                   no 
 +ipv6.never-default:                     no 
 +ipv6.may-fail:                          yes 
 +ipv6.ip6-privacy:                       0 (disabled) 
 +ipv6.addr-gen-mode:                     stable-privacy 
 +ipv6.ra-timeout:                        0 (default) 
 +ipv6.dhcp-duid:                         -- 
 +ipv6.dhcp-iaid:                         -- 
 +ipv6.dhcp-timeout:                      0 (default) 
 +ipv6.dhcp-send-hostname:                yes 
 +ipv6.dhcp-hostname:                     -- 
 +ipv6.dhcp-hostname-flags:               0x0 (none) 
 +ipv6.token:                             -- 
 +------------------------------------------------------------------------------- 
 +proxy.method:                           none 
 +proxy.browser-only:                     no 
 +proxy.pac-url:                          -- 
 +proxy.pac-script:                       -- 
 +------------------------------------------------------------------------------- 
 +lines 56-100/100 (END) 
 +[q] 
 +</code>
  
-<WRAP center round todo> +De même, pour consulter les paramètres du profil **ip_fixe**, utilisez la commande suivante :
-Arrêtez votre machine virtuelle. Ajoutez un deuxième disque de 20 Go au contrôleur SATA en utilisant la section **Stockage** des paramètres de la machine virtuelle. Le format du disque doit être **vmdk**. Nommez ce disque **RedHatHome** et re-démarrez la machine virtuelle en vous connectant directement en tant que **root**. +
-</WRAP>+
  
-Créez une seule partition sur **/dev/sdb** :+<code> 
 +[root@centos8 ~]# nmcli -p connection show ip_fixe 
 +=============================================================================== 
 +                     Connection profile details (ip_fixe) 
 +=============================================================================== 
 +connection.id:                          ip_fixe 
 +connection.uuid:                        0f48c74d-5d16-4c37-8220-24644507b589 
 +connection.stable-id:                   -- 
 +connection.type:                        802-3-ethernet 
 +connection.interface-name:              ens18 
 +connection.autoconnect:                 yes 
 +connection.autoconnect-priority:        0 
 +connection.autoconnect-retries:         -1 (default) 
 +connection.multi-connect:               0 (default) 
 +connection.auth-retries:                -1 
 +connection.timestamp:                   1630224329 
 +connection.read-only:                   no 
 +connection.permissions:                 -- 
 +connection.zone:                        -- 
 +connection.master:                      -- 
 +connection.slave-type:                  -- 
 +connection.autoconnect-slaves:          -1 (default) 
 +connection.secondaries:                 -- 
 +connection.gateway-ping-timeout:        0 
 +connection.metered:                     unknown 
 +connection.lldp:                        default 
 +connection.mdns:                        -1 (default) 
 +connection.llmnr:                       -1 (default) 
 +connection.wait-device-timeout:         -1 
 +------------------------------------------------------------------------------- 
 +802-3-ethernet.port:                    -- 
 +802-3-ethernet.speed:                   0 
 +802-3-ethernet.duplex:                  -- 
 +802-3-ethernet.auto-negotiate:          no 
 +802-3-ethernet.mac-address:             -- 
 +802-3-ethernet.cloned-mac-address:      -- 
 +802-3-ethernet.generate-mac-address-mask:-- 
 +802-3-ethernet.mac-address-blacklist:   -- 
 +802-3-ethernet.mtu:                     auto 
 +802-3-ethernet.s390-subchannels:        -- 
 +802-3-ethernet.s390-nettype:            -- 
 +802-3-ethernet.s390-options:            -- 
 +802-3-ethernet.wake-on-lan:             default 
 +802-3-ethernet.wake-on-lan-password:    -- 
 +------------------------------------------------------------------------------- 
 +ipv4.method:                            manual 
 +ipv4.dns:                               -- 
 +ipv4.dns-search:                        -- 
 +ipv4.dns-options:                       -- 
 +ipv4.dns-priority:                      0 
 +ipv4.addresses:                         10.0.2.46/24 
 +ipv4.gateway:                           10.0.2.1 
 +ipv4.routes:                            -- 
 +ipv4.route-metric:                      -1 
 +ipv4.route-table:                       0 (unspec) 
 +ipv4.routing-rules:                     -- 
 +ipv4.ignore-auto-routes:                no 
 +ipv4.ignore-auto-dns:                   no 
 +ipv4.dhcp-client-id:                    -- 
 +ipv4.dhcp-iaid:                         -- 
 +ipv4.dhcp-timeout:                      0 (default) 
 +ipv4.dhcp-send-hostname:                yes 
 +ipv4.dhcp-hostname:                     -- 
 +ipv4.dhcp-fqdn:                         -- 
 +ipv4.dhcp-hostname-flags:               0x0 (none) 
 +ipv4.never-default:                     no 
 +ipv4.may-fail:                          yes 
 +ipv4.dad-timeout:                       -1 (default) 
 +ipv4.dhcp-vendor-class-identifier:      -- 
 +ipv4.dhcp-reject-servers:               -- 
 +------------------------------------------------------------------------------- 
 +ipv6.method:                            auto 
 +ipv6.dns:                               -- 
 +ipv6.dns-search:                        -- 
 +ipv6.dns-options:                       -- 
 +ipv6.dns-priority:                      0 
 +ipv6.addresses:                         -- 
 +ipv6.gateway:                           -- 
 +ipv6.routes:                            -- 
 +ipv6.route-metric:                      -1 
 +ipv6.route-table:                       0 (unspec) 
 +ipv6.routing-rules:                     -- 
 +ipv6.ignore-auto-routes:                no 
 +ipv6.ignore-auto-dns:                   no 
 +ipv6.never-default:                     no 
 +ipv6.may-fail:                          yes 
 +ipv6.ip6-privacy:                       -1 (unknown) 
 +ipv6.addr-gen-mode:                     stable-privacy 
 +ipv6.ra-timeout:                        0 (default) 
 +ipv6.dhcp-duid:                         -- 
 +ipv6.dhcp-iaid:                         -- 
 +ipv6.dhcp-timeout:                      0 (default) 
 +ipv6.dhcp-send-hostname:                yes 
 +ipv6.dhcp-hostname:                     -- 
 +ipv6.dhcp-hostname-flags:               0x0 (none) 
 +ipv6.token:                             -- 
 +------------------------------------------------------------------------------- 
 +proxy.method:                           none 
 +proxy.browser-only:                     no 
 +proxy.pac-url:                          -- 
 +proxy.pac-script:                       -- 
 +------------------------------------------------------------------------------- 
 +=============================================================================== 
 +      Activate connection details (0f48c74d-5d16-4c37-8220-24644507b589) 
 +=============================================================================== 
 +GENERAL.NAME:                           ip_fixe 
 +GENERAL.UUID:                           0f48c74d-5d16-4c37-8220-24644507b589 
 +GENERAL.DEVICES:                        ens18 
 +GENERAL.IP-IFACE:                       ens18 
 +GENERAL.STATE:                          activated 
 +GENERAL.DEFAULT:                        yes 
 +GENERAL.DEFAULT6:                       no 
 +GENERAL.SPEC-OBJECT:                    -- 
 +GENERAL.VPN:                            no 
 +GENERAL.DBUS-PATH:                      /org/freedesktop/NetworkManager/ActiveConnection/
 +GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/Settings/
 +GENERAL.ZONE:                           -- 
 +GENERAL.MASTER-PATH:                    -- 
 +------------------------------------------------------------------------------- 
 +IP4.ADDRESS[1]:                         10.0.2.46/24 
 +IP4.GATEWAY:                            10.0.2.1 
 +IP4.ROUTE[1]:                           dst = 10.0.2.0/24, nh = 0.0.0.0, mt = 100 
 +IP4.ROUTE[2]:                           dst = 0.0.0.0/0, nh = 10.0.2.1, mt = 100 
 +------------------------------------------------------------------------------- 
 +IP6.ADDRESS[1]:                         fe80::5223:aee1:998e:9f27/64 
 +IP6.GATEWAY:                            -- 
 +IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 100 
 +IP6.ROUTE[2]:                           dst = ff00::/8, nh = ::, mt = 256, table=255 
 +------------------------------------------------------------------------------- 
 +lines 83-127/127 (END) 
 +[q] 
 +</code> 
 + 
 +Pour consulter la liste profils associés à un périphérique, utilisez la commande suivante :
  
 <code> <code>
-[root@centos7 ~]# fdisk /dev/sdb +[root@centos8 ~]# nmcli -f CONNECTIONS device show ens18 
-Welcome to fdisk (util-linux 2.23.2).+CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/1,/org/freedesktop/NetworkManager/Settings/4 
 +CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   fc4a4d23-b15e-47a7-bcfa-b2e08f49553e | ens18 
 +CONNECTIONS.AVAILABLE-CONNECTIONS[2]:   0f48c74d-5d16-4c37-8220-24644507b589 | ip_fixe 
 +</code>
  
-Changes will remain in memory only, until you decide to write them. +Les fichiers de configuration pour le periphérique **ens18** se trouvent dans le répertoire **/etc/sysconfig/network-scripts/** :
-Be careful before using the write command.+
  
-Device does not contain a recognized partition table +<code> 
-Building a new DOS disklabel with disk identifier 0x88708329.+[root@centos8 ~]# ls -l /etc/sysconfig/network-scripts/ | grep ifcfg 
 +-rw-r--r--1 root root 417 Jun 16 06:39 ifcfg-ens18 
 +-rw-r--r--. 1 root root 326 Aug 29 03:58 ifcfg-ip_fixe 
 +</code>
  
-Command (m for help): n +====1.2 Résolution des Noms====
-Partition type: +
-     primary (0 primary, 0 extended, 4 free) +
-     extended +
-Select (default p): p +
-Partition number (1-4, default 1):  +
-First sector (2048-41943039, default 2048):  +
-Using default value 2048 +
-Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039):  +
-Using default value 41943039 +
-Partition 1 of type Linux and of size 20 GiB is set+
  
-Command (m for help)+L'étude du fichier **/etc/sysconfig/network-scripts/ifcfg-ip_fixe** démontre l'abscence de directives concernant les DNS :
-The partition table has been altered!+
  
-Calling ioctl() to re-read partition table+<code> 
-Syncing disks.+[root@centos8 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ip_fixe 
 +TYPE=Ethernet 
 +PROXY_METHOD=none 
 +BROWSER_ONLY=no 
 +BOOTPROTO=none 
 +IPADDR=10.0.2.46 
 +PREFIX=24 
 +GATEWAY=10.0.2.1 
 +DEFROUTE=yes 
 +IPV4_FAILURE_FATAL=no 
 +IPV6INIT=yes 
 +IPV6_AUTOCONF=yes 
 +IPV6_DEFROUTE=yes 
 +IPV6_FAILURE_FATAL=no 
 +IPV6_ADDR_GEN_MODE=stable-privacy 
 +NAME=ip_fixe 
 +UUID=0f48c74d-5d16-4c37-8220-24644507b589 
 +DEVICE=ens18 
 +ONBOOT=yes
 </code> </code>
  
-Créez maintenant un système de fichiers ext4 sur **/dev/sdb1** :+La résolution des noms est donc inactive :
  
 <code> <code>
-[root@centos7 ~]# mkfs.ext4 /dev/sdb1 +[root@centos8 ~]# ping www.free.fr 
-mke2fs 1.42.9 (28-Dec-2013) +pingwww.free.frName or service not known 
-Filesystem label= +</code>
-OS typeLinux +
-Block size=4096 (log=2) +
-Fragment size=4096 (log=2) +
-Stride=0 blocks, Stripe width=0 blocks +
-1310720 inodes, 5242624 blocks +
-262131 blocks (5.00%) reserved for the super user +
-First data block=0 +
-Maximum filesystem blocks=2153775104 +
-160 block groups +
-32768 blocks per group, 32768 fragments per group +
-8192 inodes per group +
-Superblock backups stored on blocks:  +
- 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,  +
- 4096000+
  
-Allocating group tablesdone                             +Modifiez donc la configuration du profil **ip_fixe** 
-Writing inode tables: done                             + 
-Creating journal (32768 blocks): done +<code> 
-Writing superblocks and filesystem accounting information: done +[root@centos8 ~]# nmcli connection mod ip_fixe ipv4.dns 8.8.8.8
 </code> </code>
  
-Montez **/dev/sdb1** sur /mnt :+L'étude du fichier **/etc/sysconfig/network-scripts/ifcfg-ip_fixe** démontre que la directive concernant le serveur DNS a été ajoutée :
  
 <code> <code>
-[root@centos7 ~]# mount /dev/sdb1 /mnt+[root@centos8 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ip_fixe 
 +TYPE=Ethernet 
 +PROXY_METHOD=none 
 +BROWSER_ONLY=no 
 +BOOTPROTO=none 
 +IPADDR=10.0.2.46 
 +PREFIX=24 
 +GATEWAY=10.0.2.1 
 +DEFROUTE=yes 
 +IPV4_FAILURE_FATAL=no 
 +IPV6INIT=yes 
 +IPV6_AUTOCONF=yes 
 +IPV6_DEFROUTE=yes 
 +IPV6_FAILURE_FATAL=no 
 +IPV6_ADDR_GEN_MODE=stable-privacy 
 +NAME=ip_fixe 
 +UUID=0f48c74d-5d16-4c37-8220-24644507b589 
 +DEVICE=ens18 
 +ONBOOT=yes 
 +DNS1=8.8.8.8
 </code> </code>
  
-Copiez le contenu de /home vers /mnt :+Afin que la modification du serveur DNS soit prise en compte, re-démarrez le service NetworkManager :
  
 <code> <code>
-[root@centos7 ~]# cp -/home//mnt+root@centos8 ~]# systemctl restart NetworkManager.service 
 +[root@centos8 ~]# systemctl status NetworkManager.service 
 +● NetworkManager.service Network Manager 
 +   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled) 
 +   Active: active (running) since Sun 2021-08-29 04:15:11 EDT; 8s ago 
 +     Docs: man:NetworkManager(8) 
 + Main PID: 973390 (NetworkManager) 
 +    Tasks: 4 (limit: 23535) 
 +   Memory: 4.6M 
 +   CGroup: /system.slice/NetworkManager.service 
 +           └─973390 /usr/sbin/NetworkManager --no-daemon 
 + 
 +Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.2235] device (ens18): state change: ip-check -> secondaries (reas> 
 +Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.2237] device (virbr0): state change: secondaries -> activated (re> 
 +Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.2241] manager: NetworkManager state is now CONNECTED_LOCAL 
 +Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.2251] policy: set 'ip_fixe' (ens18) as default for IPv4 routing a> 
 +Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.3090] device (virbr0): Activation: successful, device activated. 
 +Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.3098] device (ens18): state change: secondaries -> activated (rea> 
 +Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.3102] manager: NetworkManager state is now CONNECTED_SITE 
 +Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.3111] device (ens18): Activation: successful, device activated. 
 +Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.3116] manager: NetworkManager state is now CONNECTED_GLOBAL 
 +Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.3121] manager: startup complete 
 +lines 1-20/20 (END) 
 +[q]
 </code> </code>
  
-Démontez /dev/sdb1 et déplacez /home vers /root :+Vérifiez que le fichier **/etc/resolv.conf** ait été modifié par NetworkManager :
  
 <code> <code>
-[root@centos7 ~]# umount /mnt +[root@centos8 ~]# cat /etc/resolv.conf 
-[root@centos7 ~]mv /home /root+Generated by NetworkManager 
 +search ittraining.loc 
 +nameserver 8.8.8.8
 </code> </code>
  
-Identifiez l'UUID de /dev/sdb1 :+Dernièrement vérifiez la resolution des noms :
  
 <code> <code>
-[root@centos7 ~]# ls -l /dev/disk/by-uuid/ | grep sdb1 +[root@centos8 ~]# ping www.free.fr 
-lrwxrwxrwx. 1 root root 10  9 août  06:47 a5e2457f-7337-41f4-b958-e403eb419f94 -../../sdb1+PING www.free.fr (212.27.48.10) 56(84) bytes of data. 
 +64 bytes from www.free.fr (212.27.48.10): icmp_seq=ttl=47 time=29.3 ms 
 +64 bytes from www.free.fr (212.27.48.10)icmp_seq=2 ttl=47 time=29.4 ms 
 +64 bytes from www.free.fr (212.27.48.10): icmp_seq=3 ttl=47 time=29.4 ms 
 +64 bytes from www.free.fr (212.27.48.10): icmp_seq=4 ttl=47 time=29.4 ms 
 +^C 
 +--- www.free.fr ping statistics --
 +4 packets transmitted, 4 received, 0% packet loss, time 3005ms 
 +rtt min/avg/max/mdev = 29.266/29.377/29.428/0.183 ms
 </code> </code>
  
-Editez le fichier **/etc/fstab** :+<WRAP center round important 60%> 
 +**Important** : Notez qu'il existe un front-end graphique en mode texte, **nmtui**, pour configurer NetworkManager. 
 +</WRAP>
  
-<file txt /etc/fstab> +====1.3 Ajouter une Deuxième Adresse IP à un Profil====
-+
-# /etc/fstab +
-# Created by anaconda on Sat Apr 30 11:27:02 2016 +
-+
-# Accessible filesystems, by reference, are maintained under '/dev/disk' +
-# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info +
-+
-UUID=e65fe7da-cda8-4f5a-a827-1b5cabe94bed /                       xfs     defaults        0 0 +
-UUID=2d947276-66e8-41f4-8475-b64b67d7a249 /boot                   xfs     defaults        0 0 +
-UUID=3181601a-7295-4ef0-a92c-f21f76b18e64 swap                    swap    defaults        0 0 +
-UUID=a5e2457f-7337-41f4-b958-e403eb419f94 /home           ext4   defaults       1 2+
  
-</file>+Pour ajouter une deuxième adresse IP à un profil sous RHEL/CentOS 8, il convient d'utiliser la commande suivante :
  
-Créez le point de montage /home :+<code> 
 +[root@centos8 ~]# nmcli connection mod ip_fixe +ipv4.addresses 192.168.1.2/24 
 +</code> 
 + 
 +Rechargez la configuration du profil :
  
 <code> <code>
-[root@centos7 ~]# mkdir /home+[root@centos8 ~]# nmcli con up ip_fixe
 </code> </code>
  
-Montez /dev/sdb1 :+Saisissez ensuite la commande suivante :
  
 <code> <code>
-[root@centos7 ~]# mount -a +[root@centos8 ~]# nmcli connection show ip_fixe 
-[root@centos7 ~]# mount +connection.id:                          ip_fixe 
-sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel) +connection.uuid:                        0f48c74d-5d16-4c37-8220-24644507b589 
-proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) +connection.stable-id:                   -- 
-devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=236036k,nr_inodes=59009,mode=755+connection.type:                        802-3-ethernet 
-securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime+connection.interface-name:              ens18 
-tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel+connection.autoconnect:                 yes 
-devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000+connection.autoconnect-priority:        0 
-tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755+connection.autoconnect-retries:         -1 (default
-tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,seclabel,mode=755) +connection.multi-connect:               (default
-cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd) +connection.auth-retries:                -1 
-pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime+connection.timestamp:                   1630225792 
-cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu+connection.read-only:                   no 
-cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb+connection.permissions:                 -- 
-cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls+connection.zone:                        -- 
-cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset+connection.master:                      -- 
-cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer+connection.slave-type:                  -- 
-cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory+connection.autoconnect-slaves:          -1 (default
-cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio+connection.secondaries:                 -- 
-cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices+connection.gateway-ping-timeout:        0 
-cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event) +connection.metered:                     unknown 
-configfs on /sys/kernel/config type configfs (rw,relatime) +connection.lldp:                        default 
-/dev/sda2 on type xfs (rw,relatime,seclabel,attr2,inode64,noquota) +connection.mdns:                        -1 (default
-selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime) +connection.llmnr:                       -1 (default
-systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=300,minproto=5,maxproto=5,direct) +connection.wait-device-timeout:         -1 
-debugfs on /sys/kernel/debug type debugfs (rw,relatime) +802-3-ethernet.port:                    -- 
-hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel) +802-3-ethernet.speed:                   0 
-mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel) +802-3-ethernet.duplex:                  -- 
-tmpfs on /tmp type tmpfs (rw,seclabel) +802-3-ethernet.auto-negotiate:          no 
-sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) +802-3-ethernet.mac-address:             -- 
-nfsd on /proc/fs/nfsd type nfsd (rw,relatime) +802-3-ethernet.cloned-mac-address:      -- 
-/dev/sda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota) +802-3-ethernet.generate-mac-address-mask:-- 
-/dev/sdb1 on /home type ext4 (rw,relatime,seclabel,data=ordered) +802-3-ethernet.mac-address-blacklist:   -- 
-tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=50080k,mode=700,uid=1000,gid=1000)+802-3-ethernet.mtu:                     auto 
 +802-3-ethernet.s390-subchannels:        -- 
 +802-3-ethernet.s390-nettype:            -- 
 +802-3-ethernet.s390-options:            -- 
 +802-3-ethernet.wake-on-lan:             default 
 +802-3-ethernet.wake-on-lan-password:    -- 
 +ipv4.method:                            manual 
 +ipv4.dns:                               8.8.8.8 
 +ipv4.dns-search:                        -- 
 +ipv4.dns-options:                       -- 
 +ipv4.dns-priority:                      0 
 +ipv4.addresses:                         10.0.2.46/24192.168.1.2/24 
 +ipv4.gateway:                           10.0.2.1 
 +ipv4.routes:                            -- 
 +ipv4.route-metric:                      -1 
 +ipv4.route-table:                       (unspec
 +ipv4.routing-rules:                     -- 
 +ipv4.ignore-auto-routes:                no 
 +ipv4.ignore-auto-dns:                   no 
 +ipv4.dhcp-client-id:                    -- 
 +ipv4.dhcp-iaid:                         -- 
 +ipv4.dhcp-timeout:                      0 (default
 +ipv4.dhcp-send-hostname:                yes 
 +ipv4.dhcp-hostname:                     -- 
 +ipv4.dhcp-fqdn:                         -- 
 +ipv4.dhcp-hostname-flags:               0x0 (none
 +ipv4.never-default:                     no 
 +ipv4.may-fail:                          yes 
 +ipv4.dad-timeout:                       -1 (default
 +ipv4.dhcp-vendor-class-identifier:      -- 
 +ipv4.dhcp-reject-servers:               -- 
 +ipv6.method:                            auto 
 +ipv6.dns:                               -- 
 +ipv6.dns-search:                        -- 
 +ipv6.dns-options:                       -- 
 +ipv6.dns-priority:                      0 
 +ipv6.addresses:                         -- 
 +ipv6.gateway:                           -- 
 +ipv6.routes:                            -- 
 +ipv6.route-metric:                      -1 
 +ipv6.route-table:                       (unspec
 +ipv6.routing-rules:                     -- 
 +ipv6.ignore-auto-routes:                no 
 +ipv6.ignore-auto-dns:                   no 
 +ipv6.never-default:                     no 
 +ipv6.may-fail:                          yes 
 +ipv6.ip6-privacy:                       -1 (unknown
 +ipv6.addr-gen-mode:                     stable-privacy 
 +ipv6.ra-timeout:                        0 (default
 +ipv6.dhcp-duid:                         -- 
 +ipv6.dhcp-iaid:                         -- 
 +ipv6.dhcp-timeout:                      0 (default
 +ipv6.dhcp-send-hostname:                yes 
 +ipv6.dhcp-hostname:                     -- 
 +ipv6.dhcp-hostname-flags:               0x0 (none
 +ipv6.token:                             -- 
 +proxy.method:                           none 
 +proxy.browser-only:                     no 
 +proxy.pac-url:                          -- 
 +proxy.pac-script:                       -- 
 +GENERAL.NAME:                           ip_fixe 
 +GENERAL.UUID:                           0f48c74d-5d16-4c37-8220-24644507b589 
 +GENERAL.DEVICES:                        ens18 
 +GENERAL.IP-IFACE:                       ens18 
 +GENERAL.STATE:                          activated 
 +GENERAL.DEFAULT:                        yes 
 +GENERAL.DEFAULT6:                       no 
 +GENERAL.SPEC-OBJECT:                    -- 
 +GENERAL.VPN:                            no 
 +GENERAL.DBUS-PATH:                      /org/freedesktop/NetworkManager/ActiveConnection/3 
 +GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/Settings/2 
 +GENERAL.ZONE:                           -- 
 +GENERAL.MASTER-PATH:                    -- 
 +IP4.ADDRESS[1]:                         10.0.2.46/24 
 +IP4.ADDRESS[2]:                         192.168.1.2/24 
 +IP4.GATEWAY:                            10.0.2.1 
 +IP4.ROUTE[1]:                           dst = 10.0.2.0/24nh 0.0.0.0mt 100 
 +IP4.ROUTE[2]:                           dst = 192.168.1.0/24nh 0.0.0.0mt 100 
 +IP4.ROUTE[3]:                           dst 0.0.0.0/0nh = 10.0.2.1mt = 100 
 +IP4.DNS[1]:                             8.8.8.8 
 +IP6.ADDRESS[1]:                         fe80::5223:aee1:998e:9f27/64 
 +IP6.GATEWAY:                            -- 
 +IP6.ROUTE[1]:                           dst = fe80::/64nh = ::mt = 100 
 +IP6.ROUTE[2]:                           dst = ff00::/8nh = ::mt = 256table=255 
 +lines 72-116/116 (END) 
 +[q]
 </code> </code>
  
-Notez la taille de /home :+<WRAP center round important 60%> 
 +**Important** : Notez l'ajout de l'adresse secondaire à la ligne **ipv4.addresses: ** ainsi que l'ajout de la ligne **IP4.ADDRESS[2]:**. 
 +</WRAP> 
 + 
 +Consultez maintenant le contenu du fichier **/etc/sysconfig/network-scripts/ifcfg-ip_fixe** :
  
 <code> <code>
-[trainee@centos7 ~]$ df -h +[root@centos8 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ip_fixe 
-Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur +TYPE=Ethernet 
-/dev/sda2          9,8G    4,4G  5,5G  45% / +PROXY_METHOD=none 
-devtmpfs           231M        231M   0% /dev +BROWSER_ONLY=no 
-tmpfs              245M        245M   0% /dev/shm +BOOTPROTO=none 
-tmpfs              245M    4,7M  240M   2% /run +IPADDR=10.0.2.46 
-tmpfs              245M        245M   0% /sys/fs/cgroup +PREFIX=24 
-tmpfs              245M     72K  245M   1% /tmp +GATEWAY=10.0.2.
-/dev/sda1          197M    197M   20K 100% /boot +DEFROUTE=yes 
-/dev/sdb1           20G     65M   19G   1% /home +IPV4_FAILURE_FATAL=no 
-tmpfs               49M         49M   0% /run/user/1000+IPV6INIT=yes 
 +IPV6_AUTOCONF=yes 
 +IPV6_DEFROUTE=yes 
 +IPV6_FAILURE_FATAL=no 
 +IPV6_ADDR_GEN_MODE=stable-privacy 
 +NAME=ip_fixe 
 +UUID=0f48c74d-5d16-4c37-8220-24644507b589 
 +DEVICE=ens18 
 +ONBOOT=yes 
 +DNS1=8.8.8.8 
 +IPADDR1=192.168.1.2 
 +PREFIX1=24
 </code> </code>
  
-<WRAP center round todo+<WRAP center round important 60%
-Fermez la session de root et connectez-vous en tant que trainee.+**Important** : Notez l'ajout de la ligne **IPADDR1=192.168.1.2**.
 </WRAP> </WRAP>
  
-====Créer un Nouveau Noyau====+====1.4 - La Commande hostname====
  
-Pour créer l'arborescence de l'environnement de création de paquets dans /home/trainee, utilisez la commande **rpmdev-setuptree** :+La procédure de la modification du hostname est simplifiée et sa prise en compte est immédiate :
  
 <code> <code>
-[trainee@centos7 ~]$ rpmdev-setuptree +[root@centos8 ~]# hostname 
-[trainee@centos7 ~]$ ls -laR rpmbuild/ +centos8.ittraining.loc
-rpmbuild/: +
-total 28 +
-drwxrwxr-x 7 trainee trainee 4096  9 août  06:56 . +
-drwx------. 15 trainee trainee 4096  9 août  06:56 .. +
-drwxrwxr-x.  2 trainee trainee 4096  9 août  06:56 BUILD +
-drwxrwxr-x.  2 trainee trainee 4096  9 août  06:56 RPMS +
-drwxrwxr-x.  2 trainee trainee 4096  9 août  06:56 SOURCES +
-drwxrwxr-x.  2 trainee trainee 4096  9 août  06:56 SPECS +
-drwxrwxr-x 2 trainee trainee 4096  9 août  06:56 SRPMS+
  
-rpmbuild/BUILD: +[root@centos8 ~]# nmcli general hostname centos.ittraining.loc
-total 8 +
-drwxrwxr-x. 2 trainee trainee 4096  9 août  06:56 . +
-drwxrwxr-x. 7 trainee trainee 4096  9 août  06:56 ..+
  
-rpmbuild/RPMS: +[root@centos8 ~]# cat /etc/hostname 
-total 8 +centos.ittraining.loc
-drwxrwxr-x. 2 trainee trainee 4096  9 août  06:56 . +
-drwxrwxr-x. 7 trainee trainee 4096  9 août  06:56 ..+
  
-rpmbuild/SOURCES: +[root@centos8 ~]# hostname 
-total 8 +centos.ittraining.loc
-drwxrwxr-x. 2 trainee trainee 4096  9 août  06:56 . +
-drwxrwxr-x. 7 trainee trainee 4096  9 août  06:56 ..+
  
-rpmbuild/SPECS: +[root@centos8 ~]# nmcli general hostname centos8.ittraining.loc
-total 8 +
-drwxrwxr-x. 2 trainee trainee 4096  9 août  06:56 . +
-drwxrwxr-x. 7 trainee trainee 4096  9 août  06:56 ..+
  
-rpmbuild/SRPMS: +[root@centos8 ~]# cat /etc/hostname 
-total 8 +centos8.ittraining.loc 
-drwxrwxr-x2 trainee trainee 4096  9 août  06:56 + 
-drwxrwxr-x. 7 trainee trainee 4096  9 août  06:56 ..+[root@centos8 ~]# hostname 
 +centos8.ittraining.loc
 </code> </code>
  
-Téléchargez le rpm source du noyau :+====1.5 - La Commande ip==== 
 + 
 +Sous RHEL/CentOS 8 la commande **ip** est préférée par rapport à la commande ifconfig :
  
 <code> <code>
-[trainee@centos7 ~]$ uname -a +[root@centos8 ~]# ip address 
-Linux centos7.fenestros.loc 3.10.0-327.13.1.el7.x86_64 #SMP Thu Mar 31 16:04:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux+1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 
 +    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 
 +    inet 127.0.0.1/8 scope host lo 
 +       valid_lft forever preferred_lft forever 
 +    inet6 ::1/128 scope host  
 +       valid_lft forever preferred_lft forever 
 +2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 
 +    link/ether 4e:b1:31:bd:5d:b2 brd ff:ff:ff:ff:ff:ff 
 +    inet 10.0.2.46/24 brd 10.0.2.255 scope global noprefixroute ens18 
 +       valid_lft forever preferred_lft forever 
 +    inet 192.168.1.2/24 brd 192.168.1.255 scope global noprefixroute ens18 
 +       valid_lft forever preferred_lft forever 
 +    inet6 fe80::5223:aee1:998e:9f27/64 scope link noprefixroute  
 +       valid_lft forever preferred_lft forever 
 +3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000 
 +    link/ether 52:54:00:79:02:66 brd ff:ff:ff:ff:ff:ff 
 +    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0 
 +       valid_lft forever preferred_lft forever 
 +4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000 
 +    link/ether 52:54:00:79:02:66 brd ff:ff:ff:ff:ff:ff 
 +</code>
  
-[trainee@centos7 ~]$ wget http://vault.centos.org/7.2.1511/updates/Source/SPackages/kernel-3.10.0-327.13.1.el7.src.rpm +===Options de la Commande ip===
---2016-08-09 06:57:08--  http://vault.centos.org/7.2.1511/updates/Source/SPackages/kernel-3.10.0-327.13.1.el7.src.rpm +
-Résolution de vault.centos.org (vault.centos.org)... 88.208.217.170, 2a00:f10:10b:13::10 +
-Connexion vers vault.centos.org (vault.centos.org)|88.208.217.170|:80...connecté. +
-requête HTTP transmise, en attente de la réponse...200 OK +
-Longueur: 83047820 (79M) [application/x-rpm] +
-Sauvegarde en : «kernel-3.10.0-327.13.1.el7.src.rpm»+
  
-100%[==============================================================================================================================>] 83 047 820   496KB/  ds 2m 52s +Les options de cette commande sont :
  
-2016-08-09 07:00:00 (471 KB/s«kernel-3.10.0-327.13.1.el7.src.rpm» sauvegardé [83047820/83047820]+<code> 
 +[root@centos8 ~]# ip --help 
 +Usageip [ OPTIONS ] OBJECT { COMMAND | help } 
 +       ip [ -force ] -batch filename 
 +where  OBJECT := { link | address | addrlabel | route | rule | neigh | ntable | 
 +                   tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm | 
 +                   netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila | 
 +                   vrf | sr | nexthop | mptcp } 
 +       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] | 
 +                    -h[uman-readable] | -iec | -j[son] | -p[retty] | 
 +                    -f[amily] { inet | inet6 | mpls | bridge | link } | 
 +                    -4 | -6 | -I | -D | -M | -B | -0 
 +                    -l[oops] { maximum-addr-flush-attempts } | -br[ief] | 
 +                    -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] | 
 +                    -rc[vbuf] [size] | -n[etns] name | -N[umeric] | -a[ll] | 
 +                    -c[olor]}
  
 </code> </code>
  
-Installez maintenant les dépendances pour le rpm source en tant que root :+====1.6 - Activer/Désactiver une Interface Manuellement==== 
 + 
 +Deux commandes existent pour désactiver et activer manuellement une interface réseau :
  
 <code> <code>
-[trainee@centos7 ~]$ su - +# nmcli device disconnect enp0s3 
-Mot de passe : fenestros +nmcli device connect enp0s3 
-[root@centos7 ~]yum-builddep /home/trainee/kernel-3.10.0-327.13.1.el7.src.rpm  +</code>
-Loaded plugins: fastestmirror, langpacks +
-Enabling base-source repository +
-Enabling extras-source repository +
-Enabling updates-source repository +
-base-source                                                                                                                                      | 2.9 kB  00:00:00      +
-extras-source                                                                                                                                    | 2.9 kB  00:00:00      +
-updates-source                                                                                                                                   | 2.9 kB  00:00:00      +
-(1/3): extras-source/7/primary_db                                                                                                                |  43 kB  00:00:00      +
-(2/3): base-source/7/primary_db                                                                                                                  | 949 kB  00:00:00      +
-(3/3): updates-source/7/primary_db                                                                                                               | 140 kB  00:00:00      +
-Loading mirror speeds from cached hostfile +
- * base: centos.mirrors.ovh.net +
- * extras: centos.mirror.fr.planethoster.net +
- * updates: mirror1.evolution-host.com +
-Checking for new repos for mirrors +
-Getting requirements for kernel-3.10.0-327.13.1.el7.src +
- --> Already installed : kmod-20-5.el7.x86_64 +
- --> Already installed : patch-2.7.1-8.el7.x86_64 +
- --> Already installed : bash-4.2.46-19.el7.x86_64 +
- --> Already installed : coreutils-8.22-15.el7_2.1.x86_64 +
- --> Already installed : 2:tar-1.26-29.el7.x86_64 +
- --> Already installed : xz-5.1.2-12alpha.el7.x86_64 +
- --> Already installed : 1:findutils-4.5.11-5.el7.x86_64 +
- --> Already installed : gzip-1.5-8.el7.x86_64 +
- --> m4-1.4.16-10.el7.x86_64 +
- --> Already installed : 4:perl-5.16.3-286.el7.x86_64 +
- --> Already installed : 1:make-3.82-21.el7.x86_64 +
- --> Already installed : diffutils-3.3-4.el7.x86_64 +
- --> Already installed : gawk-4.0.2-4.el7.x86_64 +
- --> Already installed : gcc-4.8.5-4.el7.x86_64 +
- --> Already installed : binutils-2.23.52.0.1-55.el7.x86_64 +
- --> Already installed : redhat-rpm-config-9.1.0-68.el7.centos.noarch +
- --> Already installed : hostname-3.13-3.el7.x86_64 +
- --> Already installed : net-tools-2.0-0.17.20131004git.el7.x86_64 +
- --> Already installed : bc-1.06.95-13.el7.x86_64 +
- --> xmlto-0.0.25-7.el7.x86_64 +
- --> asciidoc-8.6.8-5.el7.noarch +
- --> Already installed : 1:openssl-1.0.1e-51.el7_2.4.x86_64 +
- --> hmaccalc-0.9.13-4.el7.x86_64 +
- --> python-devel-2.7.5-34.el7.x86_64 +
- --> newt-devel-0.52.15-4.el7.x86_64 +
- --> perl-ExtUtils-Embed-1.30-286.el7.noarch +
- --> Already installed : rpm-build-4.11.3-17.el7.x86_64 +
- --> Already installed : elfutils-0.163-3.el7.x86_64 +
---> Running transaction check +
----> Package asciidoc.noarch 0:8.6.8-5.el7 will be installed +
---> Processing Dependency: source-highlight for package: asciidoc-8.6.8-5.el7.noarch +
---> Processing Dependency: graphviz for package: asciidoc-8.6.8-5.el7.noarch +
---> Processing Dependency: docbook-style-xsl for package: asciidoc-8.6.8-5.el7.noarch +
----> Package hmaccalc.x86_64 0:0.9.13-4.el7 will be installed +
----> Package m4.x86_64 0:1.4.16-10.el7 will be installed +
----> Package newt-devel.x86_64 0:0.52.15-4.el7 will be installed +
---> Processing Dependency: slang-devel for package: newt-devel-0.52.15-4.el7.x86_64 +
----> Package perl-ExtUtils-Embed.noarch 0:1.30-286.el7 will be installed +
---> Processing Dependency: perl-devel for package: perl-ExtUtils-Embed-1.30-286.el7.noarch +
----> Package python-devel.x86_64 0:2.7.5-34.el7 will be installed +
----> Package xmlto.x86_64 0:0.0.25-7.el7 will be installed +
---> Processing Dependency: text-www-browser for package: xmlto-0.0.25-7.el7.x86_64 +
---> Processing Dependency: flex for package: xmlto-0.0.25-7.el7.x86_64 +
---> Processing Dependency: docbook-dtds for package: xmlto-0.0.25-7.el7.x86_64 +
---> Running transaction check +
----> Package docbook-dtds.noarch 0:1.0-60.el7 will be installed +
---> Processing Dependency: sgml-common for package: docbook-dtds-1.0-60.el7.noarch +
----> Package docbook-style-xsl.noarch 0:1.78.1-3.el7 will be installed +
----> Package flex.x86_64 0:2.5.37-3.el7 will be installed +
----> Package graphviz.x86_64 0:2.30.1-19.el7 will be installed +
---> Processing Dependency: libXaw.so.7()(64bit) for package: graphviz-2.30.1-19.el7.x86_64 +
----> Package lynx.x86_64 0:2.8.8-0.3.dev15.el7 will be installed +
----> Package perl-devel.x86_64 4:5.16.3-286.el7 will be installed +
---> Processing Dependency: systemtap-sdt-devel for package: 4:perl-devel-5.16.3-286.el7.x86_64 +
---> Processing Dependency: perl(ExtUtils::ParseXS) for package: 4:perl-devel-5.16.3-286.el7.x86_64 +
---> Processing Dependency: perl(ExtUtils::MakeMaker) for package: 4:perl-devel-5.16.3-286.el7.x86_64 +
---> Processing Dependency: perl(ExtUtils::Installed) for package: 4:perl-devel-5.16.3-286.el7.x86_64 +
---> Processing Dependency: libdb-devel for package: 4:perl-devel-5.16.3-286.el7.x86_64 +
---> Processing Dependency: gdbm-devel for package: 4:perl-devel-5.16.3-286.el7.x86_64 +
----> Package slang-devel.x86_64 0:2.2.4-11.el7 will be installed +
----> Package source-highlight.x86_64 0:3.1.6-6.el7 will be installed +
---> Processing Dependency: ctags for package: source-highlight-3.1.6-6.el7.x86_64 +
---> Processing Dependency: libboost_regex.so.1.53.0()(64bit) for package: source-highlight-3.1.6-6.el7.x86_64 +
---> Running transaction check +
----> Package boost-regex.x86_64 0:1.53.0-25.el7 will be installed +
----> Package ctags.x86_64 0:5.8-13.el7 will be installed +
----> Package gdbm-devel.x86_64 0:1.10-8.el7 will be installed +
----> Package libXaw.x86_64 0:1.0.12-5.el7 will be installed +
----> Package libdb-devel.x86_64 0:5.3.21-19.el7 will be installed +
----> Package perl-ExtUtils-Install.noarch 0:1.58-286.el7 will be installed +
----> Package perl-ExtUtils-MakeMaker.noarch 0:6.68-3.el7 will be installed +
---> Processing Dependency: perl(Test::Harness) for package: perl-ExtUtils-MakeMaker-6.68-3.el7.noarch +
---> Processing Dependency: perl(ExtUtils::Manifest) for package: perl-ExtUtils-MakeMaker-6.68-3.el7.noarch +
----> Package perl-ExtUtils-ParseXS.noarch 1:3.18-2.el7 will be installed +
----> Package sgml-common.noarch 0:0.6.3-39.el7 will be installed +
----> Package systemtap-sdt-devel.x86_64 0:2.8-10.el7 will be installed +
---> Running transaction check +
----> Package perl-ExtUtils-Manifest.noarch 0:1.61-244.el7 will be installed +
----> Package perl-Test-Harness.noarch 0:3.28-3.el7 will be installed +
---Finished Dependency Resolution+
  
-Dependencies Resolved+<WRAP center round important 60%> 
 +**Important** : Veuillez ne **PAS** exécuter ces deux commandes. 
 +</WRAP>
  
-======================================================================================================================================================================== +====1.7 - Routage Statique====
- Package                                           Arch                             Version                                        Repository                      Size +
-======================================================================================================================================================================== +
-Installing: +
- asciidoc                                          noarch                           8.6.8-5.el7                                    base                           251 k +
- hmaccalc                                          x86_64                           0.9.13-4.el7                                   base                            26 k +
- m4                                                x86_64                           1.4.16-10.el7                                  base                           256 k +
- newt-devel                                        x86_64                           0.52.15-4.el7                                  base                            51 k +
- perl-ExtUtils-Embed                               noarch                           1.30-286.el7                                   base                            49 k +
- python-devel                                      x86_64                           2.7.5-34.el7                                   base                           391 k +
- xmlto                                             x86_64                           0.0.25-7.el7                                   base                            50 k +
-Installing for dependencies: +
- boost-regex                                       x86_64                           1.53.0-25.el7                                  base                           294 k +
- ctags                                             x86_64                           5.8-13.el7                                     base                           155 k +
- docbook-dtds                                      noarch                           1.0-60.el7                                     base                           226 k +
- docbook-style-xsl                                 noarch                           1.78.1-3.el7                                   base                           2.0 M +
- flex                                              x86_64                           2.5.37-3.el7                                   base                           292 k +
- gdbm-devel                                        x86_64                           1.10-8.el7                                     base                            47 k +
- graphviz                                          x86_64                           2.30.1-19.el7                                  base                           1.3 M +
- libXaw                                            x86_64                           1.0.12-5.el7                                   base                           190 k +
- libdb-devel                                       x86_64                           5.3.21-19.el7                                  base                            38 k +
- lynx                                              x86_64                           2.8.8-0.3.dev15.el7                            base                           1.4 M +
- perl-ExtUtils-Install                             noarch                           1.58-286.el7                                   base                            73 k +
- perl-ExtUtils-MakeMaker                           noarch                           6.68-3.el7                                     base                           275 k +
- perl-ExtUtils-Manifest                            noarch                           1.61-244.el7                                   base                            31 k +
- perl-ExtUtils-ParseXS                             noarch                           1:3.18-2.el7                                   base                            77 k +
- perl-Test-Harness                                 noarch                           3.28-3.el7                                     base                           302 k +
- perl-devel                                        x86_64                           4:5.16.3-286.el7                               base                           452 k +
- sgml-common                                       noarch                           0.6.3-39.el7                                   base                            55 k +
- slang-devel                                       x86_64                           2.2.4-11.el7                                   base                            91 k +
- source-highlight                                  x86_64                           3.1.6-6.el7                                    base                           611 k +
- systemtap-sdt-devel                               x86_64                           2.8-10.el7                                     base                            65 k+
  
-Transaction Summary +===La commande ip===
-======================================================================================================================================================================== +
-Install  7 Packages (+20 Dependent packages)+
  
-Total download size: 9.0 +Sous RHEL/CentOS 8, pour supprimer la route vers le réseau 192.168.1.0 il convient d'utiliser la commande ip et non pas la commande route 
-Installed size43 M + 
-Is this ok [y/d/N]: y+<code> 
 +[root@centos8 ~]# ip route 
 +default via 10.0.2.1 dev ens18 proto static metric 100  
 +10.0.2.0/24 dev ens18 proto kernel scope link src 10.0.2.46 metric 100  
 +192.168.1.0/24 dev ens18 proto kernel scope link src 192.168.1.2 metric 100  
 +192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 
 + 
 +root@centos8 ~]# ip route del 192.168.1.0/24 via 0.0.0.0 
 +[root@centos8 ~]# ip route 
 +default via 10.0.2.1 dev ens18 proto static metric 100  
 +10.0.2.0/24 dev ens18 proto kernel scope link src 10.0.2.46 metric 100  
 +192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 
 </code> </code>
  
-Installez maintenant le paquet **kernel-3.10.0-327.13.1.el7.src.rpm** :+Pour ajouter la route vers le réseau 192.168.1.:
  
 <code> <code>
-[root@centos7 ~]# exit +[root@centos8 ~]# ip route add 192.168.1.0/24 via 10.0.2.1 
-logout +[root@centos8 ~]# ip route 
-[trainee@centos7 ~]$ rpm -Uvh kernel-3.10.0-327.13.1.el7.src.rpm  +default via 10.0.2.1 dev ens18 proto static metric 100  
-Mise à jour installation... +10.0.2.0/24 dev ens18 proto kernel scope link src 10.0.2.46 metric 100  
-   1:kernel-3.10.0-327.13.1.el7       ################################# [100%] +192.168.1.0/24 via 10.0.2.1 dev ens18  
-attention : utilisateur builder inexistant - utilisation de root +192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root +
-attention : utilisateur builder inexistant - utilisation de root +
-attention : groupe builder inexistant - utilisation de root+
 </code> </code>
  
-<WRAP center round important> +<WRAP center round important 60%
-Les erreurs sont sans importance.+**Important** - La commande utilisée pour ajouter une passerelle par défaut prend la forme suivante **ip route add default via //adresse ip//**.
 </WRAP> </WRAP>
  
-====Préparer l'Arborescence Source du Noyau====+===Désactiver/Activer le routage sur le serveur===
  
-Naviguez vers le repertoire **~/rpmbuild/SPECS** et utilisez la commande **rpmbuild** pour préparer l'arborescence source du noyau :+Pour désactiver le routage sur le serveur, il convient de désactiver la retransmission des paquets:
  
 <code> <code>
-[trainee@centos7 ~]$ cd ~/rpmbuild/SPECS +[root@centos8 ~]# cat /proc/sys/net/ipv4/ip_forward 
-[trainee@centos7 SPECS]$ rpmbuild -bp --target=$(uname -m) kernel.spec +1 
-Construction pour plate-formes cibles: x86_64 +[root@centos8 ~]# echo 0 /proc/sys/net/ipv4/ip_forward 
-Construction pour cible x86_64 +[root@centos8 ~]# cat /proc/sys/net/ipv4/ip_forward 
-erreur : Dépendances de construction manquantes: +0
- pesign >= 0.109-4 est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64 +
- elfutils-devel est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64 +
- binutils-devel est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64 +
- bison est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64 +
- audit-libs-devel est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64 +
- numactl-devel est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64 +
- pciutils-devel est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64+
 </code> </code>
  
-<WRAP center round important> +Pour activer le routage sur le serveur, il convient d'activer la retransmission des paquets:
-Notez qu'il existe toujours des dépendances manquantes ! +
-</WRAP> +
- +
-Redevenez root et installez les dépendances :+
  
 <code> <code>
-[trainee@centos7 SPECS]$ cd - +[root@centos8 ~]# echo 1 > /proc/sys/net/ipv4/ip_forward 
-/home/trainee +[root@centos8 ~]# cat /proc/sys/net/ipv4/ip_forward 
-[trainee@centos7 ~]$ su - +1
-Mot de passe :  +
-Dernière connexion : lundi  8 août 2016 à 16:39:54 CEST sur pts/0 +
-[root@centos7 ~]# yum install elfutils-devel binutils-devel bison audit-libs-devel numactl-devel pciutils-devel pesign +
-...+
 </code> </code>
  
-Vous pouvez maintenant utilisez la commande rpmbuild pour préparer l'arborescence source du noyau :+=====LAB #2 - Diagnostique du Réseau===== 
 + 
 +====2.1 - ping==== 
 + 
 +Pour tester l'accessibilité d'une machine, vous devez utiliser la commande **ping** :
  
 <code> <code>
-[root@centos7 ~]# exit +[root@centos8 ~]# ping -c4 10.0.2.1 
-logout +PING 10.0.2.1 (10.0.2.156(84) bytes of data
-[trainee@centos7 ~]$ cd ~/rpmbuild/SPECS +64 bytes from 10.0.2.1: icmp_seq=1 ttl=64 time=0.104 ms 
-[trainee@centos7 SPECS]$ rpmbuild -bp --target=$(uname -m) kernel.spec +64 bytes from 10.0.2.1: icmp_seq=2 ttl=64 time=0.325 ms 
-Construction pour plate-formes cibles: x86_64 +64 bytes from 10.0.2.1: icmp_seq=ttl=64 time=0.250 ms 
-Construction pour cible x86_64 +64 bytes from 10.0.2.1: icmp_seq=4 ttl=64 time=0.123 ms 
-Exécution_de(%prep: /bin/sh -e /var/tmp/rpm-tmp.xP6OkC + 
-+ umask 022 +--10.0.2.1 ping statistics --- 
-+ cd /home/trainee/rpmbuild/BUILD +4 packets transmitted, 4 received, 0% packet loss, time 3083ms 
-+ patch_command='patch -p1 -F1 -s' +rtt min/avg/max/mdev = 0.104/0.200/0.325/0.092 ms
-+ cd /home/trainee/rpmbuild/BUILD +
-+ rm -rf kernel-3.10.0-327.13.1.el7 +
-+ /usr/bin/mkdir -p kernel-3.10.0-327.13.1.el7 +
-+ cd kernel-3.10.0-327.13.1.el7 +
-+ /usr/bin/xz -dc /home/trainee/rpmbuild/SOURCES/linux-3.10.0-327.13.1.el7.tar.xz +
-/usr/bin/tar -xf - +
-...+
 </code> </code>
  
-A l'issu du processus, examinez l'arborescence :+===Options de la commande ping=== 
 + 
 +Les options de cette commande sont :
  
 <code> <code>
-[trainee@centos7 SPECS]$ ls -la ~/rpmbuild/BUILD/kernel-3.10.0-327.13.1.el7/linux-3.10.0-327.13.1.el7.x86_64/ +[root@centos8 ~]# ping --help 
-total 824 +pinginvalid option -- '-' 
-drwxr-xr-x.  24 trainee trainee   4096  8 août  16:52 . +Usageping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface] 
-drwxr-xr-x.   3 trainee trainee   4096  8 août  16:52 .. +            [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos] 
-drwxr-xr-x.  32 trainee trainee   4096  8 août  16:52 arch +            [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option] 
-drwxr-xr-x.   3 trainee trainee   4096 29 févr. 18:35 block +            [-w deadline] [-W timeout] [hop1 ...] destination 
--rw-r--r--.   1 trainee trainee 126411  8 août  16:52 .config +Usageping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface] 
--rw-r--r--.   1 trainee trainee 126420  8 août  16:52 .config.old +             [-l preload] [-m mark] [-M pmtudisc_option] 
-drwxr-xr-x.   2 trainee trainee   4096  8 août  16:52 configs +             [-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize] 
--rw-r--r--.   1 trainee trainee  18693 29 févr. 18:35 COPYING +             [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline] 
--rw-r--r--.   1 trainee trainee  95317 29 févr18:35 CREDITS +             [-W timeout] destination
-drwxr-xr-x  4 trainee trainee   4096 29 févr. 18:35 crypto +
-drwxr-xr-x. 101 trainee trainee  12288  8 août  16:52 Documentation +
-drwxr-xr-x. 114 trainee trainee   4096 29 févr. 18:35 drivers +
-drwxr-xr-x.  36 trainee trainee   4096  8 août  16:52 firmware +
-drwxr-xr-x.  74 trainee trainee   4096 29 févr. 18:35 fs +
--rw-r--r--.   1 trainee trainee     46 29 févr. 18:35 .gitattributes +
-drwxr-xr-x.  27 trainee trainee   4096  8 août  16:52 include +
-drwxr-xr-x.   2 trainee trainee   4096 29 févr. 18:35 init +
-drwxr-xr-x.   2 trainee trainee   4096 29 févr. 18:35 ipc +
--rw-r--r--.   1 trainee trainee   2536 29 févr. 18:35 Kbuild +
--rw-r--r--.   1 trainee trainee    505 29 févr. 18:35 Kconfig +
-drwxr-xr-x.  11 trainee trainee   4096  8 août  16:52 kernel +
-drwxr-xr-x.  10 trainee trainee   4096  8 août  16:52 lib +
--rw-r--r--.   1 trainee trainee   4465 29 févr. 18:35 .mailmap +
--rw-r--r--.   1 trainee trainee 260223 29 févr. 18:35 MAINTAINERS +
--rw-r--r--.   1 trainee trainee  49887 29 févr. 18:35 Makefile +
-drwxr-xr-x.   2 trainee trainee   4096 29 févr. 18:35 mm +
-drwxr-xr-x.  56 trainee trainee   4096 29 févr. 18:35 net +
--rw-r--r--.   1 trainee trainee  18736 29 févr. 18:35 README +
--rw-r--r--.   1 trainee trainee   7485 29 févr. 18:35 REPORTING-BUGS +
-drwxr-xr-x.  12 trainee trainee   4096 29 févr. 18:35 samples +
--rw-r--r--.   1 trainee trainee      0  8 août  16:52 .scmversion +
-drwxr-xr-x.  13 trainee trainee   4096  8 août  16:52 scripts +
-drwxr-xr-x.   9 trainee trainee   4096 29 févr. 18:35 security +
-drwxr-xr-x.  23 trainee trainee   4096 29 févr. 18:35 sound +
-drwxr-xr-x.  19 trainee trainee   4096 29 févr. 18:35 tools +
-drwxr-xr-x.   2 trainee trainee   4096  8 août  16:52 usr +
-drwxr-xr-x.   3 trainee trainee   4096 29 févr. 18:35 virt+
 </code> </code>
  
-A l'intérieur de ce répertoire se trouve le fichier .config utilisé pour compiler le noyau :+====2.2 - netstat -i==== 
 + 
 +Pour visualiser les statistiques réseaux, vous disposez de la commande **netstat** :
  
 <code> <code>
-[trainee@centos7 SPECS]$ more ~/rpmbuild/BUILD/kernel-3.10.0-327.13.1.el7/linux-3.10.0-327.13.1.el7.x86_64/.config +[root@centos8 ~]# netstat -i 
-+Kernel Interface table 
-# Automatically generated file; DO NOT EDIT. +Iface             MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg 
-# Linux/x86_64 3.10.0 Kernel Configuration +ens18            1500   476056      0      0 0        363562      0      0      0 BMRU 
-+lo              65536    10936      0      0 0         10936      0      0      0 LRU 
-CONFIG_64BIT=y +virbr0           1500        0      0      0 0                  0      0      0 BMU
-CONFIG_X86_64=y +
-CONFIG_X86=y +
-CONFIG_INSTRUCTION_DECODER=y +
-CONFIG_OUTPUT_FORMAT="elf64-x86-64" +
-CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" +
-CONFIG_LOCKDEP_SUPPORT=y +
-CONFIG_STACKTRACE_SUPPORT=y +
-CONFIG_HAVE_LATENCYTOP_SUPPORT=y +
-CONFIG_MMU=y +
-CONFIG_NEED_DMA_MAP_STATE=y +
-CONFIG_NEED_SG_DMA_LENGTH=y +
-CONFIG_GENERIC_ISA_DMA=y +
-CONFIG_GENERIC_BUG=y +
-CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y +
-CONFIG_GENERIC_HWEIGHT=y +
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y +
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y +
-CONFIG_GENERIC_CALIBRATE_DELAY=y +
-CONFIG_ARCH_HAS_CPU_RELAX=y +
-CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y +
-CONFIG_ARCH_HAS_CPU_AUTOPROBE=y +
-CONFIG_HAVE_SETUP_PER_CPU_AREA=y +
-CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y +
-CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y +
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y +
-CONFIG_ARCH_SUSPEND_POSSIBLE=y +
-CONFIG_ZONE_DMA32=y +
-CONFIG_AUDIT_ARCH=y +
-CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y +
-CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y +
-CONFIG_HAVE_INTEL_TXT=y +
-CONFIG_X86_64_SMP=y +
-CONFIG_X86_HT=y +
-CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11" +
-CONFIG_ARCH_SUPPORTS_UPROBES=y +
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +
-CONFIG_IRQ_WORK=y +
-CONFIG_BUILDTIME_EXTABLE_SORT=y +
- +
-+
---Plus--(1%)+
 </code> </code>
  
-Ce fichier est généré par une des trois commandes suivantes et ne doit **pas** être édité manuellement :+===Options de la commande netstat===
  
-  * make config +Les options de cette commande sont :
-  * make menuconfig +
-  * make xconfig+
  
-Dans ce fichier, vous pouvez constater la présence de lignes correspondantes à des fonctionalités suivies par une lettre ou une valeur. Dans le cas d'une lettre, la signification est la suivante :+<code> 
 +[root@centos8 ~]# netstat --help 
 +usagenetstat [-vWeenNcCF] [<Af>] -r         netstat {-V|--version|-h|--help} 
 +       netstat [-vWnNcaeol] [<Socket> ...] 
 +       netstat { [-vWeenNac] -I[<Iface>] | [-veenNac] -i | [-cnNe] -M | -s [-6tuw] } [delay]
  
-  * **y** +        -r, --route              display routing table 
-    * la fonctionalité est incluse dans le noyau monolithique ou dans le cas d'une dépendance d'un moduledans le module concerné+        -I--interfaces=<Iface> display interface table for <Iface> 
-  * **m** +        -i--interfaces         display interface table 
-    * la fonctionalité est incluse en tant que module+        -g, --groups             display multicast group memberships 
-  * **n** +        -s--statistics         display networking statistics (like SNMP) 
-    * la fonctionalité n'est pas incluse. Cette option est rarement visible car dans bien les casla fonctionalité est simplement commentée dans le fichier lui-même.+        -M, --masquerade         display masqueraded connections
  
-Le fichier **Makefile** contient le nom du noyau et spécifie les informations suivantes :+        -v, --verbose            be verbose 
 +        -W, --wide               don't truncate IP addresses 
 +        -n, --numeric            don't resolve names 
 +        --numeric-hosts          don't resolve host names 
 +        --numeric-ports          don't resolve port names 
 +        --numeric-users          don't resolve user names 
 +        -N, --symbolic           resolve hardware names 
 +        -e, --extend             display other/more information 
 +        -p, --programs           display PID/Program name for sockets 
 +        -o, --timers             display timers 
 +        -c, --continuous         continuous listing
  
-  * VERSION+        -l--listening          display listening server sockets 
-  * PATCHLEVEL+        -a--all                display all sockets (default: connected) 
-  * SUBLEVEL+        -F--fib                display Forwarding Information Base (default) 
-  * EXTRAVERSION.+        -C, --cache              display routing cache instead of FIB 
 +        -Z, --context            display SELinux security context for sockets
  
-Les trois premières informations sont gérées par **kernel.org** et Linus Torvalds en personne tandis que l'EXTRAVERSION est gérée par Red Hat :+  <Socket>={-t|--tcp} {-u|--udp} {-U|--udplite} {-S|--sctp} {-w|--raw} 
 +           {-x|--unix} --ax25 --ipx --netrom 
 +  <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: inet 
 +  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) 
 +</code> 
 + 
 +====2.3 - traceroute==== 
 + 
 +La commande ping est à la base de la commande **traceroute**. Cette commande sert à découvrir la route empruntée pour accéder à un site donné :
  
 <code> <code>
-[trainee@centos7 SPECS]$ more ~/rpmbuild/BUILD/kernel-3.10.0-327.13.1.el7/linux-3.10.0-327.13.1.el7.x86_64/Makefile  +[root@centos8 ~]# traceroute www.ittraining.network 
-VERSION = 3 +bash: traceroute: command not found... 
-PATCHLEVEL = 10 +Install package 'traceroute' to provide command 'traceroute'? [N/y] y
-SUBLEVEL = 0 +
-EXTRAVERSION = +
-NAME = Unicycling Gorilla +
-RHEL_MAJOR = 7 +
-RHEL_MINOR = 2 +
-RHEL_RELEASE = 327.13.1 +
-RHEL_DRM_VERSION = 4 +
-RHEL_DRM_PATCHLEVEL = 1 +
-RHEL_DRM_SUBLEVEL = 0+
  
-# *DOCUMENTATION* 
-# To see a list of typical targets execute "make help" 
-# More info can be located in ./README 
-# Comments in this file are targeted only to the developer, do not 
-# expect to learn how to build the kernel reading this file. 
  
-# Do not: + * Waiting in queue...  
-# o  use make's built-in rules and variables +The following packages have to be installed: 
-#    (this increases performance and avoids hard-to-debug behaviour); + traceroute-3:2.1.0-6.el8.x86_64        Traces the route taken by packets over an IPv4/IPv6 network 
-# o  print "Entering directory ..."; +Proceed with changes? [N/y] y
-MAKEFLAGS += -rR --no-print-directory+
  
-# Avoid funny character set dependencies 
-unexport LC_ALL 
-LC_COLLATE=C 
-LC_NUMERIC=C 
-export LC_COLLATE LC_NUMERIC 
  
-# We are using a recursive build, so we need to do a little thinking + * Waiting in queue...  
-# to get the ordering right+ * Waiting for authentication...  
-+ * Waiting in queue...  
-# Most importantly: sub-Makefiles should only ever modify files in + * Downloading packages...  
-# their own directoryIf in some directory we have a dependency on + * Requesting data...  
-# a file in another dir (which doesn't happen often, but it's often + * Testing changes...  
-# unavoidable when linking the built-in.o targets which finally + * Installing packages...  
-# turn into vmlinux), we will call a sub make in that other dirand +traceroute to www.ittraining.network (109.228.56.52), 30 hops max60 byte packets 
-# after that we are sure that everything which is in that other dir + 1  _gateway (10.0.2.1)  0.132 ms  0.101 ms  0.078 ms 
-# is now up to date+ 2  79.137.68.252 (79.137.68.252)  0.542 ms  0.656 ms  0.809 ms 
-# + 3  10.50.24.61 (10.50.24.61)  0.238 ms  0.219 ms 10.50.24.60 (10.50.24.60)  0.239 ms 
-# The only cases where we need to modify files which have global + 4  10.50.0.16 (10.50.0.16)  0.172 ms 10.50.0.22 (10.50.0.22)  0.194 ms  0.173 ms 
-# effects are thus separated out and done before the recursive + 5  10.73.248.192 (10.73.248.192)  0.766 ms 10.73.248.194 (10.73.248.194)  0.730 ms 10.73.248.192 (10.73.248.192)  0.757 ms 
-# descending is startedThey are now explicitly listed as the + 6  waw-wa2-sbb1-nc5.pl.eu (91.121.131.150)  1.102 ms  1.396 ms  1.099 ms 
-# prepare rule+ 7  fra-fr5-sbb1-nc5.de.eu (213.251.128.113)  18.309 ms fra-fr5-sbb2-nc5.de.eu (54.36.50.116)  21.881 ms fra-fr5-sbb1-nc5.de.eu (213.251.128.113)  16.764 ms 
---Plus--(2%)+ 8  10.200.0.6 (10.200.0.6)  20.922 ms 10.200.0.0 (10.200.0.0)  16.959 ms 10.200.0.4 (10.200.0.4)  21.143 ms 
 +  decix.bb-a.fra3.fra.de.oneandone.net (80.81.192.123)  18.789 ms decix.bb-c.act.fra.de.oneandone.net (80.81.193.123)  20.310 ms decix.bb-a.fra3.fra.de.oneandone.net (80.81.192.123)  18.693 ms 
 +10  ae-14.bb-b.fr7.fra.de.oneandone.net (212.227.120.149 22.222 ms  22.206 ms  22.257 ms 
 +11  port-channel-3.gw-ngcs-1.dc1.con.glo.gb.oneandone.net (88.208.255.131)  39.660 ms  39.679 ms ae-19.bb-b.thn.lon.gb.oneandone.net (212.227.120.33)  33.973 ms 
 +12  109.228.63.209 (109.228.63.209)  37.363 ms port-channel-3.gw-ngcs-1.dc1.con.glo.gb.oneandone.net (88.208.255.131)  39.534 ms 109.228.63.209 (109.228.63.209)  37.901 ms 
 +13  * 109.228.63.209 (109.228.63.209)  38.014 ms  37.991 ms 
 +14  * * * 
 +15  * * * 
 +16  * * * 
 +17  * * * 
 +18  * * * 
 +19  * * * 
 +20  * * * 
 +21  * * * 
 +22  * * * 
 +23  * * * 
 +24  * * * 
 +25  * * * 
 +26  * * * 
 +27  * * * 
 +28  * * * 
 +29  * * *^C
 </code> </code>
  
-<WRAP center round important> +===Options de la commande traceroute===
-La version 2.6 du noyau a vu le jour en **2003**. Les **SUBLEVEL** se suivaient régulièrement. Avec la version 2.6 du noyau, la valeur paire du **PATCHLEVEL** indiquait que le noyau était stable. Quand vous recompilez le noyau à partir des sources, vous devez modifier la valeur de l'EXTRAVERSION.  Le passage à la version 3.0 fut décidé par Linus Torvalds à l'occasion des 20 ans du noyau Linux. +
-</WRAP>+
  
-Utilisez maintenant la commande **make oldconfig** :+Les options de cette commande sont :
  
 <code> <code>
-[trainee@centos7 SPECS]$ cd ~/rpmbuild/BUILD/kernel-3.10.0-327.13.1.el7/linux-3.10.0-327.13.1.el7.x86_64 +[root@centos8 ~]# traceroute --help 
-[trainee@centos7 linux-3.10.0-327.13.1.el7.x86_64]$ make oldconfig +Usage: 
-scripts/kconfig/conf --oldconfig Kconfig +  traceroute [ -46dFITnreAUDV ] [ -f first_ttl ] [ -g gate,... ] [ -i device ] [ -m max_ttl ] [ -N squeries ] [ -p port ] [ -t tos ] [ -l flow_label ] [ -w MAX,HERE,NEAR ] [ -q nqueries ] [ -s src_addr ] [ -z sendwait ] [ --fwmark=num ] host [ packetlen ] 
-# +Options: 
-# configuration written to .config +  -4                          Use IPv4 
-#+  -6                          Use IPv6 
 +  -d  --debug                 Enable socket level debugging 
 +  -F  --dont-fragment         Do not fragment packets 
 +  -f first_ttl  --first=first_ttl 
 +                              Start from the first_ttl hop (instead from 1) 
 +  -g gate,...  --gateway=gate,..
 +                              Route packets through the specified gateway 
 +                              (maximum 8 for IPv4 and 127 for IPv6) 
 +  -I  --icmp                  Use ICMP ECHO for tracerouting 
 +  -T  --tcp                   Use TCP SYN for tracerouting (default port is 80) 
 +  -i device  --interface=device 
 +                              Specify a network interface to operate with 
 +  -m max_ttl  --max-hops=max_ttl 
 +                              Set the max number of hops (max TTL to be 
 +                              reached)Default is 30 
 +  -N squeries  --sim-queries=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        Set the destination port to useIt is either 
 +                              initial udp port value for "default" method 
 +                              (incremented by each probe, default is 33434), or 
 +                              initial seq for "icmp" (incremented as well, 
 +                              default from 1), or some constant destination 
 +                              port for other methods (with default of 80 for 
 +                              "tcp", 53 for "udp", etc.
 +  -t tos  --tos=tos           Set the TOS (IPv4 type of service) or TC (IPv6 
 +                              traffic class) value for outgoing packets 
 +  -l flow_label  --flowlabel=flow_label 
 +                              Use specified flow_label for IPv6 packets 
 +  -w MAX,HERE,NEAR  --wait=MAX,HERE,NEAR 
 +                              Wait for a probe no more than HERE (default 3) 
 +                              times longer than a response from the same hop, 
 +                              or no more than NEAR (default 10) times than some 
 +                              next hop, or MAX (default 5.0) seconds (float 
 +                              point values allowed too) 
 +  -q nqueries  --queries=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  --source=src_addr 
 +                              Use source src_addr for outgoing packets 
 +  -z sendwait  --sendwait=sendwait 
 +                              Minimal time interval between probes (default 0). 
 +                              If the value is more than 10, then it specifies a 
 +                              number in milliseconds, else it is a number of 
 +                              seconds (float point values allowed too) 
 +  -e  --extensions            Show ICMP extensions (if present), including MPLS 
 +  -A  --as-path-lookups       Perform AS path lookups in routing registries and 
 +                              print results directly after the corresponding 
 +                              addresses 
 +  -M name  --module=name      Use specified module (either builtin or external) 
 +                              for traceroute operationsMost methods have 
 +                              their shortcuts (`-I' means `-M icmp' etc.
 +  -O OPTS,...  --options=OPTS,... 
 +                              Use module-specific option OPTS for the 
 +                              traceroute module. Several OPTS allowed, 
 +                              separated by comma. If OPTS is "help", print info 
 +                              about available options 
 +  --sport=num                 Use source port num for outgoing packets. Implies 
 +                              `-N 1' 
 +  --fwmark=num                Set firewall mark for outgoing packets 
 +  -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                  Use DCCP Request for tracerouting (default port 
 +                              is 33434) 
 +  -P prot  --protocol=prot    Use raw packet of protocol prot for tracerouting 
 +  --mtu                       Discover MTU along the path being tracedImplies 
 +                              `-F -N 1' 
 +  --back                      Guess the number of hops in the backward path and 
 +                              print if it differs 
 +  -V  --version               Print version info and exit 
 +  --help                      Read this help and exit 
 + 
 +Arguments: 
 ++     host          The host to traceroute to 
 +      packetlen     The full packet length (default is the length of an IP 
 +                    header plus 40). Can be ignored or increased to a minimal 
 +                    allowed value
 </code> </code>
  
-<WRAP center round important> +=====LAB #3 - Connexions à Distance===== 
-Cette commande lit le fichier .config du noyau actuel et le compare avec celui des sources du noyau. S'il existent des nouvelles configurations à effectuer dans les sources du noyau, la commande vous pose des questions.+ 
 +==== 3.1 - Telnet ==== 
 + 
 +WRAP center round important> 
 +**Important** - Si la commande **telnet** n'est pas installée sous CentOS 8installez-le à l'aide de la commande **dnf install telnet** en tant que root.
 </WRAP> </WRAP>
  
-====Paramétrage du noyau====+La commande **telnet** est utilisée pour établir une connexion à distance avec un serveur telnet :
  
-Après avoir modifié la configuration du noyau selon vos besoins en utilisant soit la commande **menuconfig** soit la commande **xconfig** (pas necéssaire pour cet exemple), insérez la sortie de la commande **uname -i** sur la première ligne du fichier .config :+<file> 
 +  # telnet numero_ip 
 +</file>
  
-<code+<WRAP center round important 60%
-[trainee@centos7 linux-3.10.0-327.13.1.el7.x86_64]$ uname -i +**Important** Le service telnet revient à une redirection des canaux standards d'entrée et de sortieNotez que la connexion n'est **pas** sécuriséePour fermer la connexion, il faut saisir la commande **exit**La commande telnet n'offre pas de services de transfert de fichiersPour cela, il convient d'utiliser la command **ftp**
-x86_64 +</WRAP> 
-[trainee@centos7 linux-3.10.0-327.13.1.el7.x86_64]$ vi .config + 
-[trainee@centos7 linux-3.10.0-327.13.1.el7.x86_64]$ head .config +===Options de la commande telnet===
-# x86_64 +
-+
-# Automatically generated file; DO NOT EDIT. +
-# Linux/x86 3.10.0 Kernel Configuration +
-# +
-CONFIG_64BIT=+
-CONFIG_X86_64=+
-CONFIG_X86=+
-CONFIG_INSTRUCTION_DECODER=+
-CONFIG_OUTPUT_FORMAT="elf64-x86-64" +
-</code>+
  
-Renommez le fichier .config en le plaçant dans le répertoire **~/rpmbuild/SOURCES/** :+Les options de cette commande sont :
  
 <code> <code>
-[trainee@centos7 linux-3.10.0-327.13.1.el7.x86_64]$ cp .config ~/rpmbuild/SOURCES/config-`uname -m`-generic +[[root@centos8 ~]# telnet --help 
-[trainee@centos7 linux-3.10.0-327.13.1.el7.x86_64]$ ls ~/rpmbuild/SOURCES +telnet: invalid option -- '-' 
-centos.cer             cpupower.service            kernel-3.10.0-ppc64-debug.config    kernel-3.10.0-x86_64.config        Module.kabi_ppc64    x509.genkey +Usage: telnet [-4] [-6] [-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user] 
-centos-kpatch.x509     debrand-rh-i686-cpu.patch   kernel-3.10.0-ppc64le.config        kernel-3.10.0-x86_64-debug.config  Module.kabi_ppc64le +        [-n tracefile] [-b hostalias ] [-r]  
-centos-ldup.x509       debrand-rh_taint.patch      kernel-3.10.0-ppc64le-debug.config  kernel-abi-whitelists-327.tar.bz2  Module.kabi_s390x + [host-name [port]]
-check-kabi             debrand-single-cpu.patch    kernel-3.10.0-s390x.config          linux-3.10.0-327.13.1.el7.tar.xz   Module.kabi_x86_64 +
-config-x86_64-generic  extra_certificates          kernel-3.10.0-s390x-debug.config    linux-kernel-test.patch            secureboot.cer +
-cpupower.config        kernel-3.10.0-ppc64.config  kernel-3.10.0-s390x-kdump.config    Makefile.common                    sign-modules+
 </code> </code>
  
-<WRAP center round important> +==== 3.2 wget ====
-Pour un noyau 32 bits, remplacez **x86_64** par **i386** et **config-`uname -m`-generic** par **config-x86-32-generic**. +
-</WRAP>+
  
-Editez la directive **buildid** dans le fichier **~/rpmbuild/SPECS/kernel.spec** :+La commande **wget** est utilisée pour récupérer un fichier via http, https ou ftp 
  
 <code> <code>
-[trainee@centos7 linux-3.10.0-327.13.1.el7.x86_64]$ cd ~/rpmbuild/SPECS +[root@centos8 ~]# wget https://www.dropbox.com/s/lqtl47jpj2qu5od/wget_file.txt 
-[trainee@centos7 SPECS]$ vi kernel.spec +--2021-08-29 06:22:26--  https://www.dropbox.com/s/lqtl47jpj2qu5od/wget_file.txt 
-[trainee@centos7 SPECS]$ head kernel.spec  +Resolving www.dropbox.com (www.dropbox.com)... 162.125.67.18, 2620:100:6023:18::a27d:4312 
-# We have to override the new %%install behavior becausewell... the kernel is special+Connecting to www.dropbox.com (www.dropbox.com)|162.125.67.18|:443... connected. 
-%global __spec_install_pre %{___build_pre}+HTTP request sent, awaiting response... 301 Moved Permanently 
 +Location: /s/raw/lqtl47jpj2qu5od/wget_file.txt [following] 
 +--2021-08-29 06:22:27--  https://www.dropbox.com/s/raw/lqtl47jpj2qu5od/wget_file.txt 
 +Reusing existing connection to www.dropbox.com:443. 
 +HTTP request sent, awaiting response... 302 Found 
 +Location: https://uc8a5f475f4a5f849fd1055f560f.dl.dropboxusercontent.com/cd/0/inline/BVLLQHvou_Z6M6ahJQIL0h_F294OM7CU4q_am-_dpLy8Ifk66MQQSSe66akMc1yzJ_gMMBw0rHAsccFgTriPPpRvY9gMEBBB9FP3gyf2eT1b7SeonjZZshyppFw9-KxrWTJN_3bRB4Rx_t6DXaozZVnV/file# [following] 
 +--2021-08-29 06:22:27--  https://uc8a5f475f4a5f849fd1055f560f.dl.dropboxusercontent.com/cd/0/inline/BVLLQHvou_Z6M6ahJQIL0h_F294OM7CU4q_am-_dpLy8Ifk66MQQSSe66akMc1yzJ_gMMBw0rHAsccFgTriPPpRvY9gMEBBB9FP3gyf2eT1b7SeonjZZshyppFw9-KxrWTJN_3bRB4Rx_t6DXaozZVnV/file 
 +Resolving uc8a5f475f4a5f849fd1055f560f.dl.dropboxusercontent.com (uc8a5f475f4a5f849fd1055f560f.dl.dropboxusercontent.com)... 162.125.67.152620:100:6023:15::a27d:430f 
 +Connecting to uc8a5f475f4a5f849fd1055f560f.dl.dropboxusercontent.com (uc8a5f475f4a5f849fd1055f560f.dl.dropboxusercontent.com)|162.125.67.15|:443... connected
 +HTTP request sent, awaiting response... 200 OK 
 +Length: 46 [text/plain] 
 +Saving to: ‘wget_file.txt’
  
-Summary: The Linux kernel+wget_file.txt       100%[===================>     46  --.-KB/   in 0s      
  
-%define buildid .i2tch+2021-08-29 06:22:27 (26.9 MB/s) - ‘wget_file.txt’ saved [46/46]
  
-For a kernel released for public testing, released_kernel should be 1+[root@centos8 ~]cat wget_file.txt  
-# For internal testing builds during development, it should be 0. +This is a file retrieved by the wget command.
-%global released_kernel 1+
 </code> </code>
  
-====Compiler le Noyau====+===Options de la commande wget===
  
-La compilation du noyau peut prendre beaucoup de temps. La commande utilisée est la suivante :+Les options de cette commande sont :
  
 <code> <code>
-[trainee@centos7 SPECS]$ rpmbuild -bb --target=`uname -m` kernel.spec +[root@centos8 ~]# wget --help 
-</code>+GNU Wget 1.19.5, a non-interactive network retriever
 +Usage: wget [OPTION]... [URL]...
  
-A l'issu du processus, les rpm se trouvent dans le répertoire **/home/trainee/rpmbuild/RPMS/x86_64/** :+Mandatory arguments to long options are mandatory for short options too.
  
-<code> +Startup
-... +  -V,  --version                   display the version of Wget and exit 
-Vérification des fichiers non empaquetés /usr/lib/rpm/check-files /home/trainee/rpmbuild/BUILDROOT/kernel-3.10.0-327.13.1.el7.i2tch.x86_64 +  -h,  --help                      print this help 
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/kernel-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +  -b,  --background                go to background after startup 
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/kernel-headers-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +  -e,  --execute=COMMAND           execute a `.wgetrc'-style command
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/kernel-debuginfo-common-x86_64-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/perf-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/perf-debuginfo-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/python-perf-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/python-perf-debuginfo-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/kernel-tools-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/kernel-tools-libs-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/kernel-tools-libs-devel-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/kernel-tools-debuginfo-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/kernel-devel-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/kernel-debuginfo-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/kernel-debug-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/kernel-debug-devel-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Écrit : /home/trainee/rpmbuild/RPMS/x86_64/kernel-debug-debuginfo-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +
-Exécution_de(%clean) : /bin/sh -e /var/tmp/rpm-tmp.HNhcuC +
-+ umask 022 +
-+ cd /home/trainee/rpmbuild/BUILD +
-+ cd kernel-3.10.0-327.13.1.el7 +
-+ rm -rf /home/trainee/rpmbuild/BUILDROOT/kernel-3.10.0-327.13.1.el7.i2tch.x86_64 +
-+ exit 0 +
-</code>+
  
-Notez que la génération du nouveau noyau consommé plus de 9 Go d'espace disque :+Logging and input file: 
 +  -o,  --output-file=FILE          log messages to FILE 
 +  -a,  --append-output=FILE        append messages to FILE 
 +  -d,  --debug                     print lots of debugging information 
 +  -q,  --quiet                     quiet (no output) 
 +  -v,  --verbose                   be verbose (this is the default) 
 +  -nv, --no-verbose                turn off verboseness, without being quiet 
 +       --report-speed=TYPE         output bandwidth as TYPE.  TYPE can be bits 
 +  -i,  --input-file=FILE           download URLs found in local or external FILE 
 +       --input-metalink=FILE       download files covered in local Metalink FILE 
 +  -F,  --force-html                treat input file as HTML 
 +  -B,  --base=URL                  resolves HTML input-file links (-i -F) 
 +                                     relative to URL 
 +       --config=FILE               specify config file to use 
 +       --no-config                 do not read any config file 
 +       --rejected-log=FILE         log reasons for URL rejection to FILE
  
-<code> +Download: 
-[trainee@centos7 SPECS]$ df -h +  -t,  --tries=NUMBER              set number of retries to NUMBER (0 unlimits) 
-Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur +       --retry-connrefused         retry even if connection is refused 
-/dev/sda2          9,8G    4,3G  5,5G  44% / +       --retry-on-http-error=ERRORS    comma-separated list of HTTP errors to retry 
-devtmpfs           231M        231M   0% /dev +  -O,  --output-document=FILE      write documents to FILE 
-tmpfs              245M        245M   0% /dev/shm +  -nc, --no-clobber                skip downloads that would download to 
-tmpfs              245M    4,7M  240M   2% /run +                                     existing files (overwriting them) 
-tmpfs              245M        245M   0% /sys/fs/cgroup +       --no-netrc                  don't try to obtain credentials from .netrc 
-tmpfs              245M     40K  245M   1% /tmp +  -c,  --continue                  resume getting a partially-downloaded file 
-/dev/sdb1           20G    9,5G  9,2G  51% /home +       --start-pos=OFFSET          start downloading from zero-based position OFFSET 
-/dev/sda1          197M    197M   20K 100% /boot +       --progress=TYPE             select progress gauge type 
-tmpfs               49M       0   49M   0% /run/user/1000 +       --show-progress             display the progress bar in any verbosity mode 
-</code>+  -N,  --timestamping              don't re-retrieve files unless newer than 
 +                                     local 
 +       --no-if-modified-since      don't use conditional if-modified-since get 
 +                                     requests in timestamping mode 
 +       --no-use-server-timestamps  don't set the local file's timestamp by 
 +                                     the one on the server 
 +  -S,  --server-response           print server response 
 +       --spider                    don't download anything 
 +  -T,  --timeout=SECONDS           set all timeout values to SECONDS 
 +       --dns-timeout=SECS          set the DNS lookup timeout to SECS 
 +       --connect-timeout=SECS      set the connect timeout to SECS 
 +       --read-timeout=SECS         set the read timeout to SECS 
 +  -w,  --wait=SECONDS              wait SECONDS between retrievals 
 +       --waitretry=SECONDS         wait 1..SECONDS between retries of a retrieval 
 +       --random-wait               wait from 0.5*WAIT...1.5*WAIT secs between retrievals 
 +       --no-proxy                  explicitly turn off proxy 
 +  -Q,  --quota=NUMBER              set retrieval quota to NUMBER 
 +       --bind-address=ADDRESS      bind to ADDRESS (hostname or IP) on local host 
 +       --limit-rate=RATE           limit download rate to RATE 
 +       --no-dns-cache              disable caching DNS lookups 
 +       --restrict-file-names=OS    restrict chars in file names to ones OS allows 
 +       --ignore-case               ignore case when matching files/directories 
 +  -4,  --inet4-only                connect only to IPv4 addresses 
 +  -6,  --inet6-only                connect only to IPv6 addresses 
 +       --prefer-family=FAMILY      connect first to addresses of specified family, 
 +                                     one of IPv6, IPv4, or none 
 +       --user=USER                 set both ftp and http user to USER 
 +       --password=PASS             set both ftp and http password to PASS 
 +       --ask-password              prompt for passwords 
 +       --use-askpass=COMMAND       specify credential handler for requesting  
 +                                     username and password.  If no COMMAND is  
 +                                     specified the WGET_ASKPASS or the SSH_ASKPASS  
 +                                     environment variable is used. 
 +       --no-iri                    turn off IRI support 
 +       --local-encoding=ENC        use ENC as the local encoding for IRIs 
 +       --remote-encoding=ENC       use ENC as the default remote encoding 
 +       --unlink                    remove file before clobber 
 +       --keep-badhash              keep files with checksum mismatch (append .badhash) 
 +       --metalink-index=NUMBER     Metalink application/metalink4+xml metaurl ordinal NUMBER 
 +       --metalink-over-http        use Metalink metadata from HTTP response headers 
 +       --preferred-location        preferred location for Metalink resources 
 +       --xattr                     turn on storage of metadata in extended file attributes
  
-====Installer le Nouveau Noyau====+Directories: 
 +  -nd, --no-directories            don't create directories 
 +  -x,  --force-directories         force creation of directories 
 +  -nH, --no-host-directories       don't create host directories 
 +       --protocol-directories      use protocol name in directories 
 +  -P,  --directory-prefix=PREFIX   save files to PREFIX/.. 
 +       --cut-dirs=NUMBER           ignore NUMBER remote directory components
  
-Installez maintenant les deux paquets **kernel-devel** et **kernel-headers** :+HTTP options: 
 +       --http-user=USER            set http user to USER 
 +       --http-password=PASS        set http password to PASS 
 +       --no-cache                  disallow server-cached data 
 +       --default-page=NAME         change the default page name (normally 
 +                                     this is 'index.html'.) 
 +  -E,  --adjust-extension          save HTML/CSS documents with proper extensions 
 +       --ignore-length             ignore 'Content-Length' header field 
 +       --header=STRING             insert STRING among the headers 
 +       --compression=TYPE          choose compression, one of auto, gzip and none. (defaultnone) 
 +       --max-redirect              maximum redirections allowed per page 
 +       --proxy-user=USER           set USER as proxy username 
 +       --proxy-password=PASS       set PASS as proxy password 
 +       --referer=URL               include 'Referer: URL' header in HTTP request 
 +       --save-headers              save the HTTP headers to file 
 +  -U,  --user-agent=AGENT          identify as AGENT instead of Wget/VERSION 
 +       --no-http-keep-alive        disable HTTP keep-alive (persistent connections) 
 +       --no-cookies                don't use cookies 
 +       --load-cookies=FILE         load cookies from FILE before session 
 +       --save-cookies=FILE         save cookies to FILE after session 
 +       --keep-session-cookies      load and save session (non-permanent) cookies 
 +       --post-data=STRING          use the POST method; send STRING as the data 
 +       --post-file=FILE            use the POST method; send contents of FILE 
 +       --method=HTTPMethod         use method "HTTPMethod" in the request 
 +       --body-data=STRING          send STRING as data. --method MUST be set 
 +       --body-file=FILE            send contents of FILE. --method MUST be set 
 +       --content-disposition       honor the Content-Disposition header when 
 +                                     choosing local file names (EXPERIMENTAL) 
 +       --content-on-error          output the received content on server errors 
 +       --auth-no-challenge         send Basic HTTP authentication information 
 +                                     without first waiting for the server'
 +                                     challenge
  
-<code> +HTTPS (SSL/TLS) options: 
-[root@centos7 ~]# rpm -ivh /home/trainee/rpmbuild/RPMS/x86_64/kernel-devel-3.10.0-327.13.1.el7.i2tch.x86_64.rpm  +       --secure-protocol=PR        choose secure protocol, one of auto, SSLv2, 
-Preparing...                          ################################# [100%] +                                     SSLv3, TLSv1, TLSv1_1, TLSv1_2 and PFS 
-Updating / installing... +       --https-only                only follow secure HTTPS links 
-   1:kernel-devel-3.10.0-327.13.1.el7.################################# [100%] +       --no-check-certificate      don't validate the server's certificate 
-[root@centos7 ~]# rpm -ivh /home/trainee/rpmbuild/RPMS/x86_64/kernel-headers-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +       --certificate=FILE          client certificate file 
-Preparing...                          ################################# [100%] +       --certificate-type=TYPE     client certificate type, PEM or DER 
-Updating installing..+       --private-key=FILE          private key file 
-   1:kernel-headers-3.10.0-327.13.1.el################################# [100%] +       --private-key-type=TYPE     private key type, PEM or DER 
-</code>+       --ca-certificate=FILE       file with the bundle of CAs 
 +       --ca-directory=DIR          directory where hash list of CAs is stored 
 +       --crl-file=FILE             file with bundle of CRLs 
 +       --pinnedpubkey=FILE/HASHES  Public key (PEM/DER) file, or any number 
 +                                   of base64 encoded sha256 hashes preceded by 
 +                                   'sha256//' and separated by ';', to verify 
 +                                   peer against 
 + 
 +       --ciphers=STR           Set the priority string (GnuTLS) or cipher list string (OpenSSL) directly. 
 +                                   Use with careThis option overrides --secure-protocol
 +                                   The format and syntax of this string depend on the specific SSL/TLS engine
 +HSTS options: 
 +       --no-hsts                   disable HSTS 
 +       --hsts-file                 path of HSTS database (will override default)
  
-Installez en dernier le nouveau noyau avec la commande **rpm** :+FTP options: 
 +       --ftp-user=USER             set ftp user to USER 
 +       --ftp-password=PASS         set ftp password to PASS 
 +       --no-remove-listing         don't remove '.listing' files 
 +       --no-glob                   turn off FTP file name globbing 
 +       --no-passive-ftp            disable the "passive" transfer mode 
 +       --preserve-permissions      preserve remote file permissions 
 +       --retr-symlinks             when recursing, get linked-to files (not dir)
  
-<code> +FTPS options: 
-[root@centos7 ~]# rpm -ivh --force --nodeps /home/trainee/rpmbuild/RPMS/x86_64/kernel-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +       --ftps-implicit                 use implicit FTPS (default port is 990) 
-Preparing...                          ################################# [100%] +       --ftps-resume-ssl               resume the SSL/TLS session started in the control connection when 
- installing package kernel-3.10.0-327.13.1.el7.i2tch.x86_64 needs 30MB on the /boot filesystem+                                         opening a data connection 
 +       --ftps-clear-data-connection    cipher the control channel only; all the data will be in plaintext 
 +       --ftps-fallback-to-ftp          fall back to FTP if FTPS is not supported in the target server 
 +WARC options: 
 +       --warc-file=FILENAME        save request/response data to a .warc.gz file 
 +       --warc-header=STRING        insert STRING into the warcinfo record 
 +       --warc-max-size=NUMBER      set maximum size of WARC files to NUMBER 
 +       --warc-cdx                  write CDX index files 
 +       --warc-dedup=FILENAME       do not store records listed in this CDX file 
 +       --no-warc-compression       do not compress WARC files with GZIP 
 +       --no-warc-digests           do not calculate SHA1 digests 
 +       --no-warc-keep-log          do not store the log file in a WARC record 
 +       --warc-tempdir=DIRECTORY    location for temporary files created by the 
 +                                     WARC writer 
 + 
 +Recursive download: 
 +  -r,  --recursive                 specify recursive download 
 +  -l,  --level=NUMBER              maximum recursion depth (inf or for infinite) 
 +       --delete-after              delete files locally after downloading them 
 +  -k,  --convert-links             make links in downloaded HTML or CSS point to 
 +                                     local files 
 +       --convert-file-only         convert the file part of the URLs only (usually known as the basename) 
 +       --backups=N                 before writing file X, rotate up to N backup files 
 +  -K,  --backup-converted          before converting file X, back up as X.orig 
 +  -m,  --mirror                    shortcut for -N -r -l inf --no-remove-listing 
 +  -p,  --page-requisites           get all images, etcneeded to display HTML page 
 +       --strict-comments           turn on strict (SGML) handling of HTML comments 
 + 
 +Recursive accept/reject: 
 +  -A,  --accept=LIST               comma-separated list of accepted extensions 
 +  -R,  --reject=LIST               comma-separated list of rejected extensions 
 +       --accept-regex=REGEX        regex matching accepted URLs 
 +       --reject-regex=REGEX        regex matching rejected URLs 
 +       --regex-type=TYPE           regex type (posix) 
 +  -D,  --domains=LIST              comma-separated list of accepted domains 
 +       --exclude-domains=LIST      comma-separated list of rejected domains 
 +       --follow-ftp                follow FTP links from HTML documents 
 +       --follow-tags=LIST          comma-separated list of followed HTML tags 
 +       --ignore-tags=LIST          comma-separated list of ignored HTML tags 
 +  -H,  --span-hosts                go to foreign hosts when recursive 
 +  -L,  --relative                  follow relative links only 
 +  -I,  --include-directories=LIST  list of allowed directories 
 +       --trust-server-names        use the name specified by the redirection 
 +                                     URL's last component 
 +  -X,  --exclude-directories=LIST  list of excluded directories 
 +  -np, --no-parent                 don't ascend to the parent directory 
 + 
 +Email bug reports, questions, discussions to <bug-wget@gnu.org> 
 +and/or open issues at https://savannah.gnu.org/bugs/?func=additem&group=wget.
 </code> </code>
  
-<WRAP center round important> +==== 3.3 - ftp ==== 
-**Important** : Notez le message d'erreur concernant le manque d'espace disponible sur /boot.+ 
 +<WRAP center round important 60%
 +**Important** - Si la commande **ftp** n'est pas installée sous CentOS 8, installez-le à l'aide de la commande **dnf install ftp** en tant que root.
 </WRAP> </WRAP>
  
-Lister maintenant les noyaux installés :+La commande **ftp** est utilisée pour le transfert de fichiers. Une fois connecté, il convient d'utiliser la commande **help** pour afficher la liste des commandes disponibles :
  
 <code> <code>
-[root@centos7 ~]# rpm -qa | grep kernel-3 +ftp> help 
-kernel-3.10.0-327.el7.x86_64 +Commands may be abbreviated Commands are: 
-kernel-3.10.0-327.13.1.el7.x86_64+ 
 +! 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> 
 </code> </code>
  
-Un noyau se désinstalle comme tout autre paquet :+Le caractère **!** permet d'exécuter une commande sur la machine cliente
  
 <code> <code>
-[root@centos7 ~]# yum remove kernel-3.10.0-327.el7.x86_64 +ftp!pwd 
-Loaded plugins: fastestmirror, langpacks +/root 
-Resolving Dependencies +</code>
---Running transaction check +
----> Package kernel.x86_64 0:3.10.0-327.el7 will be erased +
---Finished Dependency Resolution+
  
-Dependencies Resolved+Pour transférer un fichier vers le serveur, il convient d'utiliser la commande **put** :
  
-======================================================================================================================================================================== +<file> 
- Package                            Arch                               Version                                      Repository                                     Size +ftp> put nom_fichier_local nom_fichier_distant 
-======================================================================================================================================================================== +</file>
-Removing: +
- kernel                             x86_64                             3.10.0-327.el7                               @base/$releasever                             136 M+
  
-Transaction Summary +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:
-======================================================================================================================================================================== +
-Remove  1 Package+
  
-Installed size: 136 M +<file> 
-Is this ok [y/N]: y +ftp> mput nom*.* 
-</code>+</file>
  
-Installez le nouveau noyau avec la commande **rpm** :+Pour transférer un fichier du serveur, il convient d'utiliser la commande **get** :
  
-<code+<file
-[root@centos7 ~]# rpm -ivh --force --nodeps /home/trainee/rpmbuild/RPMS/x86_64/kernel-3.10.0-327.13.1.el7.i2tch.x86_64.rpm +ftp> get nom_fichier 
-Preparing...                          ################################# [100%] +</file>
-Updating / installing... +
-   1:kernel-3.10.0-327.13.1.el7.i2tch ################################# [100%] +
-</code>+
  
-Lister maintenant les noyaux installés :+Vous pouvez également transférer plusieurs fichiers à la fois grâce à la commande **mget** ( voir la commande **mput** ci-dessus ).
  
-<code> +Pour supprimer un fichier sur le serveur, il convient d'utiliser la commande **del** :
-[root@centos7 ~]# rpm -qa | grep kernel-3 +
-kernel-3.10.0-327.13.1.el7.i2tch.x86_64 +
-kernel-3.10.0-327.13.1.el7.x86_64 +
-</code>+
  
-Constatez la création d'un nouveau grub.cfg :+<file> 
 +ftp> del nom_fichier 
 +</file> 
 + 
 +Pour fermer la session, il convient d'utiliser la commande **quit** :
  
 <code> <code>
-[root@centos7 ~]# grep i2tch /boot/grub2/grub.cfg +ftp> quit 
-menuentry 'CentOS Linux (3.10.0-327.13.1.el7.i2tch.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-e65fe7da-cda8-4f5a-a827-1b5cabe94bed'+[root@centos7 ~]# 
- linux16 /vmlinuz-3.10.0-327.13.1.el7.i2tch.x86_64 root=UUID=e65fe7da-cda8-4f5a-a827-1b5cabe94bed ro rhgb quiet LANG=en_GB.UTF-8 +
- initrd16 /initramfs-3.10.0-327.13.1.el7.i2tch.x86_64.img+
 </code> </code>
  
-<WRAP center round important> +====3.4 - SSH====
-**Important** : Re-démarrez votre VM en utilisant le nouveau noyau. +
-</WRAP>+
  
-Vérifiez ensuite l'utilisation du nouveau noyau :+===Présentation===
  
-<code> +La commande **[[wpfr>Ssh|ssh]]** est le successeur et la remplaçante de la commande **[[wpfr>Rlogin|rlogin]]**Il permet d'établir des connexions sécurisées avec une machine distanteSSH comporte cinq acteurs :
-[root@centos7 ~]# uname -r +
-3.10.0-327.13.1.el7.i2tch.x86_64 +
-</code>+
  
-=====Gestion des Quotas=====+  * Le **serveur SSH** 
 +    * le démon sshd, qui s'occupe des authentifications et autorisations des clients,  
 +  * Le **client SSH** 
 +    * ssh ou scp, qui assure la connexion et le dialogue avec le serveur, 
 +  * La **session** qui représente la connexion courante et qui commence juste après l'authentification réussie, 
 +  * Les **clefs** 
 +    * **Couple de clef utilisateur asymétriques** et persistantes qui assurent l'identité d'un utilisateur et qui sont stockés sur disque dur, 
 +    * **Clef hôte asymétrique et persistante** garantissant l'identité du serveur er qui est conservé sur disque dur 
 +    * **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.
  
-Sous Linux il est possible de mettre en place des quotas par utilisateur et par groupe. Ceci étant, Linux ne sait  pas gérer des quotas par répertoire, uniquement des  +SSH fonctionne de la manière suivante pour la la mise en place d'un canal sécurisé:
-quotas par partition. L'administrateur met souvent des quotas en place sur l'arborescence de /home pour limiter l'espace de stockage occupé par les utilisateurs.+
  
-Déconnectez-vous et reconnectez-vous en tant que root.+  * 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'identifie auprès du client en lui fournissant : 
 +    * 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 la clé hôte, la clé serveur et la séquence aléatoire, 
 +  * 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'algorithmes supportés, 
 +  * Le serveur déchiffre la clé de session, 
 +  * Le client et le serveur mettent en place le canal sécurisé.
  
-Avant de mettre en place des quotas, configurer SELINUX en mode **permissive** afin de ne pas avoir d'erreurs de ce dernier :+==SSH-1==
  
-<code> +SSH-1 utilise une paire de clefs de type RSA1. Il assure l'intégrité des données par une **[[wpfr>Contrôle_de_redondance_cyclique|Contrôle de Redondance Cyclique]]** (CRC) et est un bloc dit **monolithique**.
-[root@centos7 ~]# getenforce +
-Enforcing +
-[root@centos7 ~]# setenforce permissive +
-[root@centos7 ~]# getenforce +
-Permissive +
-</code>+
  
-Editez ensuite le fichier /etc/sysconfig/selinux ainsi :+Afin de s'identifier, le client essaie chacune des six méthodes suivantes :
  
-<code> +  * **Kerberos**, 
-[root@centos7 ~]# vi /etc/sysconfig/selinux +  * **Rhosts**, 
-[root@centos7 ~]# cat /etc/sysconfig/selinux+  * **%%RhostsRSA%%**, 
 +  * Par **clef asymétrique**, 
 +  * **TIS**, 
 +  * Par **mot de passe**.
  
-# This file controls the state of SELinux on the system. +==SSH-2==
-# SELINUXcan take one of these three values: +
-#     enforcing SELinux security policy is enforced. +
-#     permissive - SELinux prints warnings instead of enforcing. +
-#     disabled - No SELinux policy is loaded. +
-SELINUX=permissive +
-# SELINUXTYPE= can take one of three two values: +
-#     targeted - Targeted processes are protected, +
-#     minimum - Modification of targeted policy. Only selected processes are protected.  +
-#     mls - Multi Level Security protection. +
-SELINUXTYPE=targeted  +
-</code>+
  
-Commencez par vérifiez que le paquet **quota** est bien installé :+SSH-2 utilise **DSA** ou **RSA**. Il assure l'intégrité des données par l'algorithme **HMAC**. SSH-2 est organisé en trois **couches** : 
 + 
 +  * **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'authentification : 
 + 
 +  * Par **clef asymétrique**, 
 +    * Identique à SSH-1 sauf avec l'algorithme DSA, 
 +  * **%%RhostsRSA%%**, 
 +  * Par **mot de passe**. 
 + 
 +==Options de la commande== 
 + 
 +Les options de cette commande sont :
  
 <code> <code>
-[root@centos7 ~]# rpm -qa | grep quota +[root@centos8 ~]# ssh --help 
-quota-4.01-11.el7_2.1.x86_64 +unknown option -- - 
-quota-nls-4.01-11.el7_2.1.noarch+usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface] 
 +           [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] 
 +           [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11] 
 +           [-i identity_file] [-J [user@]host[:port]] [-L address] 
 +           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] 
 +           [-Q query_option] [-R address] [-S ctl_path] [-W host:port] 
 +           [-w local_tun[:remote_tun]] destination [command]
 </code> </code>
  
-Editez le fichier **/etc/fstab** en ajoutant les options **usrquota** et **grpquota** à la ligne **/home** :+===Authentification par mot de passe=== 
 + 
 +L'utilisateur fournit un mot de passe au client ssh. Le client ssh le transmet de façon sécurisée au serveur ssh puis  le serveur vérifie le mot de passe et l'accepte ou non. 
 + 
 +Avantage: 
 +  * Aucune configuration de clef asymétrique n'est nécessaire. 
 + 
 +Inconvénients: 
 +  * L'utilisateur doit fournir à chaque connexion un identifiant et un mot de passe, 
 +  * Moins sécurisé qu'un système par clef asymétrique. 
 + 
 +===Authentification par clef asymétrique=== 
 + 
 +  * Le **client** envoie au serveur une requête d'authentification par clé asymétrique qui contient le module de la clé à utiliser, 
 +  * Le **serveur** recherche une correspondance pour ce module dans le fichier des clés autorisés **~/.ssh/authorized_keys**
 +    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 de 256 bits appelée un **challenge** et la chiffre avec la **clé publique du client**
 +  * Le **client** reçoit le challenge et le décrypte avec la partie privée de sa clé. Il combine le challenge avec l'identifiant de session et chiffre le résultat. Ensuite il envoie le résultat chiffré au serveur. 
 +  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'authentification est réussie. 
 + 
 +===Configuration du Serveur=== 
 + 
 +La configuration du serveur s'effectue dans le fichier **/etc/ssh/sshd_config** :
  
 <code> <code>
-[root@centos7 ~]# vi /etc/fstab +[root@centos8 ~]# cat /etc/ssh/sshd_config 
-[root@centos7 ~]cat /etc/fstab+      $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
  
 +# This is the sshd server system-wide configuration file.  See
 +# sshd_config(5) for more information.
 +
 +# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
 +
 +# 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.  Uncommented options override the
 +# 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 #PORTNUMBER
 # #
-/etc/fstab +#Port 22 
-Created by anaconda on Sat Apr 30 11:27:02 2016 +#AddressFamily any 
-# +#ListenAddress 0.0.0.
-# Accessible filesystems, by reference, are maintained under '/dev/disk' +#ListenAddress ::
-# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info +
-+
-UUID=e65fe7da-cda8-4f5a-a827-1b5cabe94bed /                       xfs     defaults        0 0 +
-UUID=2d947276-66e8-41f4-8475-b64b67d7a249 /boot                   xfs     defaults        0 0 +
-UUID=3181601a-7295-4ef0-a92c-f21f76b18e64 swap                    swap    defaults        0 0 +
-UUID=a080ac6a-d15c-48e2-8461-a7b1aa3ebf1a /home   ext4    defaults,usrquota,grpquota        1 2 +
-</code>+
  
-Démontez puis remontez /home :+HostKey /etc/ssh/ssh_host_rsa_key 
 +HostKey /etc/ssh/ssh_host_ecdsa_key 
 +HostKey /etc/ssh/ssh_host_ed25519_key
  
-<code> +# Ciphers and keying 
-[root@centos7 ~]umount /home +#RekeyLimit default none 
-[root@centos7 ~]mount -a+ 
 +# This system is following system-wide crypto policy. The changes to 
 +# crypto properties (Ciphers, MACs, ...) will not have any effect here. 
 +# They will be overridden by command-line options passed to the server 
 +# on command line. 
 +# Please, check manual pages for update-crypto-policies(8) and sshd_config(5). 
 + 
 +# Logging 
 +#SyslogFacility AUTH 
 +SyslogFacility AUTHPRIV 
 +#LogLevel INFO 
 + 
 +# Authentication: 
 + 
 +#LoginGraceTime 2m 
 +PermitRootLogin yes 
 +#StrictModes yes 
 +#MaxAuthTries 6 
 +#MaxSessions 10 
 + 
 +#PubkeyAuthentication yes 
 + 
 +# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 
 +# but this is overridden so installations will only check .ssh/authorized_keys 
 +AuthorizedKeysFile      .ssh/authorized_keys 
 + 
 +#AuthorizedPrincipalsFile none 
 + 
 +#AuthorizedKeysCommand none 
 +#AuthorizedKeysCommandUser nobody 
 + 
 +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts 
 +#HostbasedAuthentication no 
 +# Change to yes if you don't trust ~/.ssh/known_hosts for 
 +HostbasedAuthentication 
 +#IgnoreUserKnownHosts no 
 +# Don't read the user's ~/.rhosts and ~/.shosts files 
 +#IgnoreRhosts yes 
 + 
 +# To disable tunneled clear text passwords, change to no here! 
 +#PasswordAuthentication yes 
 +#PermitEmptyPasswords no 
 +PasswordAuthentication yes 
 + 
 +# Change to no to disable s/key passwords 
 +#ChallengeResponseAuthentication yes 
 +ChallengeResponseAuthentication no 
 + 
 +# Kerberos options 
 +#KerberosAuthentication no 
 +#KerberosOrLocalPasswd yes 
 +#KerberosTicketCleanup yes 
 +#KerberosGetAFSToken no 
 +#KerberosUseKuserok yes 
 + 
 +# GSSAPI options 
 +GSSAPIAuthentication yes 
 +GSSAPICleanupCredentials no 
 +#GSSAPIStrictAcceptorCheck yes 
 +#GSSAPIKeyExchange no 
 +#GSSAPIEnablek5users no 
 + 
 +# Set this to 'yes' to enable PAM authentication, account processing, 
 +# and session processing. If this is enabled, PAM authentication will 
 +# be allowed through the ChallengeResponseAuthentication and 
 +# PasswordAuthentication.  Depending on your PAM configuration, 
 +# PAM authentication via ChallengeResponseAuthentication may bypass 
 +# the setting of "PermitRootLogin without-password"
 +# If you just want the PAM account and session checks to run without 
 +# PAM authentication, then enable this but set PasswordAuthentication 
 +# and ChallengeResponseAuthentication to 'no'
 +# WARNING: 'UsePAM no' is not supported in Fedora and may cause several 
 +# problems. 
 +UsePAM yes 
 + 
 +#AllowAgentForwarding yes 
 +#AllowTcpForwarding yes 
 +#GatewayPorts no 
 +X11Forwarding yes 
 +#X11DisplayOffset 10 
 +#X11UseLocalhost yes 
 +#PermitTTY yes 
 + 
 +# It is recommended to use pam_motd in /etc/pam.d/sshd instead of PrintMotd, 
 +# as it is more configurable and versatile than the built-in version. 
 +PrintMotd no 
 + 
 +#PrintLastLog yes 
 +#TCPKeepAlive yes 
 +#PermitUserEnvironment no 
 +#Compression delayed 
 +#ClientAliveInterval 0 
 +#ClientAliveCountMax 3 
 +#UseDNS no 
 +#PidFile /var/run/sshd.pid 
 +#MaxStartups 10:30:100 
 +#PermitTunnel no 
 +#ChrootDirectory none 
 +#VersionAddendum none 
 + 
 +# 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/openssh/sftp-server 
 + 
 +# Example of overriding settings on per-user basis 
 +#Match User anoncvs 
 +#       X11Forwarding no 
 +#       AllowTcpForwarding no 
 +#       PermitTTY no 
 +#       ForceCommand cvs server
 </code> </code>
  
-Déconnectez-vous et reconnectez-vous en tant que trainee. Vérifiez ensuite que les options soient prises en compte :+Pour ôter les lignes de commentaires dans ce fichier, utilisez la commande suivante :
  
 <code> <code>
-[root@centos7 ~]# cat /etc/mtab +[root@centos8 ~]# cd /tmp ; grep --v '^(#|$)'  /etc/ssh/sshd_config > sshd_config 
-rootfs / rootfs rw 0 0 +[root@centos8 tmp]# cat sshd_config  
-sysfs /sys sysfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0 +HostKey /etc/ssh/ssh_host_rsa_key 
-proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 +HostKey /etc/ssh/ssh_host_ecdsa_key 
-devtmpfs /dev devtmpfs rw,seclabel,nosuid,size=236036k,nr_inodes=59009,mode=755 0 0 +HostKey /etc/ssh/ssh_host_ed25519_key 
-securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0 +SyslogFacility AUTHPRIV 
-tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev 0 0 +PermitRootLogin yes 
-devpts /dev/pts devpts rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 +AuthorizedKeysFile      .ssh/authorized_keys 
-tmpfs /run tmpfs rw,seclabel,nosuid,nodev,mode=755 0 0 +PasswordAuthentication yes 
-tmpfs /sys/fs/cgroup tmpfs ro,seclabel,nosuid,nodev,noexec,mode=755 0 0 +ChallengeResponseAuthentication no 
-cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0 +GSSAPIAuthentication yes 
-pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0 +GSSAPICleanupCredentials no 
-cgroup /sys/fs/cgroup/net_cls cgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0 +UsePAM yes 
-cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0 +X11Forwarding yes 
-cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0 +PrintMotd no 
-cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0 +AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES 
-cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0 +AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT 
-cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0 +AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE 
-cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct,cpu 0 0 +AcceptEnv XMODIFIERS 
-cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0 +Subsystem       sftp    /usr/libexec/openssh/sftp-server
-cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0 +
-configfs /sys/kernel/config configfs rw,relatime 0 0 +
-/dev/sda2 / xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0 +
-selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0 +
-systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0 +
-debugfs /sys/kernel/debug debugfs rw,relatime 0 0 +
-hugetlbfs /dev/hugepages hugetlbfs rw,seclabel,relatime 0 0 +
-tmpfs /tmp tmpfs rw,seclabel 0 0 +
-mqueue /dev/mqueue mqueue rw,seclabel,relatime 0 0 +
-sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0 +
-nfsd /proc/fs/nfsd nfsd rw,relatime 0 0 +
-/dev/sda1 /boot xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0 +
-tmpfs /run/user/0 tmpfs rw,seclabel,nosuid,nodev,relatime,size=50080k,mode=700 0 0 +
-/dev/sdb1 /home ext4 rw,seclabel,relatime,quota,usrquota,grpquota,data=ordered 0 0+
 </code> </code>
  
-====La Commande quotacheck====+Pour sécuriser le serveur ssh, ajoutez ou modifiez les directives suivantes :
  
-Pour activer les quotas sur /home, il convient d'utiliser la commande **quotacheck** :+<file> 
 +AllowGroups adm 
 +Banner /etc/issue.net 
 +HostbasedAuthentication no 
 +IgnoreRhosts yes 
 +LoginGraceTime 60 
 +LogLevel INFO 
 +PermitEmptyPasswords no 
 +PermitRootLogin no 
 +PrintLastLog yes 
 +Protocol 2 
 +StrictModes yes 
 +X11Forwarding no 
 +</file> 
 + 
 +Votre fichier ressemblera à celui-ci :
  
 <code> <code>
-[root@centos7 ~]# quotacheck -cugvm -f /dev/sdb1 +[root@centos8 tmp]# vi sshd_config  
-quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown. +[root@centos8 tmp]# cat sshd_config  
-quotacheck: Parcours de /dev/sdb1 [/hometerminé +AllowGroups adm 
-quotacheck: Cannot stat old user quota file /home/aquota.user: Aucun fichier ou dossier de ce type. Usage will not be subtracted+Banner /etc/issue.net 
-quotacheck: Cannot stat old group quota file /home/aquota.group: Aucun fichier ou dossier de ce type. Usage will not be subtracted. +HostbasedAuthentication no 
-quotacheck: Cannot stat old user quota file /home/aquota.user: Aucun fichier ou dossier de ce type. Usage will not be subtracted. +IgnoreRhosts yes 
-quotacheck: Cannot stat old group quota file /home/aquota.group: Aucun fichier ou dossier de ce type. Usage will not be subtracted. +LoginGraceTime 60 
-quotacheck: Vérifié 100 répertoires et 230 fichiers +LogLevel INFO 
-quotacheck: Ancien fichier non trouvé. +PermitEmptyPasswords no 
-quotacheck: Ancien fichier non trouvé.+PermitRootLogin no 
 +PrintLastLog yes 
 +Protocol 2 
 +StrictModes yes 
 +X11Forwarding no 
 +HostKey /etc/ssh/ssh_host_rsa_key 
 +HostKey /etc/ssh/ssh_host_ecdsa_key 
 +HostKey /etc/ssh/ssh_host_ed25519_key 
 +SyslogFacility AUTHPRIV 
 +PermitRootLogin yes 
 +AuthorizedKeysFile      .ssh/authorized_keys 
 +PasswordAuthentication yes 
 +ChallengeResponseAuthentication no 
 +GSSAPIAuthentication yes 
 +GSSAPICleanupCredentials no 
 +UsePAM yes 
 +PrintMotd no 
 +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    /usr/libexec/openssh/sftp-server
 </code> </code>
  
-Les options de la commande quotacheck sont :+Renommez le fichier **/etc/ssh/sshd_config** en **/etc/ssh/sshd_config.old** :
  
 <code> <code>
-[root@centos7 ~]# quotacheck --help +[root@centos8 tmp]# cp /etc/ssh/sshd_config /etc/ssh/sshd_config.old 
-Utility for checking and repairing quota files+</code>
-quotacheck [-gucbfinvdmMR] [-F <quota-format>] filesystem|-a+
  
--u, --user                check user files +Copiez le fichier **/tmp/sshd_config** vers **/etc/ssh/** :
--g, --group               check group files +
--c, --create-files        create new quota files +
--b, --backup              create backups of old quota files +
--f, --force               force check even if quotas are enabled +
--i, --interactive         interactive mode +
--n, --use-first-dquot     use the first copy of duplicated structure +
--v, --verbose             print more information +
--d, --debug               print even more messages +
--m, --no-remount          do not remount filesystem read-only +
--M, --try-remount         try remounting filesystem read-only, +
-                          continue even if it fails +
--R, --exclude-root        exclude root when checking all filesystems +
--F, --format=formatname   check quota files of specific format +
--a, --all                 check all filesystems +
--h, --help                display this message and exit +
--V, --version             display version information and exit+
  
-Rapports de bugs à jack@suse.cz+<code> 
 +[root@centos8 tmp]# cp /tmp/sshd_config /etc/ssh 
 +cp: overwrite '/etc/ssh/sshd_config'? y
 </code> </code>
  
-Les quotas ont été activés et les fichier **aquota.user** et **aquota.group** ont été créés dans le répertoire /home :+Redémarrez le service sshd :
  
 <code> <code>
-[root@centos7 ~]# ls -la /home +[root@centos8 tmp]# systemctl restart sshd 
-total 44 +[root@centos8 tmp]# systemctl status sshd 
-drwxr-xr-x 4 root    root     4096 11 août  13:39 +● sshd.service - OpenSSH server daemon 
-dr-xr-xr-x. 18 root    root     4096 11 août  13:27 .. +   Loadedloaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled) 
--rw-------.  1 root    root     7168 11 août  13:39 aquota.group +   Active: active (running) since Mon 2021-08-30 02:17:00 EDT; 11s ago 
--rw------- root    root     7168 11 août  13:39 aquota.user +     Docsman:sshd(8) 
-drwx------ 2 root    root    16384 11 août  13:26 lost+found +           man:sshd_config(5) 
-drwx------14 trainee trainee  4096 30 avril 15:29 trainee+ Main PID: 1042039 (sshd) 
 +    Tasks: 1 (limit: 23535) 
 +   Memory: 1.1M 
 +   CGroup: /system.slice/sshd.service 
 +           └─1042039 /usr/sbin/sshd --oCiphers=aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,a> 
 + 
 +Aug 30 02:17:00 centos8.ittraining.loc systemd[1]Starting OpenSSH server daemon..
 +Aug 30 02:17:00 centos8.ittraining.loc sshd[1042039]Server listening on 0.0.0.0 port 22. 
 +Aug 30 02:17:00 centos8.ittraining.loc sshd[1042039]: Server listening on :: port 22. 
 +Aug 30 02:17:00 centos8.ittraining.loc systemd[1]: Started OpenSSH server daemon. 
 +[q]
 </code> </code>
  
-Créez maintenant un utilisateur **fenestros** avec le mot de passe **fenestros** :+Mettez l'utilisateur **trainee** dans le groupe **adm** :
  
 <code> <code>
-[root@centos7 ~]# groupadd fenestros && useradd fenestros -c FenestrOs -d /home/fenestros -g fenestros -s /bin/bash +[root@centos8 tmp]# groups trainee 
-[root@centos7 ~]# passwd fenestros +trainee : trainee 
-Changement de mot de passe pour l'utilisateur fenestros. +[root@centos8 tmp]# usermod -aG adm trainee 
-Nouveau mot de passe : fenestros +[root@centos8 tmp]# groups trainee 
-MOT DE PASSE INCORRECT : Le mot de passe contient le nom d'utilisateur sous une forme +trainee : trainee adm
-Retapez le nouveau mot de passe : fenestros +
-passwd : mise à jour réussie de tous les jetons d'authentification. +
-[root@centos7 ~]# +
 </code> </code>
  
-====La Commande edquota====+Pour générer les clefs du serveur, saisissez la commande suivante en tant que **root**. Notez que la passphrase doit être **vide**. 
 + 
 +<code> 
 +[root@centos8 tmp]# ssh-keygen -t dsa 
 +Generating public/private dsa key pair. 
 +Enter file in which to save the key (/root/.ssh/id_dsa): /etc/ssh/ssh_host_dsa_key 
 +Enter passphrase (empty for no passphrase):  
 +Enter same passphrase again:  
 +Your identification has been saved in /etc/ssh/ssh_host_dsa_key. 
 +Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub. 
 +The key fingerprint is: 
 +SHA256:dywC6jKyIMaTxsaEamz1kmthEmuG18HxmS22qRICOYk root@centos8.ittraining.loc 
 +The key's randomart image is: 
 ++---[DSA 1024]----+ 
 +|                 | 
 +|    .            | 
 +|.o . o.+         | 
 +|E.  o.*..  .     | 
 +|+ooo.o +S o o    | 
 +|X==++ o  o o     | 
 +|B/=+oo           | 
 +|Ooo++            | 
 +|. .o             | 
 ++----[SHA256]-----+ 
 +</code> 
  
-Mettez en place maintenant un quota de 10Mo pour l'utilisateur **fenestros** :+De la même façon, il est possible de générer les clefs au format **[[https://fr.wikipedia.org/wiki/Chiffrement_RSA|RSA]]**, **[[https://fr.wikipedia.org/wiki/Elliptic_curve_digital_signature_algorithm|ECDSA]]** et **[[https://fr.wikipedia.org/wiki/EdDSA|ED25519]]** :
  
 <code> <code>
-[root@centos ~]# edquota -u fenestros -/home+[root@centos8 tmp]# ssh-keygen -t rsa 
 +Generating public/private rsa key pair. 
 +Enter file in which to save the key (/root/.ssh/id_rsa): /etc/ssh/ssh_host_rsa_key 
 +Enter passphrase (empty for no passphrase):  
 +Enter same passphrase again:  
 +Your identification has been saved in /etc/ssh/ssh_host_rsa_key. 
 +Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub. 
 +The key fingerprint is: 
 +SHA256:8jXFK50NnoJCz9E7aPKpFYSYCstCPfRsdmlLBTNUnKg root@centos8.ittraining.loc 
 +The key's randomart image is: 
 ++---[RSA 3072]----+ 
 +|    .==o.      | 
 +|  o oo o=+ .     | 
 +|.. oo=+=o . +    | 
 +|oo .+E++.+ = *   | 
 +|o..   +.S B * .  | 
 +|.      B + =     | 
 +|        =        | 
 +|               | 
 +|      .          | 
 ++----[SHA256]-----+ 
 +[root@centos8 tmp]# ssh-keygen -t ecdsa 
 +Generating public/private ecdsa key pair. 
 +Enter file in which to save the key (/root/.ssh/id_ecdsa): /etc/ssh/ssh_host_ecdsa_key 
 +Enter passphrase (empty for no passphrase):  
 +Enter same passphrase again:  
 +Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key. 
 +Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub. 
 +The key fingerprint is: 
 +SHA256:AMqFUJKGqnUEPh/IYda0wnbW1kXK+lnprpHsOo4UMbI root@centos8.ittraining.loc 
 +The key's randomart image is: 
 ++---[ECDSA 256]---+ 
 +|++*=+    .o      | 
 +|oX.=o+ o o       | 
 +|o %.B + +        | 
 +|...O.= o       | 
 +|..E.o . S o      | 
 +|.    . o =       | 
 +|    .   * .      | 
 +|   . ... o       | 
 +|    ..ooo..      | 
 ++----[SHA256]-----+ 
 +[root@centos8 tmp]# ssh-keygen -t ed25519 
 +Generating public/private ed25519 key pair. 
 +Enter file in which to save the key (/root/.ssh/id_ed25519): /etc/ssh/ssh_host_ed25519_key 
 +Enter passphrase (empty for no passphrase):  
 +Enter same passphrase again:  
 +Your identification has been saved in /etc/ssh/ssh_host_ed25519_key. 
 +Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub. 
 +The key fingerprint is: 
 +SHA256:CtbcN9iXv00PfbHFGf2bEW7iRibOFwRctyqM5hmlhwE root@centos8.ittraining.loc 
 +The key's randomart image is: 
 ++--[ED25519 256]--+ 
 +|        .... . | 
 +|        .  .. . o| 
 +|         . . . +.| 
 +|     o . oB ..o.=| 
 +|    o o S*+=o* *+| 
 +|   . . .o.*o*.+.B| 
 +|      .  o o +o++| 
 +|            o  =o| 
 +|              . o| 
 ++----[SHA256]-----+
 </code> </code>
  
-L'éditeur **vi** se lance et vous obtiendrez un résultat similaire à celui-ci :+Les clefs publiques générées possèdent l'extension **.pub**. Les clefs privées n'ont pas d'extension :
  
-<file+<code
-Quotas disque pour user fenestros (uid 1001) : +[root@centos8 tmp]# ls /etc/ssh 
- Système de fichiers           blocs       souple     stricte   inodes    souple   stricte +moduli      ssh_config.d  sshd_config.old     ssh_host_ecdsa_key.pub  ssh_host_ed25519_key.pub  ssh_host_rsa_key.pub 
-  /dev/sdb1                                  0          0          0        0        0 +ssh_config  sshd_config   ssh_host_ecdsa_key  ssh_host_ed25519_key    ssh_host_rsa_key 
-</file>+</code>
  
-Modifiez ce fichier ainsi :+Re-démarrez ensuite le service sshd :
  
-<file+<code
-Quotas disque pour user fenestros (uid 1001) : +[root@centos8 tmp]# systemctl restart sshd.service 
- Système de fichiers           blocs       souple     stricte   inodes    souple   stricte +[root@centos8 tmp]# systemctl status sshd.service 
-  /dev/sdb1                                8000       10000        0        0        0 +● sshd.service - OpenSSH server daemon 
-</file>+   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled) 
 +   Active: active (running) since Mon 2021-08-30 02:24:57 EDT; 9s ago 
 +     Docs: man:sshd(8) 
 +           man:sshd_config(5) 
 + Main PID: 1042204 (sshd) 
 +    Tasks: 1 (limit: 23535) 
 +   Memory: 1.1M 
 +   CGroup: /system.slice/sshd.service 
 +           └─1042204 /usr/sbin/sshd -D -oCiphers=aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,a>
  
-Les options de la commande **edquota** sont :+Aug 30 02:24:57 centos8.ittraining.loc systemd[1]: Starting OpenSSH server daemon... 
 +Aug 30 02:24:57 centos8.ittraining.loc sshd[1042204]: Server listening on 0.0.0.0 port 22. 
 +Aug 30 02:24:57 centos8.ittraining.loc sshd[1042204]: Server listening on :: port 22. 
 +Aug 30 02:24:57 centos8.ittraining.loc systemd[1]: Started OpenSSH server daemon. 
 +[q] 
 +</code> 
 + 
 +===Configuration du Client=== 
 + 
 +Saisissez maintenant les commandes suivantes en tant que **trainee** : 
 + 
 +<WRAP center round important 60%> 
 +**Important** - Lors de la génération des clefs, la passphrase doit être **vide**
 +</WRAP>
  
 <code> <code>
-[root@centos7 ~]# edquota --help +[root@centos8 tmp]# exit 
-edquotaUsage+logout 
- edquota [-rm] [-u] [-F formatname] [-p username[-f filesystem] username ... +[trainee@centos8 ~]$ ssh-keygen -t dsa 
- edquota [-rm] -g [-F formatname] [-p groupname] [-f filesystemgroupname ... +Generating public/private dsa key pair. 
- edquota [-u|g] [-F formatname] [-f filesystem] -t +Enter file in which to save the key (/home/trainee/.ssh/id_dsa) 
- edquota [-u|g[-F formatname] [-f filesystem] -T username|groupname ...+Created directory '/home/trainee/.ssh'
 +Enter passphrase (empty for no passphrase):  
 +Enter same passphrase again:  
 +Your identification has been saved in /home/trainee/.ssh/id_dsa. 
 +Your public key has been saved in /home/trainee/.ssh/id_dsa.pub. 
 +The key fingerprint is: 
 +SHA256:Qd17X1iROjk5rLOQBbyVg1hNXkUdTeiFtEpn3rgPKc4 trainee@centos8.ittraining.loc 
 +The key's randomart image is: 
 ++---[DSA 1024]----+ 
 +|        =o+o.o+OB| 
 +|       o +o=o oo=| 
 +|        +.+oB+ | 
 +|         o o.&+o.| 
 +|        S o o.*.o| 
 +|         o o   o.| 
 +|          . + +  | 
 +|           + . o | 
 +|            E   .| 
 ++----[SHA256]-----+ 
 +[trainee@centos8 ~]$ ssh-keygen -t rsa 
 +Generating public/private rsa key pair.
  
--u, --user                    edit user data +Enter file in which to save the key (/home/trainee/.ssh/id_rsa): Enter passphrase (empty for no passphrase):  
--g, --group                   edit group data +Enter same passphrase again:  
--r, --remote                  edit remote quota (via RPC) +Your identification has been saved in /home/trainee/.ssh/id_rsa. 
--m, --no-mixed-pathnames      trim leading slashes from NFSv4 mountpoints +Your public key has been saved in /home/trainee/.ssh/id_rsa.pub. 
--F, --format=formatname       edit quotas of a specific format +The key fingerprint is: 
--p, --prototype=name          copy data from a prototype user/group +SHA256:BgEjoWQrGCzdJfyZczVZYVoafiHsz9GK5PDWuywG/z0 trainee@centos8.ittraining.loc 
-    --always-resolve          always try to resolve name, even if it is +The key's randomart image is: 
-                              composed only of digits ++---[RSA 3072]----+ 
--f, --filesystem=filesystem   edit data only on a specific filesystem +|o+o++oo  .oo*.   | 
--t, --edit-period             edit grace period +|=+o.oo . .=B .   | 
--T, --edit-times              edit grace time of a user/group +|=.   ..o o+...   | 
--h, --help                    display this help text and exit +|.     =.o o.. .  | 
--V, --version                 display version information and exit+|       oS= = o   | 
 +|       .. = =    | 
 +|             | 
 +|          +...E  | 
 +|         . o+... | 
 ++----[SHA256]-----+ 
 +[trainee@centos8 ~]$ ssh-keygen -t ecdsa 
 +Generating public/private ecdsa key pair. 
 +Enter file in which to save the key (/home/trainee/.ssh/id_ecdsa):  
 +Enter passphrase (empty for no passphrase):  
 +Enter same passphrase again:  
 +Your identification has been saved in /home/trainee/.ssh/id_ecdsa. 
 +Your public key has been saved in /home/trainee/.ssh/id_ecdsa.pub. 
 +The key fingerprint is: 
 +SHA256:mpBDgsCxP2DqRPkmGvXHpNnvm5B+Cl7MSiiZKfDjWLk trainee@centos8.ittraining.loc 
 +The key's randomart image is: 
 ++---[ECDSA 256]---
 +|o..              | 
 +|.oo              | 
 +|.*o . .          | 
 +|+.++ B           | 
 +|+o =B + S        | 
 +|=*oo.* =         | 
 +|B.* o O .        | 
 +|.= = = o..       | 
 +|. E o oo+.       | 
 ++----[SHA256]-----
 +[trainee@centos8 ~]$ ssh-keygen -t ed25519 
 +Generating public/private ed25519 key pair. 
 +Enter file in which to save the key (/home/trainee/.ssh/id_ed25519):  
 +Enter passphrase (empty for no passphrase):  
 +Enter same passphrase again:  
 +Your identification has been saved in /home/trainee/.ssh/id_ed25519. 
 +Your public key has been saved in /home/trainee/.ssh/id_ed25519.pub. 
 +The key fingerprint is: 
 +SHA256:JfFxG2mg9feAvFGxoxZ8uSsON3sXvtYQYYg5iVxzZS4 trainee@centos8.ittraining.loc 
 +The key's randomart image is: 
 ++--[ED25519 256]--+ 
 +|       ..o*=++=. | 
 +|        o==O+Boo | 
 +|        o ooE.O. | 
 +|           O.= | 
 +|        S   + ...| 
 +|            .o | 
 +|          . + o.o| 
 +|           + +.oo| 
 +|            o..o.| 
 ++----[SHA256]-----+ 
 +</code>
  
-Rapports de bugs à jack@suse.cz+Les clés générées seront placées dans le répertoire **~/.ssh/** : 
 + 
 +<code> 
 +[trainee@centos8 ~]$ ls .ssh 
 +id_dsa  id_dsa.pub  id_ecdsa  id_ecdsa.pub  id_ed25519  id_ed25519.pub  id_rsa  id_rsa.pub
 </code> </code>
  
-<WRAP center round important> +===Tunnels SSH===
-Pour mettre en place un quota par group, la procédure est similaire. Il suffit d'utiliser l'option -g de la commande edquota. +
-</WRAP>+
  
-====La Commande quotaon====+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é.
  
-Appliquez maintenant les quotas :+La commande pour créer un tunnel ssh prend la forme suivante : 
 + 
 +  ssh -N -f compte@hôte -Lport-local:localhost:port_distant 
 + 
 +Dans votre cas, vous allez créer un tunnel dans votre propre vm entre le port 15023 et le port 23 :
  
 <code> <code>
-[root@centos7 ~]# quotaon -a+[root@centos8 ~]# ssh -N -f trainee@localhost -L15023:localhost:23 
 +\S 
 +Kernel \r on an \m 
 +trainee@localhost's password: trainee
 </code> </code>
  
-Les options de la commande **quotaon** sont :+Installez maintenant le serveur telnet :
  
 <code> <code>
-[root@centos7 ~]# quotaon --help +[root@centos8 ~]# dnf install telnet-server
-quotaon: Usage: +
- quotaon [-guvp] [-F quotaformat] [-x state] -a +
- quotaon [-guvp] [-F quotaformat] [-x state] filesys ... +
- +
--a, --all                turn quotas on for all filesystems +
--f, --off                turn quotas off +
--u, --user               operate on user quotas +
--g, --group              operate on group quotas +
--p, --print-state        print whether quotas are on or off +
--x, --xfs-command=cmd    perform XFS quota command +
--F, --format=formatname  operate on specific quota format +
--v, --verbose            print more messages +
--h, --help               display this help text and exit +
--V, --version            display version information and exit+
 </code> </code>
  
-De cette manière vous avez mis en place un quota **souple** pour fenestros de 8 000 Ko et un quota **stricte** de 10 000 Ko. +Telnet n'est ni démarré ni activé. Il convient donc de le démarrer et de l'activer :
  
-Quand l'utilisateur fenestros aura dépassé le quota **souple**, il recevra un message d'avertissementQuand il dépasse le quota **stricte**, il ne pourra plus enregistrer dans /home, sauf dans le cas où il supprime des fichiers pour retomber en dessous de la limite **stricte**.+<code> 
 +[root@centos8 ~]# systemctl status telnet.socket 
 +● telnet.socket - Telnet Server Activation Socket 
 +   Loaded: loaded (/usr/lib/systemd/system/telnet.socket; disabled; vendor preset: disabled) 
 +   Active: inactive (dead) 
 +     Docs: man:telnetd(8) 
 +   Listen: [::]:23 (Stream) 
 + Accepted: 0; Connected: 0; 
 +  
 +[root@centos8 ~]# systemctl start telnet.socket
  
-Il est à noter que vous pouvez soit mettre en place un quota en taille, soit mettre en place un quota basé sur le nombre d'inodes utilisés par l'utilisateur.+[root@centos8 ~]# systemctl status telnet.socket 
 +● telnet.socket - Telnet Server Activation Socket 
 +   Loaded: loaded (/usr/lib/systemd/system/telnet.socket; disabled; vendor preset: disabled) 
 +   Active: active (listening) since Mon 2021-08-30 02:44:01 EDT; 4s ago 
 +     Docs: man:telnetd(8) 
 +   Listen: [::]:23 (Stream) 
 + Accepted: 0; Connected: 0; 
 +   CGroup: /system.slice/telnet.socket
  
-<WRAP center round important> +Aug 30 02:44:01 centos8.ittraining.loc systemd[1]: Listening on Telnet Server Activation Socket.
-La commande pour désactivez les quotas est **quotaoff** +
-</WRAP>+
  
-====La Commande repquota====+[root@centos8 ~]# systemctl enable telnet.socket 
 +Created symlink /etc/systemd/system/sockets.target.wants/telnet.socket → /usr/lib/systemd/system/telnet.socket. 
 +</code>
  
-Pour visualiser les quotas utilisez la commande **repquota** :+Connectez-vous ensuite via telnet sur le port 15023, vous constaterez que votre connexion n'aboutit pas :
  
 <code> <code>
-[root@centos7 ~]# repquota /home +[root@centos8 ~]# telnet localhost 15023 
-*** Rapport pour les quotas user sur le périphérique /dev/sdb1 +Trying ::1... 
-Période de sursis bloc 7days ; période de sursis inode 7days +Connected to localhost. 
-                        Block limits                File limits +Escape character is '^]'. 
-Utilisateur     utilisé souple stricte sursis utilisé souple stricte sursis + 
----------------------------------------------------------------------- +Kernel 4.18.0-305.7.1.el8.i2tch.x86_64 on an x86_64 
-root      --      20                          2                +centos8 login: trainee 
-trainee   --   20484                        328                +Password:  
-   +Last login: Mon Aug 30 02:37:00 from ::1 
 +[trainee@centos8 ~]$ whoami 
 +trainee 
 +[trainee@centos8 ~]$ pwd 
 +/home/trainee
 </code> </code>
  
-<WRAP center round important> +<WRAP center round important 60%
-Notez que l'utilisateur fenestros ne figure pas dans la liste. Sous CentOS, le quota n'est pas visible tant que l'utilisateur ne s'est pas connecté pour la première fois. Notez aussi les période de grâce de **7** jours.+**Important** - Notez bien que votre communication telnet passe par le tunnel SSH.
 </WRAP> </WRAP>
  
-Les options de la commande **repquota** sont :+====3.5 - SCP====
  
-<code> +===Présentation===
-[root@centos7 ~]# repquota --help +
-repquota: Utility for reporting quotas. +
-Usage: +
-repquota [-vugsi] [-c|C] [-t|n] [-F quotaformat] (-a | mntpoint)+
  
--v, --verbose               display also users/groups without any usage +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 :
--u, --user                  display information about users +
--g, --group                 display information about groups +
--s, --human-readable        show numbers in human friendly units (MB, GB, ...) +
--t, --truncate-names        truncate names to 9 characters +
--p, --raw-grace             print grace time in seconds since epoch +
--n, --no-names              do not translate uid/gid to name +
--i, --no-autofs             avoid autofs mountpoints +
--c, --cache                 translate big number of ids at once +
--C, --no-cache              translate ids one by one +
--F, --format=formatname     report information for specific format +
--a, --all                   report information for all mount points with quotas +
--h, --help                  display this help message and exit +
--V, --version               display version information and exit+
  
-Rapports de bugs à jack@suse.cz +  $ scp compte@numero_ip(nom_de_machine):/chemin_distant/fichier_distant /chemin_local/fichier_local 
-</code>+ 
 +ou vers une machine distante : 
 + 
 +  $ scp /chemin_local/fichier_local compte@numero_ip(nom_de_machine):/chemin_distant/fichier_distant 
 + 
 +===Utilisation===
  
-====La Commande quota====+Nous allons maintenant utiliser **scp** pour chercher un fichier sur le <<serveur>> :
  
-Pour visualiser les quotas d'un utilisateur spécifique, il convient d'utiliser la commande **quota** :+Créez le fichier **/home/trainee/scp_test** :
  
 <code> <code>
-[root@centos7 ~]# quota fenestros +[trainee@centos8 ~]$ touch scp-test 
-Disk quotas for user fenestros (uid 1001): aucun +[trainee@centos8 ~]$ exit
-[root@centos7 ~]# su - fenestros +
-[fenestros@centos7 ~]$ touch test +
-[fenestros@centos7 ~]$ exit+
 logout logout
-[root@centos7 ~]# quota fenestros +Connection closed by foreign host. 
-Disk quotas for user fenestros (uid 1001):  +[root@centos8 ~]# 
-Système fichiers   blocs   quota  limite  sursisfichiers   quota  limite  sursis +
-      /dev/sdb1      24    8000   10000                                      +
 </code> </code>
  
-Les options de la commande **quota** sont :+Récupérez le fichier **scp_test** en utilisant scp :
  
 <code> <code>
-[root@centos7 ~]# quota --help +[root@centos8 ~]# scp trainee@127.0.0.1:/home/trainee/scp-test . 
-quotaUsage: quota [-guqvswim] [-l | [-Q | -A]] [-F quotaformat+The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established. 
- quota [-qvswim] [-l | [-Q | -A]] [-F quotaformat] -u username ... +ECDSA key fingerprint is SHA256:Q7T/CP0SLiMbMAIgVzTuEHegYS/spPE5zzQchCHD5Vw. 
- quota [-qvswim] [-l | [-Q | -A]] [-F quotaformat] -g groupname ... +Are you sure you want to continue connecting (yes/no/[fingerprint])? yes 
- quota [-qvswugQm] [-F quotaformat] -f filesystem ...+Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts. 
 +\S 
 +Kernel \r on an \m 
 +trainee@127.0.0.1's password: trainee 
 +scp-test                                                                                                           100%    0     0.0KB/s   00:00    
  
--u, --user                display quota for user +[root@centos8 ~]# ls -
--g, --group               display quota for group +total 32 
--q, --quiet               print more terse message +-rw-------. 1 root root 1358 Jun 16 06:40 anaconda-ks.cfg 
--v, --verbose             print more verbose message +drwxr-xr-x3 root root   21 Jun 16 06:39 home 
--s, --human-readable      display numbers in human friendly units (MB, GB...) +-rw-r--r--. 1 root root 1749 Aug 24 11:20 I2TCH.asc 
-    --always-resolve      always try to translate name to id, even if it is +-rw-r--r--. 1 root root 1853 Jun 16 06:54 initial-setup-ks.cfg 
-   composed of only digits +-rw-r--r--. 1 root root   31 Aug 24 11:22 message.txt 
--w, --no-wrap             do not wrap long lines +-rw-r--r--. 1 root root  561 Aug 24 11:32 message.txt.asc 
--p, --raw-grace           print grace time in seconds since epoch +-rw-r--r--. 1 root root  367 Aug 24 11:30 message.txt.gpg 
--l, --local-only          do not query NFS filesystems +-rw-r--r--. 1 root root  329 Aug 24 11:23 message.txt.sig 
--Q, --quiet-refuse        do not print error message when NFS server does +-rw-r--r--. 1 root root    0 Aug 30 03:55 scp-test 
-                          not respond +-rw-r--r--. 1 root root   46 Aug 29 06:22 wget_file.txt
--i, --no-autofs           do not query autofs mountpoints +
--F, --format=formatname   display quota of a specific format +
--f, --filesystem-list     display quota information only for given filesystems +
--A, --all-nfs             display quota for all NFS mountpoints +
--m, --no-mixed-pathnames  trim leading slashes from NFSv4 mountpoints +
-    --show-mntpoint       show mount point of the file system in output +
-    --hide-device         do not show file system device in output +
--h, --help                display this help message and exit +
--V, --version             display version information and exit +
- +
-Rapports de bugs à jack@suse.cz+
 </code> </code>
  
-====La Commande warnquota====+====3.6 - Mise en Place des Clefs Asymétriques====
  
-La commande **warnquota** vérifie le ou les disques et envoie un message par mail à tout utilisateur qui a dépassé la limite soft. Elle est enrègle générale appelée par un job cron. Cependant elle peut aussi est appelée d'une manière intéractive.+Il convient maintenant de se connecter sur le <<serveur>> en utilisant ssh et vérifiez la présence du répertoire ~/.ssh :
  
-Sous RHEL/CentOS 7, warnquota n'est pas installé par défaut :+<code> 
 +[root@centos8 ~]# ssh -l trainee 127.0.0.1 
 +\S 
 +Kernel \r on an \m 
 +trainee@127.0.0.1's password: trainee 
 +Activate the web console with: systemctl enable --now cockpit.socket 
 + 
 +[trainee@centos8 ~]$ ls -la | grep .ssh 
 +drwx------.  2 trainee trainee      4096 Aug 30 02:26 .ssh 
 +</code> 
 + 
 +<WRAP center round important 60%> 
 +**Important** - Si le dossier distant .ssh n'existe pas dans le répertoire personnel de l'utilisateur connecté, il faut le créer avec des permissions de 700. Dans votre cas, puisque votre machine joue le rôle de serveur **et** du client, le dossier /home/trainee/.ssh existe **déjà**. 
 +</WRAP> 
 + 
 +Ensuite, il convient de transférer le fichier local **.ssh/id_ecdsa.pub** du <<client>> vers le <<serveur>> en le renommant en **authorized_keys** :
  
 <code> <code>
-[root@centos7 ~]# yum install quota-warnquota +[trainee@centos8 ~]$ exit 
-Modules complémentaires chargés : fastestmirror, langpacks +logout 
-base                                                                                                                                             | 3.6 kB  00:00:00      +Connection to 127.0.0.1 closed.
-extras                                                                                                                                           | 3.4 kB  00:00:00      +
-updates                                                                                                                                          | 3.4 kB  00:00:00      +
-Loading mirror speeds from cached hostfile +
- * base: centos.quelquesmots.fr +
- * extras: miroir.univ-paris13.fr +
- * updates: miroir.univ-paris13.fr +
-Résolution des dépendances +
---> Lancement de la transaction de test +
----> Le paquet quota-warnquota.x86_64 1:4.01-11.el7_2.1 sera installé +
---> Résolution des dépendances terminée+
  
-Dépendances résolues+[root@centos8 ~]# exit 
 +logout
  
-======================================================================================================================================================================== +[trainee@centos8 ~]$ scp .ssh/id_ecdsa.pub trainee@127.0.0.1:/home/trainee/.ssh/authorized_keys 
- Package                                     Architecture                       Version                                       Dépôt                               Taille +The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established. 
-======================================================================================================================================================================== +ECDSA key fingerprint is SHA256:Q7T/CP0SLiMbMAIgVzTuEHegYS/spPE5zzQchCHD5Vw. 
-Installation +Are you sure you want to continue connecting (yes/no/[fingerprint])? yes 
- quota-warnquota                             x86_64                             1:4.01-11.el7_2.1                             updates                              76 k+WarningPermanently added '127.0.0.1' (ECDSA) to the list of known hosts. 
 +\S 
 +Kernel \r on an \m 
 +trainee@127.0.0.1's password: trainee 
 +id_ecdsa.pub                                                                                                       100%  192   497.6KB/  00:00 
 +</code>
  
-Résumé de la transaction +Connectez-vous via telnet :
-======================================================================================================================================================================== +
-Installation   1 Paquet+
  
-Taille totale des téléchargements : 76 k +<code> 
-Taille d'installation 137 k +[trainee@centos8 ~]$ ssh -l trainee localhost 
-Is this ok [y/d/N]: y+The authenticity of host 'localhost (::1)' can't be established. 
 +ECDSA key fingerprint is SHA256:Q7T/CP0SLiMbMAIgVzTuEHegYS/spPE5zzQchCHD5Vw. 
 +Are you sure you want to continue connecting (yes/no/[fingerprint])? yes 
 +WarningPermanently added 'localhost' (ECDSA) to the list of known hosts. 
 +\S 
 +Kernel \r on an \m 
 +Activate the web console with: systemctl enable --now cockpit.socket 
 + 
 +Last login: Mon Aug 30 03:57:14 2021 from 127.0.0.1 
 +[trainee@centos8 ~]$
 </code> </code>
  
-Les options de la commande **warnquota** sont :+<WRAP center round important 60%> 
 +**Important** - Lors de la connexion au serveur, l'authentification utilise le couple de clefs asymétrique au format ecdsa et aucun mot de passe n'est requis. 
 +</WRAP> 
 + 
 +Insérez maintenant les clefs publiques restantes dans le fichier .ssh/authorized_keys :
  
 <code> <code>
-[root@centos7 ~]# warnquota --help +[trainee@centos8 ~]$ cd .ssh 
-warnquota: Usage: +[trainee@centos8 .ssh]$ ls 
-  warnquota [-ugsid[-F quotaformat] [-c configfile] [-q quotatabfile] [-a adminsfile] [filesystem...]+authorized_keys  id_dsa  id_dsa.pub  id_ecdsa  id_ecdsa.pub  id_ed25519  id_ed25519.pub  id_rsa  id_rsa.pub  known_hosts 
 +[trainee@centos8 .ssh]$ cat authorized_keys  
 +ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHDrzSXP+Ecxf/sQ18VwCRNm7rrSrrsaJmuIw/RgTH5puKF5E+Yy15cvAAKBXpJPxUmrOaOyhab84PevV7XSHcI= trainee@centos8.ittraining.loc
  
--u, --user                      warn users +[trainee@centos8 .ssh]$ cat id_rsa.pub >> authorized_keys 
--g, --group                     warn groups +[trainee@centos8 .ssh]$ cat id_dsa.pub >> authorized_keys 
--s, --human-readable            send information in more human friendly units +[trainee@centos8 .ssh]$ cat id_ed25519.pub >> authorized_keys
--i, --no-autofs                 avoid autofs mountpoints +
--d, --no-details                do not send quota information itself +
--F, --format=formatname         use quotafiles of specific format +
--c, --config=config-file        non-default config file +
--q, --quota-tab=quotatab-file   non-default quotatab +
--a, --admins-file=admins-file   non-default admins file +
--h, --help                      display this help message and exit +
--v, --version                   display version information and exit+
  
-Rapports de bugs à jack@suse.cz+[trainee@centos8 .ssh]$ cat authorized_keys 
 +ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHDrzSXP+Ecxf/sQ18VwCRNm7rrSrrsaJmuIw/RgTH5puKF5E+Yy15cvAAKBXpJPxUmrOaOyhab84PevV7XSHcI= trainee@centos8.ittraining.loc 
 +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQD3ZSMn/GIAHtaDFc6ZNnKJam9hzq8TxqMN5IopUr8QhwODyPadbB+FgH4r50qTux4ubwr1BlymgIdqRVWy32mE15M8tdtKc3j8DNMpUwPGEh+s/PT7GW+3E3shoyPvpLc1kKaKXKGl/JwfCK/8IYsubk2BmiiJYkzLECotPlaaxm4w1K0AtlnZQuLHt1HK3/rHChxo2o2w1t59/QwNcMLiKve1Z+zQ1POKo8VJ/DDrf90y2QWC28ejUs/ZjP6f6C4bn5Jjol4TbHls3ArMsbU6C1Ev5jqbzZ0kmognQ2CnRjeNM51YdFo6nRsLoPQKpeLRMBpT/87HK1bPUOBVCyhXxSkqkVhMlgg8tgcD/MRlBaUVFoZ1wQ0L26Fe+q7c2Oykj54pdXCAK2ZTpCXGfhd/FxrfqGw7cSeKlGX4QUzHMjMk2oHFC9h30BUk1gGN21KJPTh7/S1OZVrnCc3GUi5fXPvEpral0IU0sws+j03dj0sWm5ICQFKRkmZN11HCyT0= trainee@centos8.ittraining.loc 
 +ssh-dss AAAAB3NzaC1kc3MAAACBALIdwEEqHrMWSUdzARm9ldsZK9ebbtZShtmwgdjphOk77fxymK0y6wV7QEmLL25LOcLb12uZ1F0LtRt/t2oqgrwqk3vUSpCPLr09AXpcD/nxL9kc+rUxHyl6u1mHtyfCVLCPSvavCMR8TaA8egVMk3EwGRfHTiuDOKi7Iwus7gXPAAAAFQDHEQPGVRI7gVYKzCT6nrjDsQQ6jwAAAIEAhhhH7fEjdldASXY0qTWkCvcs3cfK9/Ff315zByn47O02y9Vdo3QG5nOr1Oo8fc2xEkIBNmFr8Rr2g60cpvEev5hy4XZ1ghxnQ53iwKuiS72ZATwhD6bZBrsiH0k1Et25gRcj5KCvDe/jHhbxCxsCuHUH2qvWsQNVwztE7hD0sxkAAACAQ8Dkpy8zXj7jW8o1txxf2W6J4r2+1lPldymA45ywZokN4SCwvXlpPAuyBt0/HiU0R2PI9aqOAMosCLcy9WmnSwLQ2Z7QcD2i3XlAih2+1q9NJP22sPT3jSK9UZcdRjoZ/eNiz84sXZucNape32tFxjvcV4txobH/vD53q8g63fA= trainee@centos8.ittraining.loc 
 +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOfFQULLU8IZyKiSU63D2Zz6yGLqyHcBHnCRdSR9JSmc trainee@centos8.ittraining.loc
 </code> </code>
  
 ----- -----
-<html> +Copyright © 2021 Hugh Norris.
-<div align="center"> +
-Copyright © 2020 Hugh Norris. +
-</html>+
Menu