Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
elearning:workbooks:centos:8:avance:l103 [2021/07/21 17:08] – admin | elearning:workbooks:centos:8:avance:l103 [2022/03/09 18:44] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
~~PDF: | ~~PDF: | ||
+ | |||
+ | Version : **2022.01** | ||
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
- | ======LCF603 - Gestion du Noyau et des Quotas====== | + | ======LCF603 - Gestion du Réseau====== |
=====Contenu du Module===== | =====Contenu du Module===== | ||
- | * **LCF603 - Gestion du Noyau et des Quotas** | + | * **LCF603 - Gestion du Réseau** |
* Contenu du Module | * Contenu du Module | ||
- | * Rôle du noyau | + | * Présentation |
- | * LAB #1 - Modules | + | * La Commande nmcli |
- | * LAB #2 - Compilation | + | * LAB #1 - Configuration du Réseau |
- | * 2.1 - Déplacer /home | + | * 1.1 - Connections |
- | * 2.2 - Préparer l' | + | * 1.2 - Résolution des Noms |
- | * 2.3 - Préparer l' | + | * 1.3 - Ajouter une Deuxième Adresse IP à un Profil |
- | * Le Fichier | + | * 1.4 - La Commande hostname |
- | * Le Fichier Makefile | + | * 1.5 - La Commande ip |
- | * 2.4 - Paramétrage du noyau | + | * 1.6 - Activer/ |
- | * 2.5 - Compiler le Noyau | + | * 1.7 - Routage Statique |
- | * 2.6 - Installer le Nouveau Noyau | + | * La commande ip |
- | * LAB #3 - Gestion des Quotas | + | * Activer/ |
- | * 3.1 - La Commande quotacheck | + | * LAB #2 - Diagnostique du Réseau |
- | * 3.2 - La Commande edquota | + | * 2.1 - ping |
- | * 3.3 - La Commande quotaon | + | * 2.2 - netstat -i |
- | * 3.4 - La Commande repquota | + | * 2.3 - traceroute |
- | * 3.5 - La Commande quota | + | * LAB #3 - Connexions à Distance |
- | * 3.6 - La Commande warnquota | + | * 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' | + | RHEL/CentOS 8 utilise **Network Manager** pour gérer le réseau. Network Manager |
- | * la diminution de la taille du noyau, | + | * un service qui gère les connexions réseaux et rapporte leurs états, |
- | * la prise en charge | + | * des front-ends qui passent par un API de configuration |
- | * l' | + | |
- | * l' | + | |
- | * la correction de bogues, | + | |
- | * le besoin d'une fonctionnalité expérimentale. | + | |
- | + | ||
- | Commencez par mettre à jour CentOS 8 : | + | |
- | <code> | + | <WRAP center round important 60%> |
- | [root@centos8 ~]# dnf update | + | **Important** : Notez qu' |
- | ... | + | </WRAP> |
- | [root@centos8 ~]# reboot | + | |
- | </code> | + | |
- | Identifiez ensuite le noyau utilisé par votre machine virtuelle | + | Le service NetworkManager doit toujours être lancé |
< | < | ||
- | [root@centos8 ~]# uname -r | + | [root@centos8 ~]# systemctl status NetworkManager.service |
- | 4.18.0-305.7.1.el8_4.x86_64 | + | ● NetworkManager.service |
+ | | ||
+ | | ||
+ | Docs: man: | ||
+ | Main PID: 1002 (NetworkManager) | ||
+ | Tasks: 3 (limit: 23535) | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Warning: Journal has been rotated since unit was started. Log output is incomplete or> | ||
+ | lines 1-11/11 (END) | ||
+ | [^q] | ||
</ | </ | ||
- | =====LAB #1 - Modules===== | + | ===La Commande nmcli=== |
- | 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 **/ | + | La commande |
+ | |||
+ | Les options et les sous-commandes peuvent être consultées en utilisant les commandes suivantes | ||
< | < | ||
- | [root@centos8 ~]# ls / | + | [root@centos8 ~]# nmcli help |
- | bls.conf | + | Usage: nmcli [OPTIONS] OBJECT { COMMAND | help } |
- | build modules.builtin.bin | + | |
- | config | + | OPTIONS |
- | kernel | + | |
- | modules.alias modules.devname | + | -c, --colors auto|yes|no |
- | modules.alias.bin | + | |
- | modules.block | + | -f, --fields <field,...> |
+ | -g, --get-values <field,...> | ||
+ | | ||
+ | | ||
+ | -o, --overview | ||
+ | -p, --pretty | ||
+ | -s, --show-secrets | ||
+ | -t, --terse | ||
+ | -v, --version | ||
+ | -w, --wait < | ||
+ | |||
+ | OBJECT | ||
+ | g[eneral] | ||
+ | n[etworking] | ||
+ | r[adio] | ||
+ | c[onnection] | ||
+ | d[evice] | ||
+ | a[gent] | ||
+ | m[onitor] | ||
</ | </ | ||
- | 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** |
< | < | ||
- | [root@centos8 ~]# lsmod | + | [root@centos8 ~]# nmcli c show |
- | Module | + | NAME UUID TYPE DEVICE |
- | xt_CHECKSUM | + | ens18 |
- | ipt_MASQUERADE | + | virbr0 |
- | xt_conntrack | + | |
- | ipt_REJECT | + | |
- | nft_compat | + | |
- | nf_nat_tftp | + | |
- | nft_objref | + | |
- | nf_conntrack_tftp | + | |
- | nft_counter | + | |
- | tun 53248 1 | + | |
- | bridge | + | |
- | stp 16384 1 bridge | + | |
- | llc 16384 2 bridge,stp | + | |
- | nft_fib_inet | + | |
- | nft_fib_ipv4 | + | |
- | nft_fib_ipv6 | + | |
- | nft_fib | + | |
- | nft_reject_inet | + | |
- | nf_reject_ipv4 | + | |
- | nf_reject_ipv6 | + | |
- | nft_reject | + | |
- | nft_ct | + | |
- | nf_tables_set | + | |
- | nft_chain_nat | + | |
- | nf_nat | + | |
- | nf_conntrack | + | |
- | nf_defrag_ipv6 | + | |
- | nf_defrag_ipv4 | + | |
- | ip_set | + | |
- | nf_tables | + | |
- | nfnetlink | + | |
- | sunrpc | + | |
- | ext4 761856 | + | |
- | mbcache | + | |
- | jbd2 131072 | + | |
- | virtio_balloon | + | |
- | pcspkr | + | |
- | i2c_piix4 | + | |
- | joydev | + | |
- | ip_tables | + | |
- | xfs 1515520 | + | |
- | libcrc32c | + | |
- | sr_mod | + | |
- | sd_mod | + | |
- | cdrom 65536 1 sr_mod | + | |
- | t10_pi | + | |
- | sg | + | |
- | ata_generic | + | |
- | bochs_drm | + | |
- | drm_vram_helper | + | |
- | drm_kms_helper | + | |
- | syscopyarea | + | |
- | sysfillrect | + | |
- | sysimgblt | + | |
- | fb_sys_fops | + | |
- | drm_ttm_helper | + | |
- | ttm | + | |
- | drm | + | |
- | ahci | + | |
- | libahci | + | |
- | virtio_net | + | |
- | net_failover | + | |
- | ata_piix | + | |
- | serio_raw | + | |
- | failover | + | |
- | libata | + | |
- | dm_mirror | + | |
- | dm_region_hash | + | |
- | dm_log | + | |
- | dm_mod | + | |
- | fuse 151552 | + | |
</ | </ | ||
- | Pour ajouter | + | Créez donc un profil IP fixe rattaché au périphérique |
< | < | ||
- | [root@centos8 ~]# 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.1 |
- | [root@centos8 ~]# lsmod | more | + | Connection ' |
- | Module | + | |
- | bonding | + | |
- | xt_CHECKSUM | + | |
- | ipt_MASQUERADE | + | |
- | xt_conntrack | + | |
- | ipt_REJECT | + | |
- | nft_compat | + | |
- | nf_nat_tftp | + | |
- | nft_objref | + | |
- | nf_conntrack_tftp | + | |
- | nft_counter | + | |
- | tun 53248 1 | + | |
- | bridge | + | |
- | stp 16384 1 bridge | + | |
- | llc 16384 | + | |
- | nft_fib_inet | + | |
- | nft_fib_ipv4 | + | |
- | nft_fib_ipv6 | + | |
- | nft_fib | + | |
- | nft_reject_inet | + | |
- | nf_reject_ipv4 | + | |
- | nf_reject_ipv6 | + | |
- | --More-- | + | |
</ | </ | ||
- | 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 |
< | < | ||
- | [root@centos8 ~]# modprobe -r bonding | + | [root@centos8 ~]# nmcli c show |
- | [root@centos8 ~]# lsmod | more | + | NAME |
- | Module | + | ens18 fc4a4d23-b15e-47a7-bcfa-b2e08f49553e |
- | xt_CHECKSUM | + | virbr0 |
- | ipt_MASQUERADE | + | ip_fixe |
- | xt_conntrack | + | |
- | ipt_REJECT | + | |
- | nft_compat | + | |
- | nf_nat_tftp | + | |
- | nft_objref | + | |
- | nf_conntrack_tftp | + | |
- | nft_counter | + | |
- | tun 53248 1 | + | |
- | bridge | + | |
- | stp 16384 1 bridge | + | |
- | llc 16384 2 bridge, | + | |
- | nft_fib_inet | + | |
- | nft_fib_ipv4 | + | |
- | nft_fib_ipv6 | + | |
- | nft_fib | + | |
- | nft_reject_inet | + | |
- | nf_reject_ipv4 | + | |
- | nf_reject_ipv6 | + | |
- | nft_reject | + | |
- | --More-- | + | |
</ | </ | ||
- | Les dépendances des modules sont résolues par la commande | + | Notez que la sortie n' |
< | < | ||
- | [root@centos8 ~]# more / | + | [root@centos8 ~]# nmcli d show |
- | kernel/ | + | GENERAL.DEVICE: |
- | kernel/ | + | GENERAL.TYPE: ethernet |
- | kernel/ | + | GENERAL.HWADDR: |
- | kernel/ | + | GENERAL.MTU: 1500 |
- | kernel/ | + | GENERAL.STATE: 100 (connected) |
- | kernel/ | + | GENERAL.CONNECTION: ens18 |
- | kernel/arch/x86/ | + | GENERAL.CON-PATH: |
- | kernel/ | + | WIRED-PROPERTIES.CARRIER: on |
- | kernel/ | + | IP4.ADDRESS[1]: 10.0.2.45/24 |
- | kernel/ | + | IP4.GATEWAY: 10.0.2.1 |
- | xz kernel/ | + | IP4.ROUTE[1]: dst = 10.0.2.0/24, nh = 0.0.0.0, mt = 100 |
- | kernel/ | + | IP4.ROUTE[2]: dst = 0.0.0.0/0, nh = 10.0.2.1, mt = 100 |
- | kernel/arch/ | + | IP4.DNS[1]: 8.8.8.8 |
- | kernel/ | + | IP6.ADDRESS[1]: |
- | kernel/ | + | IP6.GATEWAY: |
- | kernel/ | + | IP6.ROUTE[1]: |
- | kernel/arch/ | + | IP6.ROUTE[2]: |
- | kernel/ | + | |
- | kernel/ | + | |
- | kernel/ | + | |
- | _64.ko.xz | + | |
- | kernel/ | + | |
- | --More--(0%) | + | |
- | </ | + | |
- | Il est possible d' | + | GENERAL.DEVICE: virbr0 |
+ | GENERAL.TYPE: | ||
+ | GENERAL.HWADDR: | ||
+ | GENERAL.MTU: | ||
+ | GENERAL.STATE: | ||
+ | GENERAL.CONNECTION: | ||
+ | GENERAL.CON-PATH: | ||
+ | IP4.ADDRESS[1]: | ||
+ | IP4.GATEWAY: | ||
+ | IP4.ROUTE[1]: | ||
+ | IP6.GATEWAY: | ||
- | < | + | GENERAL.DEVICE: lo |
- | [root@centos8 ~]# modinfo bonding | + | GENERAL.TYPE: loopback |
- | filename: | + | GENERAL.HWADDR: 00:00:00:00:00:00 |
- | author: Thomas Davis, tadavis@lbl.gov and many others | + | GENERAL.MTU: 65536 |
- | description: | + | GENERAL.STATE: 10 (unmanaged) |
- | license: | + | GENERAL.CONNECTION: -- |
- | alias: | + | GENERAL.CON-PATH: -- |
- | rhelversion: | + | IP4.ADDRESS[1]: 127.0.0.1/8 |
- | srcversion: 445F4CC9A2F7E64E3A87FD0 | + | IP4.GATEWAY: -- |
- | depends: | + | IP6.ADDRESS[1]: |
- | intree: | + | IP6.GATEWAY: -- |
- | name: | + | IP6.ROUTE[1]: dst = ::1/128, nh = ::, mt = 256 |
- | vermagic: | + | |
- | sig_id: PKCS#7 | + | GENERAL.DEVICE: virbr0-nic |
- | signer: CentOS kernel signing key | + | GENERAL.TYPE: tun |
- | sig_key: 3B:5A: | + | GENERAL.HWADDR: 52:54:00:79:02:66 |
- | sig_hashalgo: | + | GENERAL.MTU: 1500 |
- | signature: | + | GENERAL.STATE: |
- | B7: | + | GENERAL.CONNECTION: -- |
- | 3F: | + | GENERAL.CON-PATH: -- |
- | BE: | + | lines 28-50/50 (END) |
- | 44: | + | [q] |
- | DE: | + | |
- | 7F: | + | |
- | D8:08:5E:9D:00: | + | |
- | BA: | + | |
- | B8: | + | |
- | 8F: | + | |
- | 58: | + | |
- | 6E: | + | |
- | 50: | + | |
- | 2F: | + | |
- | | + | |
- | | + | |
- | A6: | + | |
- | AE:6D:58:B0:10: | + | |
- | 59: | + | |
- | parm: | + | |
- | parm: tx_queues: | + | |
- | parm: num_grat_arp: | + | |
- | parm: | + | |
- | parm: miimon:Link check interval in milliseconds (int) | + | |
- | parm: updelay:Delay before considering link up, in milliseconds (int) | + | |
- | parm: downdelay: | + | |
- | parm: | + | |
- | parm: mode:Mode of operation; 0 for balance-rr, 1 for active-backup, 2 for balance-xor, | + | |
- | parm: primary:Primary network device to use (charp) | + | |
- | parm: primary_reselect: | + | |
- | parm: lacp_rate:LACPDU tx rate to request from 802.3ad partner; 0 for slow, 1 for fast (charp) | + | |
- | parm: ad_select:802.3ad 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-alb, | + | |
- | parm: arp_interval:arp interval in milliseconds (int) | + | |
- | parm: | + | |
- | parm: arp_validate: | + | |
- | parm: arp_all_targets: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: resend_igmp: | + | |
- | parm: | + | |
- | parm: | + | |
</ | </ | ||
- | Dernièrement, | + | Pour activer |
< | < | ||
- | [root@centos8 ~]# ls / | + | [root@centos8 ~]# nmcli connection up ip_fixe |
- | firewalld-sysctls.conf | + | |
- | kvm.conf | + | |
- | [root@centos8 ~]# cat / | ||
- | # Setting modprobe kvm_intel/ | ||
- | # only enables Nested Virtualization until the next reboot or | ||
- | # module reload. Uncomment the option applicable | ||
- | # to your system below to enable the feature permanently. | ||
- | # | ||
- | # User changes in this file are preserved across upgrades. | ||
- | # | ||
- | # For Intel | ||
- | #options kvm_intel nested=1 | ||
- | # | ||
- | # For AMD | ||
- | #options kvm_amd nested=1 | ||
</ | </ | ||
- | =====LAB #2 - Compilation et installation | + | Notez que votre terminal est bloqué à cause du changement de l' |
- | Activez le dépôt | + | <WRAP center round todo 60%> |
+ | **A faire** - Revenez à l' | ||
+ | </ | ||
+ | |||
+ | Le profil ip_fixe est maintenant activé tandis que le profil enp0s3 a été désactivé | ||
< | < | ||
- | [root@centos8 ~]# vi /etc/yum.repos.d/CentOS-Linux-PowerTools.repo | + | [root@centos8 ~]# nmcli c show |
- | [root@centos8 ~]# cat /etc/yum.repos.d/CentOS-Linux-PowerTools.repo | + | NAME |
- | # CentOS-Linux-PowerTools.repo | + | ip_fixe |
- | # | + | virbr0 |
- | # The mirrorlist system uses the connecting IP address of the client and the | + | ens18 fc4a4d23-b15e-47a7-bcfa-b2e08f49553e |
- | # update status of each mirror to pick current mirrors that are geographically | + | |
- | # close to the client. You should use this for CentOS updates unless you are | + | [root@centos8 ~]# nmcli d show |
- | # manually picking other mirrors. | + | GENERAL.DEVICE: |
- | # | + | GENERAL.TYPE: |
- | # If the mirrorlist does not work for you, you can try the commented out | + | GENERAL.HWADDR: |
- | # baseurl line instead. | + | GENERAL.MTU: |
+ | GENERAL.STATE: | ||
+ | GENERAL.CONNECTION: | ||
+ | GENERAL.CON-PATH: | ||
+ | WIRED-PROPERTIES.CARRIER: | ||
+ | IP4.ADDRESS[1]: | ||
+ | IP4.GATEWAY: | ||
+ | IP4.ROUTE[1]: | ||
+ | IP4.ROUTE[2]: | ||
+ | IP6.ADDRESS[1]: | ||
+ | IP6.GATEWAY: | ||
+ | IP6.ROUTE[1]: | ||
+ | IP6.ROUTE[2]: dst = ff00::/8, nh = ::, mt = 256, table=255 | ||
+ | |||
+ | GENERAL.DEVICE: | ||
+ | GENERAL.TYPE: | ||
+ | GENERAL.HWADDR: | ||
+ | GENERAL.MTU: | ||
+ | GENERAL.STATE: | ||
+ | GENERAL.CONNECTION: | ||
+ | GENERAL.CON-PATH: | ||
+ | IP4.ADDRESS[1]: | ||
+ | IP4.GATEWAY: | ||
+ | IP4.ROUTE[1]: | ||
+ | IP6.GATEWAY: | ||
+ | |||
+ | GENERAL.DEVICE: | ||
+ | GENERAL.TYPE: | ||
+ | GENERAL.HWADDR: | ||
+ | GENERAL.MTU: | ||
+ | GENERAL.STATE: | ||
+ | GENERAL.CONNECTION: | ||
+ | GENERAL.CON-PATH: | ||
+ | IP4.ADDRESS[1]: | ||
+ | IP4.GATEWAY: | ||
+ | IP6.ADDRESS[1]: | ||
+ | IP6.GATEWAY: | ||
+ | IP6.ROUTE[1]: | ||
- | [powertools] | + | GENERAL.DEVICE: |
- | name=CentOS Linux $releasever | + | GENERAL.TYPE: tun |
- | mirrorlist=http:// | + | GENERAL.HWADDR: |
- | # | + | GENERAL.MTU: |
- | gpgcheck=1 | + | GENERAL.STATE: |
- | enabled=1 | + | GENERAL.CONNECTION: |
- | gpgkey=file:/// | + | GENERAL.CON-PATH: -- |
+ | lines 27-49/49 (END) | ||
+ | [q] | ||
</ | </ | ||
- | Installez maintenant | + | Pour consulter |
< | < | ||
- | [root@centos8 ~]# dnf groupinstall " | + | [root@centos8 ~]# nmcli -p connection show ens18 |
- | ... | + | =============================================================================== |
- | [root@centos8 ~]# dnf install asciidoc audit-libs-devel bash bc binutils binutils-devel bison diffutils elfutils elfutils-devel elfutils-libelf-devel findutils flex gawk gcc gettext gzip hmaccalc | + | Connection profile details (ens18) |
- | ... | + | =============================================================================== |
+ | connection.id: ens18 | ||
+ | connection.uuid: fc4a4d23-b15e-47a7-bcfa-b2e08f49553e | ||
+ | connection.stable-id: | ||
+ | connection.type: | ||
+ | connection.interface-name: ens18 | ||
+ | connection.autoconnect: | ||
+ | connection.autoconnect-priority: | ||
+ | connection.autoconnect-retries: | ||
+ | connection.multi-connect: | ||
+ | connection.auth-retries: | ||
+ | connection.timestamp: | ||
+ | connection.read-only: | ||
+ | connection.permissions: | ||
+ | connection.zone: | ||
+ | connection.master: | ||
+ | connection.slave-type: | ||
+ | connection.autoconnect-slaves: | ||
+ | connection.secondaries: | ||
+ | connection.gateway-ping-timeout: | ||
+ | connection.metered: | ||
+ | connection.lldp: | ||
+ | connection.mdns: | ||
+ | connection.llmnr: | ||
+ | connection.wait-device-timeout: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | 802-3-ethernet.port: | ||
+ | 802-3-ethernet.speed: | ||
+ | 802-3-ethernet.duplex: | ||
+ | 802-3-ethernet.auto-negotiate: | ||
+ | 802-3-ethernet.mac-address: | ||
+ | 802-3-ethernet.cloned-mac-address: | ||
+ | 802-3-ethernet.generate-mac-address-mask: | ||
+ | 802-3-ethernet.mac-address-blacklist: | ||
+ | 802-3-ethernet.mtu: | ||
+ | 802-3-ethernet.s390-subchannels: | ||
+ | 802-3-ethernet.s390-nettype: | ||
+ | 802-3-ethernet.s390-options: | ||
+ | 802-3-ethernet.wake-on-lan: | ||
+ | 802-3-ethernet.wake-on-lan-password: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | ipv4.method: | ||
+ | ipv4.dns: | ||
+ | ipv4.dns-search: | ||
+ | ipv4.dns-options: | ||
+ | ipv4.dns-priority: | ||
+ | ipv4.addresses: | ||
+ | ipv4.gateway: | ||
+ | ipv4.routes: | ||
+ | ipv4.route-metric: | ||
+ | ipv4.route-table: | ||
+ | ipv4.routing-rules: | ||
+ | ipv4.ignore-auto-routes: | ||
+ | ipv4.ignore-auto-dns: | ||
+ | ipv4.dhcp-client-id: | ||
+ | ipv4.dhcp-iaid: | ||
+ | ipv4.dhcp-timeout: | ||
+ | ipv4.dhcp-send-hostname: yes | ||
+ | ipv4.dhcp-hostname: | ||
+ | ipv4.dhcp-fqdn: -- | ||
+ | ipv4.dhcp-hostname-flags: | ||
+ | ipv4.never-default: | ||
+ | ipv4.may-fail: yes | ||
+ | ipv4.dad-timeout: | ||
+ | ipv4.dhcp-vendor-class-identifier: | ||
+ | ipv4.dhcp-reject-servers: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | ipv6.method: | ||
+ | ipv6.dns: -- | ||
+ | ipv6.dns-search: | ||
+ | ipv6.dns-options: | ||
+ | ipv6.dns-priority: | ||
+ | ipv6.addresses: | ||
+ | ipv6.gateway: | ||
+ | ipv6.routes: | ||
+ | ipv6.route-metric: | ||
+ | ipv6.route-table: | ||
+ | ipv6.routing-rules: | ||
+ | ipv6.ignore-auto-routes: | ||
+ | ipv6.ignore-auto-dns: | ||
+ | ipv6.never-default: | ||
+ | ipv6.may-fail: | ||
+ | ipv6.ip6-privacy: | ||
+ | ipv6.addr-gen-mode: | ||
+ | ipv6.ra-timeout: | ||
+ | ipv6.dhcp-duid: | ||
+ | ipv6.dhcp-iaid: | ||
+ | ipv6.dhcp-timeout: | ||
+ | ipv6.dhcp-send-hostname: | ||
+ | ipv6.dhcp-hostname: | ||
+ | ipv6.dhcp-hostname-flags: | ||
+ | ipv6.token: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | proxy.method: | ||
+ | proxy.browser-only: | ||
+ | proxy.pac-url: | ||
+ | proxy.pac-script: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | lines 56-100/100 (END) | ||
+ | [q] | ||
</ | </ | ||
- | ====2.1 - Déplacer /home==== | + | De même, pour consulter les paramètres du profil **ip_fixe**, |
- | <WRAP center round alert> | + | <code> |
- | **Important** - 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 noyau, celui-ci doit disposer de plus de 10 Go d' | + | [root@centos8 ~]# nmcli -p connection show ip_fixe |
- | </WRAP> | + | =============================================================================== |
+ | | ||
+ | =============================================================================== | ||
+ | connection.id: ip_fixe | ||
+ | connection.uuid: | ||
+ | connection.stable-id: | ||
+ | connection.type: | ||
+ | connection.interface-name: | ||
+ | connection.autoconnect: | ||
+ | connection.autoconnect-priority: | ||
+ | connection.autoconnect-retries: | ||
+ | connection.multi-connect: | ||
+ | connection.auth-retries: | ||
+ | connection.timestamp: | ||
+ | connection.read-only: | ||
+ | connection.permissions: | ||
+ | connection.zone: | ||
+ | connection.master: | ||
+ | connection.slave-type: | ||
+ | connection.autoconnect-slaves: | ||
+ | connection.secondaries: | ||
+ | connection.gateway-ping-timeout: | ||
+ | connection.metered: | ||
+ | connection.lldp: | ||
+ | connection.mdns: | ||
+ | connection.llmnr: | ||
+ | connection.wait-device-timeout: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | 802-3-ethernet.port: | ||
+ | 802-3-ethernet.speed: | ||
+ | 802-3-ethernet.duplex: | ||
+ | 802-3-ethernet.auto-negotiate: | ||
+ | 802-3-ethernet.mac-address: | ||
+ | 802-3-ethernet.cloned-mac-address: | ||
+ | 802-3-ethernet.generate-mac-address-mask: | ||
+ | 802-3-ethernet.mac-address-blacklist: | ||
+ | 802-3-ethernet.mtu: | ||
+ | 802-3-ethernet.s390-subchannels: | ||
+ | 802-3-ethernet.s390-nettype: | ||
+ | 802-3-ethernet.s390-options: | ||
+ | 802-3-ethernet.wake-on-lan: | ||
+ | 802-3-ethernet.wake-on-lan-password: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | ipv4.method: | ||
+ | ipv4.dns: | ||
+ | ipv4.dns-search: | ||
+ | ipv4.dns-options: | ||
+ | ipv4.dns-priority: | ||
+ | ipv4.addresses: | ||
+ | ipv4.gateway: | ||
+ | ipv4.routes: | ||
+ | ipv4.route-metric: | ||
+ | ipv4.route-table: | ||
+ | ipv4.routing-rules: | ||
+ | ipv4.ignore-auto-routes: | ||
+ | ipv4.ignore-auto-dns: | ||
+ | ipv4.dhcp-client-id: | ||
+ | ipv4.dhcp-iaid: | ||
+ | ipv4.dhcp-timeout: | ||
+ | ipv4.dhcp-send-hostname: | ||
+ | ipv4.dhcp-hostname: | ||
+ | ipv4.dhcp-fqdn: | ||
+ | ipv4.dhcp-hostname-flags: | ||
+ | ipv4.never-default: | ||
+ | ipv4.may-fail: | ||
+ | ipv4.dad-timeout: | ||
+ | ipv4.dhcp-vendor-class-identifier: | ||
+ | ipv4.dhcp-reject-servers: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | ipv6.method: | ||
+ | ipv6.dns: | ||
+ | ipv6.dns-search: | ||
+ | ipv6.dns-options: | ||
+ | ipv6.dns-priority: | ||
+ | ipv6.addresses: | ||
+ | ipv6.gateway: | ||
+ | ipv6.routes: | ||
+ | ipv6.route-metric: | ||
+ | ipv6.route-table: | ||
+ | ipv6.routing-rules: | ||
+ | ipv6.ignore-auto-routes: | ||
+ | ipv6.ignore-auto-dns: | ||
+ | ipv6.never-default: | ||
+ | ipv6.may-fail: | ||
+ | ipv6.ip6-privacy: | ||
+ | ipv6.addr-gen-mode: | ||
+ | ipv6.ra-timeout: | ||
+ | ipv6.dhcp-duid: | ||
+ | ipv6.dhcp-iaid: | ||
+ | ipv6.dhcp-timeout: | ||
+ | ipv6.dhcp-send-hostname: | ||
+ | ipv6.dhcp-hostname: | ||
+ | ipv6.dhcp-hostname-flags: | ||
+ | ipv6.token: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | proxy.method: | ||
+ | proxy.browser-only: | ||
+ | proxy.pac-url: | ||
+ | proxy.pac-script: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | =============================================================================== | ||
+ | Activate connection details (0f48c74d-5d16-4c37-8220-24644507b589) | ||
+ | =============================================================================== | ||
+ | GENERAL.NAME: | ||
+ | GENERAL.UUID: | ||
+ | GENERAL.DEVICES: | ||
+ | GENERAL.IP-IFACE: | ||
+ | GENERAL.STATE: | ||
+ | GENERAL.DEFAULT: | ||
+ | GENERAL.DEFAULT6: | ||
+ | GENERAL.SPEC-OBJECT: | ||
+ | GENERAL.VPN: | ||
+ | GENERAL.DBUS-PATH: | ||
+ | GENERAL.CON-PATH: | ||
+ | GENERAL.ZONE: | ||
+ | GENERAL.MASTER-PATH: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | IP4.ADDRESS[1]: | ||
+ | IP4.GATEWAY: | ||
+ | IP4.ROUTE[1]: | ||
+ | IP4.ROUTE[2]: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | IP6.ADDRESS[1]: | ||
+ | IP6.GATEWAY: | ||
+ | IP6.ROUTE[1]: | ||
+ | IP6.ROUTE[2]: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | lines 83-127/127 (END) | ||
+ | [q] | ||
+ | </code> | ||
- | Connectez-vous directement en tant que root à la machine virtuelle CentOS 8 et créez une seule partition sur **/ | + | Pour consulter la liste profils associés |
< | < | ||
- | [root@centos8 ~]# fdisk /dev/sdc | + | [root@centos8 ~]# nmcli -f CONNECTIONS device show ens18 |
+ | CONNECTIONS.AVAILABLE-CONNECTION-PATHS: | ||
+ | CONNECTIONS.AVAILABLE-CONNECTIONS[1]: | ||
+ | CONNECTIONS.AVAILABLE-CONNECTIONS[2]: | ||
+ | </ | ||
- | Welcome to fdisk (util-linux 2.32.1). | + | Les fichiers de configuration pour le periphérique **ens18** se trouvent dans le répertoire **/ |
- | Changes will remain in memory only, until you decide to write them. | + | |
- | Be careful before using the write command. | + | |
- | Device does not contain a recognized partition table. | + | < |
- | Created a new DOS disklabel with disk identifier 0xc321702b. | + | [root@centos8 ~]# ls -l / |
- | + | -rw-r--r--. 1 root root 417 Jun 16 06:39 ifcfg-ens18 | |
- | Command (m for help): n | + | -rw-r--r--. 1 root root 326 Aug 29 03:58 ifcfg-ip_fixe |
- | Partition type | + | </ |
- | | + | |
- | | + | |
- | Select (default p): | + | |
- | Using default response p. | + | ====1.2 - Résolution des Noms==== |
- | Partition number (1-4, default 1): | + | |
- | First sector (2048-41943039, | + | |
- | Last sector, +sectors or +size{K, | + | |
- | Created a new partition 1 of type 'Linux' | + | L'étude du fichier **/ |
- | Command (m for help): w | + | < |
- | The partition table has been altered. | + | [root@centos8 ~]# cat / |
- | Calling ioctl() to re-read partition table. | + | TYPE=Ethernet |
- | Syncing disks. | + | 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 | ||
</ | </ | ||
- | Créez maintenant un système de fichiers ext4 sur **/ | + | La résolution des noms est donc inactive |
< | < | ||
- | [root@centos8 ~]# mkfs.ext4 /dev/sdc1 | + | [root@centos8 ~]# ping www.free.fr |
- | mke2fs 1.45.6 (20-Mar-2020) | + | ping: www.free.fr: Name or service not known |
- | Discarding device blocks: done | + | |
- | Creating filesystem with 16776960 4k blocks and 4194304 inodes | + | |
- | Filesystem UUID: dc92c0d7-919b-4fff-8719-53e9e7e628dd | + | |
- | Superblock backups stored on blocks: | + | |
- | 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, | + | |
- | 4096000, 7962624, 11239424 | + | |
- | + | ||
- | Allocating group tables: done | + | |
- | Writing inode tables: done | + | |
- | Creating journal (65536 blocks): done | + | |
- | Writing superblocks and filesystem accounting information: done | + | |
</ | </ | ||
- | Montez | + | Modifiez donc la configuration du profil |
< | < | ||
- | [root@centos8 ~]# mount /dev/sdc1 /mnt | + | [root@centos8 ~]# nmcli connection mod ip_fixe ipv4.dns 8.8.8.8 |
</ | </ | ||
- | Copiez le contenu de /home vers /mnt : | + | L' |
< | < | ||
- | [root@centos8 ~]# cp -a /home/* /mnt | + | [root@centos8 ~]# cat /etc/sysconfig/network-scripts/ |
+ | 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 | ||
</ | </ | ||
- | Démontez /dev/sdc1 et déplacez /home vers /root : | + | Afin que la modification du serveur DNS soit prise en compte, re-démarrez le service NetworkManager |
< | < | ||
- | [root@centos8 ~]# umount /mnt | + | root@centos8 ~]# systemctl restart NetworkManager.service |
- | [root@centos8 ~]# mv /home /root | + | [root@centos8 ~]# systemctl status NetworkManager.service |
+ | ● NetworkManager.service - Network Manager | ||
+ | | ||
+ | | ||
+ | Docs: man: | ||
+ | Main PID: 973390 (NetworkManager) | ||
+ | Tasks: 4 (limit: 23535) | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: | ||
+ | Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: | ||
+ | Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: | ||
+ | Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: | ||
+ | Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: | ||
+ | Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: | ||
+ | Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: | ||
+ | Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: | ||
+ | Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: | ||
+ | Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: | ||
+ | lines 1-20/20 (END) | ||
+ | [q] | ||
</ | </ | ||
- | Identifiez l'UUID de /dev/sdc1 : | + | Vérifiez que le fichier **/etc/resolv.conf** ait été modifié par NetworkManager |
< | < | ||
- | [root@centos8 ~]# ls -l /dev/disk/by-uuid/ | grep sdc1 | + | [root@centos8 ~]# cat /etc/resolv.conf |
- | lrwxrwxrwx. 1 root root 10 Jul 19 12:02 f76d6b66-985b-4a91-af9c-4987e8c1443c -> ../../sdc | + | # Generated |
- | [root@centos8 ~]# | + | search ittraining.loc |
+ | nameserver 8.8.8.8 | ||
</ | </ | ||
- | Editez le fichier **/ | + | Dernièrement vérifiez la resolution des noms : |
< | < | ||
- | [root@centos8 ~]# vi /etc/fstab | + | [root@centos8 ~]# ping www.free.fr |
- | [root@centos8 ~]# cat /etc/fstab | + | PING www.free.fr (212.27.48.10) 56(84) bytes of data. |
+ | 64 bytes from www.free.fr (212.27.48.10): | ||
+ | 64 bytes from www.free.fr (212.27.48.10): | ||
+ | 64 bytes from www.free.fr (212.27.48.10): | ||
+ | 64 bytes from www.free.fr (212.27.48.10): | ||
+ | ^C | ||
+ | --- www.free.fr ping statistics --- | ||
+ | 4 packets transmitted, | ||
+ | rtt min/avg/max/mdev = 29.266/ | ||
+ | </code> | ||
- | # | + | <WRAP center round important 60%> |
- | # / | + | **Important** |
- | # Created by anaconda on Wed Jun 16 06:21:32 2021 | + | </WRAP> |
- | # | + | |
- | # Accessible filesystems, by reference, are maintained under '/ | + | ====1.3 - Ajouter une Deuxième Adresse IP à un Profil==== |
- | # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info. | + | |
- | # | + | Pour ajouter une deuxième adresse IP à un profil sous RHEL/CentOS 8, il convient d'utiliser la commande suivante : |
- | # After editing this file, run 'systemctl daemon-reload' | + | |
- | # units generated from this file. | + | < |
- | # | + | [root@centos8 ~]# nmcli connection mod ip_fixe +ipv4.addresses 192.168.1.2/24 |
- | / | + | |
- | UUID=1c04981e-5317-4b73-9695-3ce25246835d /boot | + | |
- | /dev/ | + | |
- | UUID=f76d6b66-985b-4a91-af9c-4987e8c1443c /home | + | |
</ | </ | ||
- | Créez le point de montage /home : | + | Rechargez la configuration du profil |
< | < | ||
- | [root@centos8 ~]# mkdir /home | + | [root@centos8 ~]# nmcli con up ip_fixe |
</ | </ | ||
- | Montez / | + | Saisissez ensuite la commande suivante |
< | < | ||
- | [root@centos8 ~]# mount -a | + | [root@centos8 ~]# nmcli connection show ip_fixe |
- | [root@centos8 ~]# mount | + | connection.id: |
- | sysfs on /sys type sysfs (rw, | + | connection.uuid: |
- | proc on /proc type proc (rw, | + | connection.stable-id: |
- | devtmpfs on /dev type devtmpfs | + | connection.type: 802-3-ethernet |
- | securityfs on / | + | connection.interface-name: |
- | tmpfs on / | + | connection.autoconnect: |
- | devpts on /dev/pts type devpts | + | connection.autoconnect-priority: |
- | tmpfs on /run type tmpfs (rw, | + | connection.autoconnect-retries: |
- | tmpfs on / | + | connection.multi-connect: |
- | cgroup | + | connection.auth-retries: |
- | pstore on / | + | connection.timestamp: |
- | bpf on /sys/fs/bpf type bpf (rw, | + | connection.read-only: |
- | cgroup on / | + | connection.permissions: |
- | cgroup on / | + | connection.zone: |
- | cgroup on / | + | connection.master: |
- | cgroup on / | + | connection.slave-type: -- |
- | cgroup on / | + | connection.autoconnect-slaves: |
- | cgroup on / | + | connection.secondaries: |
- | cgroup on / | + | connection.gateway-ping-timeout: |
- | cgroup on / | + | connection.metered: |
- | cgroup on / | + | connection.lldp: |
- | cgroup on / | + | connection.mdns: |
- | cgroup on / | + | connection.llmnr: |
- | none on / | + | connection.wait-device-timeout: |
- | configfs on / | + | 802-3-ethernet.port: |
- | / | + | 802-3-ethernet.speed: |
- | selinuxfs on /sys/fs/selinux type selinuxfs (rw, | + | 802-3-ethernet.duplex: |
- | mqueue on /dev/mqueue type mqueue (rw, | + | 802-3-ethernet.auto-negotiate: |
- | hugetlbfs on /dev/hugepages type hugetlbfs (rw, | + | 802-3-ethernet.mac-address: |
- | debugfs on /sys/kernel/debug type debugfs (rw, | + | 802-3-ethernet.cloned-mac-address: |
- | systemd-1 on /proc/sys/fs/ | + | 802-3-ethernet.generate-mac-address-mask: |
- | fusectl on / | + | 802-3-ethernet.mac-address-blacklist: |
- | /dev/sda1 on /boot type ext4 (rw, | + | 802-3-ethernet.mtu: |
- | sunrpc on / | + | 802-3-ethernet.s390-subchannels: |
- | tmpfs on / | + | 802-3-ethernet.s390-nettype: |
- | tmpfs on /run/user/42 type tmpfs (rw,nosuid, | + | 802-3-ethernet.s390-options: |
- | gvfsd-fuse on / | + | 802-3-ethernet.wake-on-lan: |
- | tmpfs on /run/user/0 type tmpfs (rw, | + | 802-3-ethernet.wake-on-lan-password: |
- | gvfsd-fuse on /run/ | + | ipv4.method: |
- | /dev/sdc1 on /home type ext4 (rw, | + | ipv4.dns: |
+ | ipv4.dns-search: | ||
+ | ipv4.dns-options: | ||
+ | ipv4.dns-priority: | ||
+ | ipv4.addresses: | ||
+ | ipv4.gateway: | ||
+ | ipv4.routes: | ||
+ | ipv4.route-metric: | ||
+ | ipv4.route-table: | ||
+ | ipv4.routing-rules: | ||
+ | ipv4.ignore-auto-routes: | ||
+ | ipv4.ignore-auto-dns: | ||
+ | ipv4.dhcp-client-id: | ||
+ | ipv4.dhcp-iaid: | ||
+ | ipv4.dhcp-timeout: | ||
+ | ipv4.dhcp-send-hostname: | ||
+ | ipv4.dhcp-hostname: | ||
+ | ipv4.dhcp-fqdn: | ||
+ | ipv4.dhcp-hostname-flags: | ||
+ | ipv4.never-default: | ||
+ | ipv4.may-fail: | ||
+ | ipv4.dad-timeout: | ||
+ | ipv4.dhcp-vendor-class-identifier: | ||
+ | ipv4.dhcp-reject-servers: | ||
+ | ipv6.method: | ||
+ | ipv6.dns: | ||
+ | ipv6.dns-search: | ||
+ | ipv6.dns-options: | ||
+ | ipv6.dns-priority: | ||
+ | ipv6.addresses: | ||
+ | ipv6.gateway: | ||
+ | ipv6.routes: | ||
+ | ipv6.route-metric: | ||
+ | ipv6.route-table: | ||
+ | ipv6.routing-rules: | ||
+ | ipv6.ignore-auto-routes: | ||
+ | ipv6.ignore-auto-dns: | ||
+ | ipv6.never-default: | ||
+ | ipv6.may-fail: | ||
+ | ipv6.ip6-privacy: | ||
+ | ipv6.addr-gen-mode: | ||
+ | ipv6.ra-timeout: | ||
+ | ipv6.dhcp-duid: | ||
+ | ipv6.dhcp-iaid: | ||
+ | ipv6.dhcp-timeout: | ||
+ | ipv6.dhcp-send-hostname: | ||
+ | ipv6.dhcp-hostname: | ||
+ | ipv6.dhcp-hostname-flags: | ||
+ | ipv6.token: | ||
+ | proxy.method: | ||
+ | proxy.browser-only: | ||
+ | proxy.pac-url: | ||
+ | proxy.pac-script: | ||
+ | GENERAL.NAME: | ||
+ | GENERAL.UUID: | ||
+ | GENERAL.DEVICES: | ||
+ | GENERAL.IP-IFACE: | ||
+ | GENERAL.STATE: | ||
+ | GENERAL.DEFAULT: | ||
+ | GENERAL.DEFAULT6: | ||
+ | GENERAL.SPEC-OBJECT: | ||
+ | GENERAL.VPN: | ||
+ | GENERAL.DBUS-PATH: | ||
+ | GENERAL.CON-PATH: | ||
+ | GENERAL.ZONE: | ||
+ | GENERAL.MASTER-PATH: | ||
+ | IP4.ADDRESS[1]: | ||
+ | IP4.ADDRESS[2]: | ||
+ | IP4.GATEWAY: | ||
+ | IP4.ROUTE[1]: | ||
+ | IP4.ROUTE[2]: | ||
+ | IP4.ROUTE[3]: | ||
+ | IP4.DNS[1]: | ||
+ | IP6.ADDRESS[1]: | ||
+ | IP6.GATEWAY: | ||
+ | IP6.ROUTE[1]: | ||
+ | IP6.ROUTE[2]: | ||
+ | lines 72-116/116 (END) | ||
+ | [q] | ||
</ | </ | ||
- | Notez la taille | + | <WRAP center round important 60%> |
+ | **Important** : Notez l' | ||
+ | </ | ||
+ | |||
+ | Consultez maintenant le contenu du fichier **/ | ||
< | < | ||
- | [root@centos8 ~]# df -h | + | [root@centos8 ~]# cat / |
- | Filesystem | + | TYPE=Ethernet |
- | devtmpfs | + | PROXY_METHOD=none |
- | tmpfs 1.9G 0 1.9G 0% /dev/shm | + | BROWSER_ONLY=no |
- | tmpfs 1.9G 9.4M | + | BOOTPROTO=none |
- | tmpfs 1.9G | + | IPADDR=10.0.2.46 |
- | / | + | PREFIX=24 |
- | / | + | GATEWAY=10.0.2.1 |
- | tmpfs 374M | + | DEFROUTE=yes |
- | tmpfs 374M | + | 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 | ||
+ | IPADDR1=192.168.1.2 | ||
+ | PREFIX1=24 | ||
</ | </ | ||
- | <WRAP center round todo> | + | <WRAP center round important 60%> |
- | **A faire** - Fermez la session | + | **Important** : Notez l' |
</ | </ | ||
- | ====2.2 - Préparer l' | + | ====1.4 - La Commande hostname==== |
- | Pour créer l' | + | La procédure |
< | < | ||
- | [trainee@centos8 ~]$ rpmdev-setuptree | + | [root@centos8 ~]# hostname |
- | ...> | + | centos8.ittraining.loc |
- | [trainee@centos8 | + | |
- | rpmbuild/: | + | |
- | total 28 | + | |
- | drwxrwxr-x. 7 trainee trainee 4096 Jul 19 12:10 . | + | |
- | drwxr-xr-x. 17 trainee trainee 4096 Jul 19 12:10 .. | + | |
- | drwxrwxr-x. | + | |
- | drwxrwxr-x. | + | |
- | drwxrwxr-x. | + | |
- | drwxrwxr-x. | + | |
- | drwxrwxr-x. 2 trainee trainee 4096 Jul 19 12:10 SRPMS | + | |
- | rpmbuild/ | + | [root@centos8 ~]# nmcli general hostname centos.ittraining.loc |
- | total 8 | + | |
- | drwxrwxr-x. 2 trainee trainee 4096 Jul 19 12:10 . | + | |
- | drwxrwxr-x. 7 trainee trainee 4096 Jul 19 12:10 .. | + | |
- | rpmbuild/RPMS: | + | [root@centos8 ~]# cat /etc/ |
- | total 8 | + | centos.ittraining.loc |
- | drwxrwxr-x. 2 trainee trainee 4096 Jul 19 12:10 . | + | |
- | drwxrwxr-x. 7 trainee trainee 4096 Jul 19 12:10 .. | + | |
- | rpmbuild/ | + | [root@centos8 ~]# hostname |
- | total 8 | + | centos.ittraining.loc |
- | drwxrwxr-x. 2 trainee trainee 4096 Jul 19 12:10 . | + | |
- | drwxrwxr-x. 7 trainee trainee 4096 Jul 19 12:10 .. | + | |
- | rpmbuild/ | + | [root@centos8 ~]# nmcli general hostname centos8.ittraining.loc |
- | total 8 | + | |
- | drwxrwxr-x. 2 trainee trainee 4096 Jul 19 12:10 . | + | |
- | drwxrwxr-x. 7 trainee trainee 4096 Jul 19 12:10 .. | + | |
- | rpmbuild/SRPMS: | + | [root@centos8 ~]# cat /etc/ |
- | total 8 | + | centos8.ittraining.loc |
- | drwxrwxr-x. 2 trainee trainee 4096 Jul 19 12:10 . | + | |
- | drwxrwxr-x. 7 trainee trainee 4096 Jul 19 12:10 .. | + | [root@centos8 ~]# hostname |
+ | centos8.ittraining.loc | ||
</ | </ | ||
- | 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 | ||
< | < | ||
- | [trainee@centos8 ~]$ uname -a | + | [root@centos8 ~]# ip address |
- | Linux centos8.ittraining.loc 4.18.0-305.7.1.el8_4.x86_64 #1 SMP Tue Jun 29 21:55:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux | + | 1: lo: < |
+ | link/ | ||
+ | inet 127.0.0.1/8 scope host lo | ||
+ | | ||
+ | inet6 ::1/128 scope host | ||
+ | | ||
+ | 2: ens18: < | ||
+ | link/ether 4e: | ||
+ | inet 10.0.2.46/24 brd 10.0.2.255 scope global noprefixroute ens18 | ||
+ | | ||
+ | inet 192.168.1.2/24 brd 192.168.1.255 scope global noprefixroute ens18 | ||
+ | | ||
+ | inet6 fe80::5223: | ||
+ | | ||
+ | 3: virbr0: < | ||
+ | link/ether 52: | ||
+ | inet 192.168.122.1/ | ||
+ | | ||
+ | 4: virbr0-nic: < | ||
+ | link/ether 52: | ||
+ | </code> | ||
- | [trainee@centos8 ~]$ cat / | + | ===Options de la Commande ip=== |
- | CentOS Linux release 8.4.2105 | + | |
- | [trainee@centos8 ~]$ wget https:// | + | Les options de cette commande sont : |
- | --2021-07-14 02: | + | |
- | Resolving vault.centos.org (vault.centos.org)... 81.171.33.194, | + | |
- | Connecting to vault.centos.org (vault.centos.org)|81.171.33.194|: | + | |
- | HTTP request sent, awaiting response... 200 OK | + | |
- | Length: 123000617 (117M) [application/ | + | |
- | Saving to: ‘kernel-4.18.0-305.7.1.el8_4.src.rpm’ | + | |
- | kernel-4.18.0-305.7.1. 100%[===========================> | + | < |
+ | [root@centos8 ~]# ip --help | ||
+ | Usage: ip [ OPTIONS ] OBJECT { COMMAND | help } | ||
+ | ip [ -force ] -batch filename | ||
+ | where OBJECT := { link | address | addrlabel | route | rule | neigh | ntable | | ||
+ | | ||
+ | netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila | | ||
+ | vrf | sr | nexthop | mptcp } | ||
+ | | ||
+ | -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]} | ||
- | 2021-07-14 02:55:33 (1.49 MB/s) - ‘kernel-4.18.0-305.7.1.el8_4.src.rpm’ saved [123000617/ | ||
</ | </ | ||
- | Installez maintenant les dépendances | + | ====1.6 - Activer/ |
+ | |||
+ | Deux commandes existent | ||
< | < | ||
- | [trainee@centos8 ~]$ su - | + | # nmcli device disconnect enp0s3 |
- | Mot de passe : fenestros | + | # nmcli device connect enp0s3 |
+ | </ | ||
- | [root@centos8 ~]# dnf install yum-utils | + | <WRAP center round important 60%> |
- | ... | + | **Important** : Veuillez ne **PAS** exécuter ces deux commandes. |
+ | </ | ||
+ | |||
+ | ====1.7 - Routage Statique==== | ||
+ | |||
+ | ===La commande ip=== | ||
+ | |||
+ | Sous RHEL/CentOS 8, pour supprimer la route vers le réseau 192.168.1.0 il convient d' | ||
+ | |||
+ | < | ||
+ | [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/ | ||
+ | 192.168.122.0/ | ||
- | [root@centos8 ~]# yum-builddep / | + | 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 | ||
</ | </ | ||
- | Installez maintenant | + | Pour ajouter la route vers le réseau 192.168.1.0 : |
< | < | ||
- | [root@centos8 ~]# exit | + | [root@centos8 ~]# ip route add 192.168.1.0/ |
- | logout | + | [root@centos8 ~]# ip route |
- | [trainee@centos8 ~]$ rpm -Uvh kernel-4.18.0-305.7.1.el8_4.src.rpm | + | default via 10.0.2.1 dev ens18 proto static metric 100 |
- | Updating | + | 10.0.2.0/24 dev ens18 proto kernel scope link src 10.0.2.46 metric 100 |
- | 1:kernel-4.18.0-305.7.1.el8_4 | + | 192.168.1.0/24 via 10.0.2.1 dev ens18 |
- | warning: group mockbuild does not exist - using root | + | 192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | ################################# | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
- | warning: user mockbuild does not exist - using root | + | |
- | warning: group mockbuild does not exist - using root | + | |
</ | </ | ||
- | <WRAP center round important> | + | <WRAP center round important |
- | **Important** - 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//**. |
</ | </ | ||
- | ====2.3 - Préparer l' | + | ===Désactiver/ |
- | Naviguez vers le repertoire **~/ | + | Pour désactiver |
< | < | ||
- | [trainee@centos7 | + | [root@centos8 |
- | [trainee@centos7 SPECS]$ rpmbuild -bp --target=$(uname -m) kernel.spec | + | 1 |
- | ... | + | [root@centos8 |
+ | [root@centos8 ~]# cat / | ||
+ | 0 | ||
</ | </ | ||
- | A l'issu du processus, examinez l'arborescence | + | Pour activer le routage sur le serveur, il convient d'activer la retransmission des paquets: |
< | < | ||
- | [trainee@centos8 | + | [root@centos8 |
- | total 812 | + | [root@centos8 ~]# cat /proc/sys/net/ |
- | drwxr-xr-x. | + | 1 |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | -rw-r--r--. | + | |
- | -rw-r--r--. | + | |
- | drwxr-xr-x. | + | |
- | -rw-r--r--. | + | |
- | -rw-r--r--. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. 119 trainee trainee | + | |
- | drwxr-xr-x. 137 trainee trainee | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | -rw-r--r--. | + | |
- | -rw-r--r--. | + | |
- | -rw-r--r--. | + | |
- | -rw-r--r--. | + | |
- | -rw-r--r--. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | -rw-r--r--. | + | |
- | -rw-r--r--. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | -rw-r--r--. | + | |
- | -rw-r--r--. | + | |
- | -rw-r--r--. | + | |
- | -rw-r--r--. | + | |
- | -rw-r--r--. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | -rw-r--r--. | + | |
- | drwxr-xr-x. | + | |
- | -rw-r--r--. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
</ | </ | ||
- | ===Le Fichier | + | =====LAB #2 - Diagnostique du Réseau===== |
+ | |||
+ | ====2.1 - ping==== | ||
- | Changez de répertoire de travail | + | Pour tester l' |
< | < | ||
- | [trainee@centos8 | + | [root@centos8 ~]# ping -c4 10.0.2.1 |
+ | PING 10.0.2.1 (10.0.2.1) 56(84) bytes of data. | ||
+ | 64 bytes from 10.0.2.1: icmp_seq=1 ttl=64 time=0.104 ms | ||
+ | 64 bytes from 10.0.2.1: icmp_seq=2 ttl=64 time=0.325 ms | ||
+ | 64 bytes from 10.0.2.1: icmp_seq=3 ttl=64 time=0.250 ms | ||
+ | 64 bytes from 10.0.2.1: icmp_seq=4 ttl=64 time=0.123 ms | ||
+ | |||
+ | --- 10.0.2.1 ping statistics --- | ||
+ | 4 packets transmitted, | ||
+ | rtt min/avg/max/mdev = 0.104/0.200/0.325/0.092 ms | ||
</ | </ | ||
- | Copiez le fichier **configs/ | + | ===Options de la commande ping=== |
+ | |||
+ | Les options de cette commande sont : | ||
< | < | ||
- | [trainee@centos8 | + | [root@centos8 |
+ | ping: invalid option -- ' | ||
+ | Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface] | ||
+ | [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos] | ||
+ | [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option] | ||
+ | [-w deadline] [-W timeout] [hop1 ...] destination | ||
+ | Usage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface] | ||
+ | [-l preload] [-m mark] [-M pmtudisc_option] | ||
+ | [-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize] | ||
+ | [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline] | ||
+ | [-W timeout] destination | ||
</ | </ | ||
- | Mettez à jour le fichier | + | ====2.2 - netstat -i==== |
+ | |||
+ | Pour visualiser les statistiques réseaux, vous disposez de la commande **netstat** | ||
< | < | ||
- | [trainee@centos8 | + | [root@centos8 |
- | scripts/ | + | Kernel Interface table |
- | # | + | Iface |
- | # configuration written to .config | + | ens18 1500 |
- | # | + | lo 65536 10936 0 0 0 |
+ | virbr0 | ||
</ | </ | ||
- | <WRAP center round important> | + | ===Options de la commande |
- | **Important** - 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 configuration du noyau se trouve dans un fichier dénommé **.config**. Le fichier **.config** est généré par une des trois commandes suivantes et ne doit **pas** être édité manuellement : | + | Les options de cette commande |
- | + | ||
- | * make config | + | |
- | * make menuconfig | + | |
- | * make xconfig | + | |
- | + | ||
- | Exécutez la commande | + | |
< | < | ||
- | [trainee@centos8 | + | [root@centos8 |
- | | + | usage: netstat [-vWeenNcCF] [< |
- | | + | |
- | | + | netstat { [-vWeenNac] -I[< |
- | | + | |
- | | + | -r, --route |
- | | + | -I, --interfaces=< |
- | | + | -i, --interfaces |
- | | + | -g, --groups |
- | | + | -s, --statistics |
- | scripts/ | + | -M, --masquerade |
- | # | + | |
- | # using defaults found in / | + | -v, --verbose |
- | # | + | -W, --wide |
+ | -n, --numeric | ||
+ | --numeric-hosts | ||
+ | --numeric-ports | ||
+ | --numeric-users | ||
+ | -N, --symbolic | ||
+ | -e, --extend | ||
+ | -p, --programs | ||
+ | -o, --timers | ||
+ | -c, --continuous | ||
+ | |||
+ | -l, --listening | ||
+ | -a, --all display all sockets (default: connected) | ||
+ | -F, --fib display Forwarding Information Base (default) | ||
+ | -C, --cache | ||
+ | -Z, --context | ||
+ | |||
+ | | ||
+ | {-x|--unix} --ax25 --ipx --netrom | ||
+ | < | ||
+ | List of possible address families (which support routing): | ||
+ | inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) | ||
+ | | ||
+ | x25 (CCITT X.25) | ||
</ | </ | ||
- | Dans l' | + | ====2.3 - traceroute==== |
- | * **y**, | + | La commande ping est à la base de la commande |
- | * la fonctionalité | + | |
- | * **m**, | + | |
- | * la fonctionalité est incluse en tant que module, | + | |
- | | + | |
- | | + | |
- | <WRAP center round important> | + | <code> |
- | **Important** - Cette commande permet la modification | + | [root@centos8 ~]# traceroute www.ittraining.network |
- | </WRAP> | + | bash: traceroute: command not found... |
- | + | Install package ' | |
- | Sauvegardez simplement | + | |
+ | |||
+ | | ||
+ | The following packages have to be installed: | ||
+ | | ||
+ | Proceed with changes? [N/y] y | ||
+ | |||
+ | |||
+ | * Waiting in queue... | ||
+ | * Waiting for authentication... | ||
+ | * Waiting in queue... | ||
+ | * Downloading packages... | ||
+ | * Requesting data... | ||
+ | * Testing changes... | ||
+ | * Installing packages... | ||
+ | traceroute to www.ittraining.network (109.228.56.52), | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 10 ae-14.bb-b.fr7.fra.de.oneandone.net (212.227.120.149) | ||
+ | 11 port-channel-3.gw-ngcs-1.dc1.con.glo.gb.oneandone.net (88.208.255.131) | ||
+ | 12 109.228.63.209 (109.228.63.209) | ||
+ | 13 * 109.228.63.209 (109.228.63.209) | ||
+ | 14 * * * | ||
+ | 15 * * * | ||
+ | 16 * * * | ||
+ | 17 * * * | ||
+ | 18 * * * | ||
+ | 19 * * * | ||
+ | 20 * * * | ||
+ | 21 * * * | ||
+ | 22 * * * | ||
+ | 23 * * * | ||
+ | 24 * * * | ||
+ | 25 * * * | ||
+ | 26 * * * | ||
+ | 27 * * * | ||
+ | 28 * * * | ||
+ | 29 * * *^C | ||
+ | </code> | ||
+ | |||
+ | ===Options de la commande traceroute=== | ||
+ | |||
+ | Les options | ||
< | < | ||
- | *** End of the configuration. | + | [root@centos8 ~]# traceroute --help |
- | *** Execute ' | + | Usage: |
+ | traceroute [ -46dFITnreAUDV ] [ -f first_ttl ] [ -g gate,... ] [ -i device ] [ -m max_ttl ] [ -N squeries ] [ -p port ] [ -t tos ] [ -l flow_label ] [ -w MAX, | ||
+ | Options: | ||
+ | -4 Use IPv4 | ||
+ | -6 Use IPv6 | ||
+ | -d --debug | ||
+ | -F --dont-fragment | ||
+ | -f first_ttl | ||
+ | Start from the first_ttl hop (instead from 1) | ||
+ | -g gate, | ||
+ | Route packets through the specified gateway | ||
+ | (maximum 8 for IPv4 and 127 for IPv6) | ||
+ | -I --icmp | ||
+ | -T --tcp Use TCP SYN for tracerouting (default port is 80) | ||
+ | -i device | ||
+ | Specify a network interface to operate with | ||
+ | -m max_ttl | ||
+ | Set the max number | ||
+ | reached). Default is 30 | ||
+ | -N squeries | ||
+ | Set the number of probes to be tried | ||
+ | simultaneously (default is 16) | ||
+ | -n Do not resolve IP addresses to their domain names | ||
+ | -p port --port=port | ||
+ | | ||
+ | (incremented by each probe, default is 33434), or | ||
+ | initial seq for " | ||
+ | default from 1), or some constant destination | ||
+ | port for other methods (with default of 80 for | ||
+ | " | ||
+ | -t tos --tos=tos | ||
+ | traffic class) value for outgoing packets | ||
+ | -l flow_label | ||
+ | Use specified flow_label for IPv6 packets | ||
+ | -w MAX, | ||
+ | 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 | ||
+ | Set the number of probes per each hop. Default is | ||
+ | 3 | ||
+ | -r Bypass the normal routing and send directly | ||
+ | host on an attached network | ||
+ | -s src_addr | ||
+ | Use source src_addr for outgoing packets | ||
+ | -z sendwait | ||
+ | Minimal time interval between probes (default 0). | ||
+ | If the value is more than 10, then it specifies a | ||
+ | number in milliseconds, | ||
+ | seconds (float point values allowed too) | ||
+ | -e --extensions | ||
+ | -A --as-path-lookups | ||
+ | print results directly after the corresponding | ||
+ | addresses | ||
+ | -M name --module=name | ||
+ | for traceroute operations. Most methods have | ||
+ | their shortcuts (`-I' | ||
+ | -O OPTS, | ||
+ | Use module-specific option OPTS for the | ||
+ | traceroute module. Several OPTS allowed, | ||
+ | separated by comma. If OPTS is "help", print info | ||
+ | about available options | ||
+ | --sport=num | ||
+ | `-N 1' | ||
+ | --fwmark=num | ||
+ | -U --udp Use UDP to particular port for tracerouting | ||
+ | (instead of increasing the port per each probe), | ||
+ | default port is 53 | ||
+ | -UL Use UDPLITE for tracerouting (default dest port | ||
+ | is 53) | ||
+ | -D --dccp | ||
+ | is 33434) | ||
+ | -P prot --protocol=prot | ||
+ | --mtu | ||
+ | `-F -N 1' | ||
+ | --back | ||
+ | print if it differs | ||
+ | -V --version | ||
+ | --help | ||
+ | |||
+ | Arguments: | ||
+ | + | ||
+ | packetlen | ||
+ | header plus 40). Can be ignored or increased to a minimal | ||
+ | allowed value | ||
</ | </ | ||
- | Vérifiez que le fichier | + | =====LAB #3 - Connexions à Distance===== |
+ | |||
+ | ==== 3.1 - Telnet ==== | ||
+ | |||
+ | WRAP center round important> | ||
+ | **Important** - Si la commande **telnet** n'est pas installée sous CentOS 8, installez-le à l'aide de la commande | ||
+ | </ | ||
+ | |||
+ | La commande | ||
+ | |||
+ | < | ||
+ | # telnet numero_ip | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | **Important** - Le service telnet revient à une redirection des canaux standards d'entrée et de sortie. Notez que la connexion n'est **pas** sécurisée. Pour fermer la connexion, il faut saisir la commande **exit**. La commande telnet n' | ||
+ | </ | ||
+ | |||
+ | ===Options de la commande telnet=== | ||
+ | |||
+ | Les options | ||
< | < | ||
- | [trainee@centos8 | + | [[root@centos8 |
- | . certs configs | + | telnet: invalid option -- ' |
- | .. | + | Usage: telnet [-4] [-6] [-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user] |
- | arch | + | |
- | block .config | + | |
</ | </ | ||
- | Consultez ce fichier : | + | ==== 3.2 - wget ==== |
+ | |||
+ | La commande **wget** est utilisée pour récupérer un fichier | ||
< | < | ||
- | [trainee@centos8 | + | [root@centos8 |
- | # | + | --2021-08-29 06: |
- | # Automatically generated file; DO NOT EDIT. | + | Resolving www.dropbox.com (www.dropbox.com)... 162.125.67.18, 2620: |
- | # Linux/x86 4.18.0 Kernel Configuration | + | Connecting to www.dropbox.com (www.dropbox.com)|162.125.67.18|: |
- | # | + | HTTP request sent, awaiting response... 301 Moved Permanently |
+ | Location: / | ||
+ | --2021-08-29 06: | ||
+ | Reusing existing connection to www.dropbox.com: | ||
+ | HTTP request sent, awaiting response... 302 Found | ||
+ | Location: https:// | ||
+ | --2021-08-29 06: | ||
+ | Resolving uc8a5f475f4a5f849fd1055f560f.dl.dropboxusercontent.com (uc8a5f475f4a5f849fd1055f560f.dl.dropboxusercontent.com)... 162.125.67.15, | ||
+ | Connecting to uc8a5f475f4a5f849fd1055f560f.dl.dropboxusercontent.com (uc8a5f475f4a5f849fd1055f560f.dl.dropboxusercontent.com)|162.125.67.15|: | ||
+ | HTTP request sent, awaiting response... 200 OK | ||
+ | Length: 46 [text/ | ||
+ | Saving to: ‘wget_file.txt’ | ||
- | # | + | wget_file.txt 100%[===================>] 46 |
- | # Compiler: gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1) | + | |
- | # | + | |
- | CONFIG_64BIT=y | + | |
- | CONFIG_X86_64=y | + | |
- | CONFIG_X86=y | + | |
- | CONFIG_INSTRUCTION_DECODER=y | + | |
- | CONFIG_OUTPUT_FORMAT=" | + | |
- | CONFIG_ARCH_DEFCONFIG=" | + | |
- | CONFIG_LOCKDEP_SUPPORT=y | + | |
- | CONFIG_STACKTRACE_SUPPORT=y | + | |
- | CONFIG_MMU=y | + | |
- | CONFIG_ARCH_MMAP_RND_BITS_MIN=28 | + | |
- | CONFIG_ARCH_MMAP_RND_BITS_MAX=32 | + | |
- | CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 | + | |
- | CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 | + | |
- | 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_GENERIC_CALIBRATE_DELAY=y | + | |
- | CONFIG_ARCH_HAS_CPU_RELAX=y | + | |
- | CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y | + | |
- | CONFIG_ARCH_HAS_FILTER_PGPROT=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_ARCH_WANT_HUGE_PMD_SHARE=y | + | |
- | CONFIG_ARCH_WANT_GENERAL_HUGETLB=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 | + | |
- | --More--(0%) | + | |
- | </code> | + | |
- | ===Le Fichier Makefile=== | + | 2021-08-29 06:22:27 (26.9 MB/s) - ‘wget_file.txt’ saved [46/46] |
- | Le fichier **Makefile** contient le nom du noyau et spécifie les informations suivantes : | + | [root@centos8 ~]# cat wget_file.txt |
+ | This is a file retrieved by the wget command. | ||
+ | </ | ||
- | * VERSION, | + | ===Options de la commande wget=== |
- | * PATCHLEVEL, | + | |
- | * SUBLEVEL, | + | |
- | * EXTRAVERSION. | + | |
- | Les trois premières informations | + | Les options de cette commande |
< | < | ||
- | [trainee@centos8 | + | [root@centos8 |
- | # SPDX-License-Identifier: | + | GNU Wget 1.19.5, a non-interactive network retriever. |
- | VERSION = 4 | + | Usage: wget [OPTION]... [URL]... |
- | PATCHLEVEL = 18 | + | |
- | SUBLEVEL = 0 | + | |
- | EXTRAVERSION = | + | |
- | NAME = Merciless Moray | + | |
- | # | + | Mandatory arguments to long options are mandatory for short options too. |
- | # DRM backport version | + | |
- | # | + | |
- | RHEL_DRM_VERSION = 5 | + | |
- | RHEL_DRM_PATCHLEVEL = 9 | + | |
- | RHEL_DRM_SUBLEVEL = 14 | + | |
- | # *DOCUMENTATION* | + | Startup: |
- | # To see a list of typical targets execute "make help" | + | |
- | # More info can be located in ./README | + | -h, |
- | # Comments in this file are targeted only to the developer, do not | + | |
- | # expect to learn how to build the kernel reading this file. | + | -e, --execute=COMMAND |
- | # That's our default target when none is given on the command line | + | Logging and input file: |
- | PHONY := _all | + | -o, --output-file=FILE |
- | _all: | + | -a, --append-output=FILE |
+ | -d, --debug | ||
+ | -q, --quiet | ||
+ | -v, --verbose | ||
+ | -nv, --no-verbose | ||
+ | | ||
+ | | ||
+ | | ||
+ | -F, --force-html | ||
+ | -B, --base=URL | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
- | # o Do not use make' | + | Download: |
- | # (this increases performance and avoids hard-to-debug behaviour); | + | -t, --tries=NUMBER |
- | # o Look for make include | + | |
- | MAKEFLAGS += -rR --include-dir=$(CURDIR) | + | |
+ | -O, --output-document=FILE | ||
+ | -nc, --no-clobber | ||
+ | | ||
+ | | ||
+ | -c, --continue | ||
+ | | ||
+ | | ||
+ | | ||
+ | -N, --timestamping | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | the one on the server | ||
+ | | ||
+ | | ||
+ | -T, --timeout=SECONDS | ||
+ | --dns-timeout=SECS | ||
+ | | ||
+ | | ||
+ | -w, --wait=SECONDS | ||
+ | | ||
+ | | ||
+ | | ||
+ | -Q, --quota=NUMBER | ||
+ | | ||
+ | --limit-rate=RATE | ||
+ | | ||
+ | | ||
+ | | ||
+ | -4, --inet4-only | ||
+ | -6, --inet6-only | ||
+ | | ||
+ | one of IPv6, IPv4, or none | ||
+ | | ||
+ | --password=PASS | ||
+ | --ask-password | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
- | # Avoid funny character set dependencies | + | Directories: |
- | unexport LC_ALL | + | -nd, --no-directories |
- | LC_COLLATE=C | + | |
- | LC_NUMERIC=C | + | -nH, --no-host-directories |
- | export LC_COLLATE LC_NUMERIC | + | |
+ | -P, --directory-prefix=PREFIX | ||
+ | --cut-dirs=NUMBER | ||
- | # Avoid interference | + | HTTP options: |
- | unexport GREP_OPTIONS | + | |
+ | | ||
+ | | ||
+ | | ||
+ | this is ' | ||
+ | -E, --adjust-extension | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | -U, --user-agent=AGENT | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | challenge | ||
- | # Set RHEL variables | + | HTTPS (SSL/TLS) options: |
- | # Use this spot to avoid future merge conflicts | + | --secure-protocol=PR |
- | include Makefile.rhelver | + | |
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | of base64 encoded sha256 hashes preceded by | ||
+ | ' | ||
+ | peer against | ||
- | # We are using a recursive build, so we need to do a little thinking | + | |
- | --Plus--(2%) | + | Use with care. This option overrides --secure-protocol. |
+ | The format and syntax of this string depend on the specific SSL/TLS engine. | ||
+ | HSTS options: | ||
+ | | ||
+ | | ||
+ | |||
+ | FTP options: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | FTPS options: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | WARC options: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | WARC writer | ||
+ | |||
+ | Recursive download: | ||
+ | -r, --recursive | ||
+ | -l, | ||
+ | | ||
+ | -k, --convert-links | ||
+ | local files | ||
+ | | ||
+ | | ||
+ | -K, --backup-converted | ||
+ | -m, --mirror | ||
+ | -p, --page-requisites | ||
+ | | ||
+ | |||
+ | Recursive accept/ | ||
+ | -A, --accept=LIST | ||
+ | -R, --reject=LIST | ||
+ | | ||
+ | | ||
+ | | ||
+ | -D, --domains=LIST | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | -H, --span-hosts | ||
+ | -L, --relative | ||
+ | -I, --include-directories=LIST | ||
+ | | ||
+ | | ||
+ | -X, --exclude-directories=LIST | ||
+ | -np, --no-parent | ||
+ | |||
+ | Email bug reports, questions, discussions to < | ||
+ | and/or open issues at https:// | ||
</ | </ | ||
- | <WRAP center round important> | + | ==== 3.3 - ftp ==== |
- | **Important** - 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' | + | |
- | </ | + | |
- | ====2.4 | + | <WRAP center round important 60%> |
+ | **Important** | ||
+ | </ | ||
- | Insérez la sortie | + | La commande **ftp** est utilisée pour le transfert |
< | < | ||
- | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ uname -i | + | ftp> help |
- | x86_64 | + | Commands may be abbreviated. |
- | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ vi .config | + | |
- | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ head .config | + | |
- | # x86_64 | + | |
- | # | + | |
- | # Automatically generated file; DO NOT EDIT. | + | |
- | # Linux/x86 4.18.0 Kernel Configuration | + | |
- | # | + | |
- | # | + | ! debug mdir sendport site |
- | # Compiler: gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1) | + | $ dir mget put size |
- | # | + | account disconnect mkdir pwd status |
- | CONFIG_64BIT=y | + | 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> | ||
</ | </ | ||
- | Renommez le fichier .config en le plaçant dans le répertoire | + | Le caractère |
< | < | ||
- | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ cp .config ~/ | + | ftp> !pwd |
- | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ ls ~/rpmbuild/ | + | /root |
- | centos-ca-secureboot.der | + | |
- | centos-dup.x509 | + | |
- | centos-kpatch.x509 | + | |
- | centos.pem | + | |
- | centossecureboot001.der | + | |
- | centossecureboot201.der | + | |
- | centossecurebootca2.der | + | |
- | check-kabi | + | |
- | config-x86_64-generic | + | |
</ | </ | ||
- | Copiez | + | Pour transférer un fichier vers le serveur, il convient d' |
+ | |||
+ | < | ||
+ | ftp> put nom_fichier_local nom_fichier_distant | ||
+ | </ | ||
+ | |||
+ | 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: | ||
+ | |||
+ | < | ||
+ | ftp> mput nom*.* | ||
+ | </ | ||
+ | |||
+ | Pour transférer un fichier | ||
+ | |||
+ | < | ||
+ | ftp> get nom_fichier | ||
+ | </ | ||
+ | |||
+ | Vous pouvez également transférer plusieurs fichiers à la fois grâce à la commande **mget** ( voir la commande **mput** ci-dessus ). | ||
+ | |||
+ | Pour supprimer un fichier sur le serveur, il convient d' | ||
+ | |||
+ | < | ||
+ | ftp> del nom_fichier | ||
+ | </file> | ||
+ | |||
+ | Pour fermer la session, il convient d' | ||
< | < | ||
- | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ cp configs/ | + | ftp> quit |
+ | [root@centos7 | ||
</ | </ | ||
- | Editez la directive **buildid** dans le fichier **~/ | + | ====3.4 - SSH==== |
- | < | + | ===Présentation=== |
- | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ cd ~/ | + | |
- | [trainee@centos8 SPECS]$ vi kernel.spec | + | La commande **[[wpfr> |
- | [trainee@centos8 SPECS]$ head -n 50 kernel.spec | + | * Le **serveur SSH** |
- | # We have to override the new %%install behavior because, well... the kernel is special. | + | * le démon sshd, qui s' |
- | %global __spec_install_pre %{___build_pre} | + | * 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' | ||
+ | * Les **clefs** | ||
+ | * **Couple de clef utilisateur asymétriques** et persistantes qui assurent l' | ||
+ | * **Clef hôte asymétrique et persistante** garantissant l' | ||
+ | * **Clef serveur asymétrique et temporaire** utilisée par le protocole SSH1 qui sert au chiffrement de la clé de session, | ||
+ | * **Clef de session symétrique qui est générée aléatoirement** et qui permet le chiiffrement de la communication entre le client et le serveur. Elle est détruite en fin de session. SSH-1 utilise une seule clef tandis que SSH-2 utilise une clef par direction de la communication, | ||
+ | * La **base de données des hôtes connus** qui stocke les clés des connexions précédentes. | ||
- | # At the time of this writing (2019-03), RHEL8 packages use w2.xzdio | + | SSH fonctionne de la manière suivante pour la la mise en place d'un canal sécurisé: |
- | # compression for rpms (xz, level 2). | + | |
- | # Kernel has several large (hundreds of mbytes) rpms, they take ~5 mins | + | |
- | # to compress by single-threaded xz. Switch to threaded compression, | + | |
- | # and from level 2 to 3 to keep compressed sizes close to " | + | |
- | # | + | |
- | # NB: if default compression in / | + | |
- | # this one might need tweaking (e.g. if default changes to w3.xzdio, | + | |
- | # change below to w4T.xzdio): | + | |
- | %define _binary_payload w3T.xzdio | + | |
- | # For a kernel released for public testing, released_kernel should be 1. | + | * Le client contacte le serveur sur son port 22, |
- | # For internal testing builds during development, it should be 0. | + | * 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, |
- | %global released_kernel 1 | + | * Le serveur SSH s' |
+ | * Sa clé hôte, | ||
+ | * Sa clé serveur, | ||
+ | * Une séquence aléatoire de huit octets à inclure dans les futures réponses du client, | ||
+ | * Une liste de méthodes de chiffrage, compression et authentification, | ||
+ | * Le client et le serveur produisent un identifiant identique, un haché MD5 long de 128 bits contenant 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' | ||
+ | * Le serveur déchiffre la clé de session, | ||
+ | * Le client et le serveur mettent en place le canal sécurisé. | ||
- | %global distro_build 305 | + | ==SSH-1== |
- | # Sign the x86_64 kernel for secure boot authentication | + | SSH-1 utilise une paire de clefs de type RSA1. Il assure l' |
- | %ifarch x86_64 aarch64 | + | |
- | %global signkernel | + | |
- | %else | + | |
- | %global signkernel 0 | + | |
- | %endif | + | |
- | # Sign modules on all arches | + | Afin de s' |
- | %global signmodules 1 | + | |
- | # Compress modules only for architectures that build modules | + | * **Kerberos**, |
- | %ifarch noarch | + | * **Rhosts**, |
- | %global zipmodules 0 | + | * **%%RhostsRSA%%**, |
- | %else | + | * Par **clef asymétrique**, |
- | %global zipmodules 1 | + | * **TIS**, |
- | %endif | + | * Par **mot de passe**. |
- | %if %{zipmodules} | + | ==SSH-2== |
- | %global zipsed | + | |
- | %endif | + | |
- | %define buildid | + | SSH-2 utilise **DSA** ou **RSA**. Il assure l' |
- | %define rpmversion 4.18.0 | + | * **SSH-TRANS** – Transport Layer Protocol, |
- | %define pkgrelease 305.7.1.el8_4 | + | * **SSH-AUTH** – Authentification Protocol, |
+ | * **SSH-CONN** – Connection Protocol. | ||
- | # allow pkg_release to have configurable %%{?dist} tag | + | SSH-2 diffère de SSH-1 essentiellement dans la phase authentification. |
- | %define specrelease 305.7.1%{?dist} | + | |
- | %define pkg_release %{specrelease}%{? | + | Trois méthodes d' |
- | </ | + | |
- | ====2.5 | + | * Par **clef asymétrique**, |
+ | * Identique à SSH-1 sauf avec l' | ||
+ | * **%%RhostsRSA%%**, | ||
+ | * Par **mot de passe**. | ||
- | La compilation du noyau peut prendre beaucoup | + | ==Options |
+ | |||
+ | Les options de cette commande sont : | ||
< | < | ||
- | [trainee@centos7 SPECS]$ rpmbuild | + | [root@centos8 ~]# ssh --help |
+ | unknown option | ||
+ | usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface] | ||
+ | [-b bind_address] [-c cipher_spec] [-D [bind_address: | ||
+ | [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11] | ||
+ | [-i identity_file] [-J [user@]host[: | ||
+ | [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] | ||
+ | [-Q query_option] [-R address] [-S ctl_path] [-W host: | ||
+ | [-w local_tun[: | ||
</ | </ | ||
- | A l'issu du processus, les RPMs se trouvent dans le répertoire **/ | + | ===Authentification par mot de passe=== |
- | < | + | L' |
- | ... | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Wrote: / | + | |
- | Executing(%clean): | + | |
- | [1]+ Done rpmbuild -bb --target=`uname -m` kernel.spec 2> build-err.log | tee build-out.log | + | Avantage: |
- | </ | + | * Aucune configuration de clef asymétrique n'est nécessaire. |
- | < | + | Inconvénients: |
- | [trainee@centos8 SPECS]$ cd ../RPMS | + | |
- | [trainee@centos8 RPMS]$ ls | + | |
- | x86_64 | + | |
- | [trainee@centos8 RPMS]$ cd x86_64/ | + | |
- | [trainee@centos8 x86_64]$ ls | + | |
- | bpftool-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | + | |
- | bpftool-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | + | |
- | kernel-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | + | |
- | kernel-core-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | + | |
- | kernel-cross-headers-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | + | |
- | kernel-debug-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | + | |
- | kernel-debug-core-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | + | |
- | kernel-debug-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | + | |
- | kernel-debug-devel-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | + | |
- | kernel-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | + | |
- | </ | + | |
- | Notez que la génération du nouveau noyau peut consommer jusqu' | + | ===Authentification par clef asymétrique=== |
- | < | + | * Le **client** envoie au serveur une requête d' |
- | [trainee@centos8 x86_64]$ df -h | + | |
- | Filesystem | + | * Dans le cas où une correspondance n'est pas trouvée, le serveur met fin à la communication, |
- | devtmpfs | + | * 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**, |
- | tmpfs 1.9G | + | |
- | tmpfs 1.9G 9.4M 1.9G 1% /run | + | |
- | tmpfs 1.9G | + | |
- | / | + | |
- | / | + | |
- | tmpfs 374M | + | |
- | tmpfs 374M 1.2M 373M 1% / | + | |
- | / | + | |
- | </ | + | |
- | ====2.6 - Installer le Nouveau Noyau==== | + | ===Configuration du Serveur=== |
- | Installez maintenant les paquets | + | La configuration du serveur s' |
< | < | ||
- | [root@centos8 | + | [root@centos8 |
- | Last metadata expiration check: 2:25:32 ago on Tue 20 Jul 2021 08:37:00 EDT. | + | # |
- | Dependencies resolved. | + | |
- | =============================================================================================================================================================================================================== | + | |
- | | + | |
- | =============================================================================================================================================================================================================== | + | |
- | Installing: | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | Downgrading: | + | |
- | | + | |
- | | + | |
- | | + | |
- | Transaction Summary | + | # This is the sshd server system-wide configuration file. See |
- | =============================================================================================================================================================================================================== | + | # sshd_config(5) for more information. |
- | Install | + | |
- | Downgrade | + | |
- | Total size: 1.6 G | + | # This sshd was compiled with PATH=/ |
- | Is this ok [y/N]: y | + | |
- | </code> | + | |
- | A l'issu de l' | + | # The strategy used for options in the default sshd_config shipped with |
+ | # OpenSSH is to specify options with their default value where | ||
+ | # possible, but leave them commented. | ||
+ | # default value. | ||
- | < | + | # If you want to change the port on a SELinux system, you have to tell |
- | [root@centos7 ~]# reboot | + | # SELinux about this change. |
- | </ | + | # semanage port -a -t ssh_port_t -p tcp # |
+ | # | ||
+ | #Port 22 | ||
+ | # | ||
+ | # | ||
+ | # | ||
- | Connectez-vous en tant que trainee et devenez root. Listez ensuite les noyaux installés : | + | HostKey / |
+ | HostKey / | ||
+ | HostKey / | ||
- | < | + | # Ciphers and keying |
- | [root@centos8 ~]# rpm -qa | grep kernel | + | #RekeyLimit default none |
- | kernel-modules-4.18.0-305.3.1.el8.x86_64 | + | |
- | kernel-tools-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-headers-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-debug-core-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-modules-internal-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-modules-4.18.0-305.7.1.el8_4.x86_64 | + | |
- | kernel-debug-modules-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-devel-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-tools-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-tools-libs-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-debug-modules-internal-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-cross-headers-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-core-4.18.0-305.7.1.el8_4.x86_64 | + | |
- | kernel-devel-4.18.0-305.7.1.el8_4.x86_64 | + | |
- | kernel-debuginfo-common-x86_64-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-debug-modules-extra-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-debug-devel-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-tools-libs-devel-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-modules-extra-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-4.18.0-305.7.1.el8_4.x86_64 | + | |
- | kernel-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-core-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-selftests-internal-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-debug-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-debug-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-4.18.0-305.3.1.el8.x86_64 | + | |
- | kernel-core-4.18.0-305.3.1.el8.x86_64 | + | |
- | kernel-modules-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | kernel-ipaclones-internal-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
- | </ | + | |
- | Constatez l' | + | # 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 |
- | [root@centos8 ~]# grep i2tch / | + | #SyslogFacility AUTH |
- | saved_entry=95bd69e34a7444a7b58cb74fbfb86df2-4.18.0-305.7.1.el8.i2tch.x86_64 | + | SyslogFacility AUTHPRIV |
- | </ | + | #LogLevel INFO |
- | Dernièrement, | + | # Authentication: |
- | < | + | # |
- | [root@centos8 ~]# uname -r | + | PermitRootLogin yes |
- | 4.18.0-305.7.1.el8.i2tch.x86_64 | + | #StrictModes yes |
- | </ | + | # |
+ | # | ||
- | =====LAB | + | #PubkeyAuthentication yes |
- | 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, | + | # The default is to check both .ssh/ |
- | quotas par partition. L' | + | # but this is overridden so installations will only check .ssh/authorized_keys |
+ | AuthorizedKeysFile | ||
- | Déconnectez-vous et reconnectez-vous **directement** en tant que root : | + | # |
- | < | + | # |
- | root@computeXX: | + | #AuthorizedKeysCommandUser nobody |
- | root@10.0.2.45' | + | |
- | Activate the web console with: systemctl enable --now cockpit.socket | + | |
- | Last login: Wed Jul 21 11:14:31 2021 | + | # For this to work you will also need host keys in / |
- | [root@centos8 | + | # |
- | </code> | + | # Change to yes if you don't trust ~/ |
+ | # HostbasedAuthentication | ||
+ | # | ||
+ | # Don't read the user's ~/.rhosts and ~/.shosts files | ||
+ | # | ||
- | Avant de mettre en place des quotas, configurer SELINUX en mode **permissive** afin de ne pas avoir d' | + | # To disable tunneled clear text passwords, change to no here! |
+ | # | ||
+ | # | ||
+ | PasswordAuthentication yes | ||
- | < | + | # Change to no to disable s/key passwords |
- | [root@centos8 ~]# getenforce | + | #ChallengeResponseAuthentication yes |
- | Enforcing | + | ChallengeResponseAuthentication no |
- | [root@centos8 ~]# setenforce permissive | + | |
- | [root@centos8 ~]# getenforce | + | |
- | Permissive | + | |
- | [root@centos8 ~]# | + | |
- | </ | + | |
- | Editez ensuite le fichier / | + | # Kerberos options |
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
- | < | + | # GSSAPI options |
- | [root@centos8 ~]# vi / | + | GSSAPIAuthentication yes |
- | [root@centos8 ~]# cat / | + | GSSAPICleanupCredentials no |
+ | # | ||
+ | #GSSAPIKeyExchange no | ||
+ | #GSSAPIEnablek5users no | ||
- | # This file controls the state of SELinux on the system. | + | # Set this to ' |
- | # SELINUX= can take one of these three values: | + | # and session processing. If this is enabled, PAM authentication will |
- | # enforcing - SELinux security policy is enforced. | + | # be allowed through the ChallengeResponseAuthentication and |
- | # permissive - SELinux prints warnings instead of enforcing. | + | # PasswordAuthentication. |
- | # disabled | + | # PAM authentication via ChallengeResponseAuthentication may bypass |
- | SELINUX=permissive | + | # the setting of " |
- | # SELINUXTYPE= can take one of these three values: | + | # If you just want the PAM account and session checks to run without |
- | # targeted - Targeted processes are protected, | + | # PAM authentication, then enable this but set PasswordAuthentication |
- | # minimum - Modification of targeted policy. Only selected processes are protected. | + | # and ChallengeResponseAuthentication to ' |
- | # mls - Multi Level Security protection. | + | # WARNING: ' |
- | SELINUXTYPE=targeted | + | # problems. |
+ | UsePAM yes | ||
- | </ | + | # |
+ | # | ||
+ | # | ||
+ | X11Forwarding yes | ||
+ | # | ||
+ | # | ||
+ | #PermitTTY yes | ||
- | Commencez par vérifiez que le paquet **quota** est bien installé : | + | # It is recommended to use pam_motd in / |
+ | # as it is more configurable and versatile than the built-in version. | ||
+ | PrintMotd no | ||
- | < | + | # |
- | [root@centos8 ~]# rpm -qa | grep quota | + | #TCPKeepAlive yes |
- | quota-4.04-12.el8.x86_64 | + | # |
- | quota-nls-4.04-12.el8.noarch | + | # |
- | </code> | + | # |
+ | # | ||
+ | #UseDNS no | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
- | Editez le fichier **/ | + | # no default banner path |
+ | #Banner none | ||
- | < | + | # Accept locale-related environment variables |
- | [root@centos8 ~]# vi /etc/fstab | + | AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES |
- | [root@centos8 ~]# cat /etc/fstab | + | AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT |
+ | AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE | ||
+ | AcceptEnv XMODIFIERS | ||
- | # | + | # override default of no subsystems |
- | # /etc/fstab | + | Subsystem |
- | # Created by anaconda | + | |
- | # | + | # Example of overriding settings |
- | # Accessible filesystems, | + | #Match User anoncvs |
- | # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info. | + | # X11Forwarding no |
- | # | + | # AllowTcpForwarding no |
- | # After editing this file, run ' | + | # PermitTTY no |
- | # units generated from this file. | + | # ForceCommand cvs server |
- | # | + | |
- | / | + | |
- | UUID=1c04981e-5317-4b73-9695-3ce25246835d /boot | + | |
- | / | + | |
- | UUID=f76d6b66-985b-4a91-af9c-4987e8c1443c /home | + | |
</ | </ | ||
- | Redémarrez | + | Pour ôter les lignes de commentaires dans ce fichier, utilisez |
< | < | ||
- | [root@centos8 ~]# reboot | + | [root@centos8 ~]# cd /tmp ; grep -E -v ' |
+ | [root@centos8 tmp]# cat sshd_config | ||
+ | HostKey / | ||
+ | HostKey / | ||
+ | HostKey / | ||
+ | SyslogFacility AUTHPRIV | ||
+ | PermitRootLogin yes | ||
+ | AuthorizedKeysFile | ||
+ | PasswordAuthentication yes | ||
+ | ChallengeResponseAuthentication no | ||
+ | GSSAPIAuthentication yes | ||
+ | GSSAPICleanupCredentials no | ||
+ | UsePAM yes | ||
+ | X11Forwarding 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 | ||
</ | </ | ||
- | Reconnectez-vous **directement** en tant que root : | + | Pour sécuriser le serveur ssh, ajoutez ou modifiez les directives suivantes |
- | <code> | + | <file> |
- | root@computeXX: | + | AllowGroups adm |
- | root@10.0.2.45's password: fenestros | + | Banner /etc/issue.net |
- | Activate the web console with: systemctl enable --now cockpit.socket | + | HostbasedAuthentication no |
+ | IgnoreRhosts yes | ||
+ | LoginGraceTime 60 | ||
+ | LogLevel INFO | ||
+ | PermitEmptyPasswords no | ||
+ | PermitRootLogin no | ||
+ | PrintLastLog yes | ||
+ | Protocol | ||
+ | StrictModes yes | ||
+ | X11Forwarding no | ||
+ | </ | ||
- | Last login: Wed Jul 21 11:19:46 2021 | + | Votre fichier ressemblera à celui-ci |
- | [root@centos8 | + | |
+ | < | ||
+ | [root@centos8 | ||
+ | [root@centos8 tmp]# cat sshd_config | ||
+ | AllowGroups adm | ||
+ | Banner / | ||
+ | HostbasedAuthentication no | ||
+ | IgnoreRhosts yes | ||
+ | LoginGraceTime 60 | ||
+ | LogLevel INFO | ||
+ | PermitEmptyPasswords no | ||
+ | PermitRootLogin no | ||
+ | PrintLastLog yes | ||
+ | Protocol 2 | ||
+ | StrictModes yes | ||
+ | X11Forwarding no | ||
+ | HostKey / | ||
+ | HostKey / | ||
+ | HostKey / | ||
+ | SyslogFacility AUTHPRIV | ||
+ | PermitRootLogin yes | ||
+ | AuthorizedKeysFile | ||
+ | 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 | ||
</ | </ | ||
- | Vérifiez ensuite que les options | + | Renommez le fichier |
< | < | ||
- | [root@centos8 | + | [root@centos8 |
- | /dev/sdc1 /home ext4 rw, | + | |
</ | </ | ||
- | ====3.1 - La Commande quotacheck==== | + | Copiez le fichier **/tmp/ |
- | + | ||
- | Pour activer les quotas sur /home, il convient d' | + | |
< | < | ||
- | [root@centos8 | + | [root@centos8 |
- | 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. | + | cp: overwrite '/etc/ssh/sshd_config'? |
- | quotacheck: Scanning | + | |
- | quotacheck: Cannot stat old user quota file /home/aquota.user: | + | |
- | quotacheck: Cannot stat old group quota file /home/ | + | |
- | quotacheck: Cannot stat old user quota file / | + | |
- | quotacheck: Cannot stat old group quota file / | + | |
- | quotacheck: Checked 6763 directories and 129772 files | + | |
- | quotacheck: Old file not found. | + | |
- | quotacheck: Old file not found. | + | |
</ | </ | ||
- | Les options de la commande quotacheck sont : | + | Redémarrez le service sshd : |
< | < | ||
- | [root@centos8 | + | [root@centos8 |
- | Utility for checking and repairing quota files. | + | [root@centos8 tmp]# systemctl status sshd |
- | quotacheck [-gucbfinvdmMR] [-F <quota-format>] filesystem|-a | + | ● sshd.service |
+ | | ||
+ | | ||
+ | Docs: man: | ||
+ | | ||
+ | Main PID: 1042039 (sshd) | ||
+ | Tasks: 1 (limit: 23535) | ||
+ | Memory: 1.1M | ||
+ | CGroup: / | ||
+ | | ||
- | -u, --user | + | Aug 30 02:17:00 centos8.ittraining.loc systemd[1]: Starting OpenSSH server daemon... |
- | -g, --group | + | Aug 30 02:17:00 centos8.ittraining.loc sshd[1042039]: |
- | -c, --create-files | + | Aug 30 02:17:00 centos8.ittraining.loc sshd[1042039]: |
- | -b, --backup | + | Aug 30 02:17:00 centos8.ittraining.loc systemd[1]: Started OpenSSH server daemon. |
- | -f, --force | + | [q] |
- | -i, --interactive | + | |
- | -n, --use-first-dquot | + | |
- | -v, --verbose | + | |
- | -d, --debug | + | |
- | -m, --no-remount | + | |
- | -M, --try-remount | + | |
- | continue even if it fails | + | |
- | -R, --exclude-root | + | |
- | -F, --format=formatname | + | |
- | -a, --all check all filesystems | + | |
- | -h, --help | + | |
- | -V, --version | + | |
- | + | ||
- | Bugs to jack@suse.cz | + | |
</ | </ | ||
- | Les quotas ont été activés et les fichier | + | Mettez l' |
< | < | ||
- | [root@centos8 | + | [root@centos8 |
- | total 40 | + | trainee |
- | drwxr-xr-x. | + | [root@centos8 tmp]# usermod |
- | dr-xr-xr-x. 17 root | + | [root@centos8 tmp]# groups trainee |
- | -rw-------. | + | trainee : trainee |
- | -rw-------. | + | |
- | drwx------. | + | |
- | drwxr-xr-x. 17 trainee | + | |
</ | </ | ||
- | Créez maintenant un utilisateur | + | Pour générer les clefs du serveur, saisissez la commande suivante en tant que **root**. Notez que la passphrase doit être **vide**. |
< | < | ||
- | [root@centos8 | + | [root@centos8 |
- | [root@centos8 | + | Generating public/private dsa key pair. |
- | Changing password for user fenestros. | + | Enter file in which to save the key (/root/ |
- | New password: | + | Enter passphrase (empty for no passphrase): |
- | BAD PASSWORD: The password contains the user name in some form | + | Enter same passphrase again: |
- | Retype new password: | + | Your identification has been saved in / |
- | passwd: all authentication tokens updated successfully. | + | Your public key has been saved in / |
- | </ | + | The key fingerprint is: |
+ | SHA256: | ||
+ | The key's randomart image is: | ||
+ | +---[DSA 1024]----+ | ||
+ | | | | ||
+ | | | ||
+ | |.o . o.+ | | ||
+ | |E. o.*.. . | | ||
+ | |+ooo.o +S o o | | ||
+ | |X==++ o o o | | ||
+ | |B/ | ||
+ | |Ooo++ | ||
+ | |. .o | | ||
+ | +----[SHA256]-----+ | ||
+ | </ | ||
- | ====3.2 - La Commande edquota==== | + | De la même façon, il est possible de générer les clefs au format **[[https:// |
+ | |||
+ | < | ||
+ | [root@centos8 tmp]# ssh-keygen -t rsa | ||
+ | Generating public/ | ||
+ | Enter file in which to save the key (/ | ||
+ | Enter passphrase (empty for no passphrase): | ||
+ | Enter same passphrase again: | ||
+ | Your identification has been saved in / | ||
+ | Your public key has been saved in / | ||
+ | The key fingerprint is: | ||
+ | SHA256: | ||
+ | The key's randomart image is: | ||
+ | +---[RSA 3072]----+ | ||
+ | | | ||
+ | | o oo o=+ . | | ||
+ | |.. oo=+=o . + | | ||
+ | |oo .+E++.+ = * | | ||
+ | |o.. +.S B * . | | ||
+ | |. B + = | | ||
+ | | = | | ||
+ | | | ||
+ | | . | | ||
+ | +----[SHA256]-----+ | ||
+ | [root@centos8 tmp]# ssh-keygen -t ecdsa | ||
+ | Generating public/ | ||
+ | Enter file in which to save the key (/ | ||
+ | Enter passphrase (empty for no passphrase): | ||
+ | Enter same passphrase again: | ||
+ | Your identification has been saved in / | ||
+ | Your public key has been saved in / | ||
+ | The key fingerprint is: | ||
+ | SHA256: | ||
+ | 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/ | ||
+ | Enter file in which to save the key (/ | ||
+ | Enter passphrase (empty for no passphrase): | ||
+ | Enter same passphrase again: | ||
+ | Your identification has been saved in / | ||
+ | Your public key has been saved in / | ||
+ | The key fingerprint is: | ||
+ | SHA256: | ||
+ | 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]-----+ | ||
+ | </ | ||
- | Mettez en place maintenant un quota de 10Mo pour l'utilisateur | + | Les clefs publiques générées possèdent |
< | < | ||
- | [root@centos ~]# edquota -u fenestros -f /home | + | [root@centos8 tmp]# ls /etc/ssh |
+ | moduli | ||
+ | ssh_config | ||
</ | </ | ||
- | L' | + | Re-démarrez ensuite le service sshd : |
- | <file> | + | <code> |
- | Disk quotas for user fenestros | + | [root@centos8 tmp]# systemctl restart sshd.service |
- | | + | [root@centos8 tmp]# systemctl status sshd.service |
- | /dev/sdc1 | + | ● sshd.service - OpenSSH server daemon |
- | </file> | + | |
+ | | ||
+ | Docs: man:sshd(8) | ||
+ | man: | ||
+ | Main PID: 1042204 (sshd) | ||
+ | Tasks: 1 (limit: 23535) | ||
+ | | ||
+ | | ||
+ | └─1042204 /usr/sbin/sshd -D -oCiphers=aes256-gcm@openssh.com, | ||
- | Modifiez ce fichier ainsi : | + | Aug 30 02:24:57 centos8.ittraining.loc systemd[1]: Starting OpenSSH server daemon... |
+ | Aug 30 02:24:57 centos8.ittraining.loc sshd[1042204]: | ||
+ | Aug 30 02:24:57 centos8.ittraining.loc sshd[1042204]: | ||
+ | Aug 30 02:24:57 centos8.ittraining.loc systemd[1]: Started OpenSSH server daemon. | ||
+ | [q] | ||
+ | </ | ||
- | < | + | ===Configuration du Client=== |
- | Disk quotas for user fenestros (uid 1001): | + | |
- | Filesystem | + | |
- | / | + | |
- | </ | + | |
- | Sauvegardez et quittez le fichier. | + | Saisissez maintenant les commandes suivantes en tant que **trainee** : |
- | Les options | + | <WRAP center round important 60%> |
+ | **Important** - Lors de la génération des clefs, la passphrase doit être **vide**. | ||
+ | </ | ||
< | < | ||
- | [root@centos8 | + | [root@centos8 |
- | edquota: Usage: | + | logout |
- | | + | [trainee@centos8 ~]$ ssh-keygen |
- | | + | Generating public/ |
- | | + | Enter file in which to save the key (/ |
- | | + | Created directory '/ |
- | edquota | + | Enter passphrase (empty for no passphrase): |
+ | Enter same passphrase again: | ||
+ | Your identification has been saved in / | ||
+ | Your public key has been saved in / | ||
+ | The key fingerprint is: | ||
+ | SHA256: | ||
+ | The key's randomart image is: | ||
+ | +---[DSA 1024]----+ | ||
+ | | =o+o.o+OB| | ||
+ | | o +o=o oo=| | ||
+ | | | ||
+ | | o o.& | ||
+ | | S o o.*.o| | ||
+ | | o o o.| | ||
+ | | . + + | | ||
+ | | + . o | | ||
+ | | E .| | ||
+ | +----[SHA256]-----+ | ||
+ | [trainee@centos8 ~]$ ssh-keygen -t rsa | ||
+ | Generating public/ | ||
- | -u, --user edit user data | + | Enter file in which to save the key (/ |
- | -g, --group edit group data | + | Enter same passphrase again: |
- | -P, --project | + | Your identification has been saved in / |
- | -r, --remote | + | Your public key has been saved in / |
- | -m, --no-mixed-pathnames | + | The key fingerprint is: |
- | -F, --format=formatname | + | SHA256: |
- | -p, --prototype=name | + | The key's randomart image is: |
- | | + | +---[RSA 3072]----+ |
- | | + | |o+o++oo |
- | -f, --filesystem=filesystem | + | |=+o.oo . .=B . | |
- | -t, --edit-period | + | |=. ..o o+... | |
- | -T, --edit-times edit grace time of a user/ | + | |. =.o o.. . | |
- | -h, --help display this help text and exit | + | | oS= = o | |
- | -V, --version | + | | .. = = | |
+ | | | ||
+ | | +...E | | ||
+ | | . o+... | | ||
+ | +----[SHA256]-----+ | ||
+ | [trainee@centos8 ~]$ ssh-keygen | ||
+ | Generating public/ | ||
+ | Enter file in which to save the key (/ | ||
+ | Enter passphrase (empty for no passphrase): | ||
+ | Enter same passphrase again: | ||
+ | Your identification has been saved in / | ||
+ | Your public key has been saved in / | ||
+ | The key fingerprint is: | ||
+ | SHA256: | ||
+ | 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/ | ||
+ | Enter file in which to save the key (/ | ||
+ | Enter passphrase (empty for no passphrase): | ||
+ | Enter same passphrase again: | ||
+ | Your identification has been saved in / | ||
+ | Your public key has been saved in / | ||
+ | The key fingerprint | ||
+ | SHA256: | ||
+ | The key's randomart image is: | ||
+ | +--[ED25519 256]--+ | ||
+ | | ..o*=++=. | | ||
+ | | o==O+Boo | | ||
+ | | o ooE.O. | | ||
+ | | | ||
+ | | S + ...| | ||
+ | | | ||
+ | | . + o.o| | ||
+ | | + +.oo| | ||
+ | | o..o.| | ||
+ | +----[SHA256]-----+ | ||
+ | </ | ||
- | Bugs to: jack@suse.cz | + | Les clés générées seront placées dans le répertoire **~/ |
+ | |||
+ | < | ||
+ | [trainee@centos8 ~]$ ls .ssh | ||
+ | id_dsa | ||
</ | </ | ||
- | <WRAP center round important> | + | ===Tunnels SSH=== |
- | **Important** - Pour mettre en place un quota par group, la procédure est similaire. Il suffit d' | + | |
- | </ | + | Le protocole SSH peut être utilisé pour sécuriser les protocoles tels telnet, pop3 etc.. En effet, on peut créer un //tunnel// SSH dans lequel passe les communications du protocole non-sécurisé. |
+ | |||
+ | La commande pour créer un tunnel ssh prend la forme suivante : | ||
- | ====3.3 | + | ssh -N -f compte@hôte -Lport-local: |
- | Appliquez maintenant les quotas | + | Dans votre cas, vous allez créer un tunnel dans votre propre vm entre le port 15023 et le port 23 : |
< | < | ||
- | [root@centos8 ~]# quotaon | + | [root@centos8 ~]# ssh -N -f trainee@localhost -L15023: |
+ | \S | ||
+ | Kernel \r on an \m | ||
+ | trainee@localhost' | ||
</ | </ | ||
- | Les options de la commande **quotaon** sont : | + | Installez maintenant le serveur telnet |
< | < | ||
- | [root@centos8 ~]# quotaon | + | [root@centos8 ~]# dnf install telnet-server |
- | quotaon: Usage: | + | |
- | quotaon [-guPvp] [-F quotaformat] [-x state] -a | + | |
- | quotaon [-guPvp] [-F quotaformat] [-x state] filesys ... | + | |
- | + | ||
- | -a, --all turn quotas on for all filesystems | + | |
- | -f, --off turn quotas off | + | |
- | -u, --user | + | |
- | -g, --group | + | |
- | -P, --project | + | |
- | -p, --print-state | + | |
- | -x, --xfs-command=cmd | + | |
- | -F, --format=formatname | + | |
- | -v, --verbose | + | |
- | -h, --help | + | |
- | -V, --version | + | |
</ | </ | ||
- | De cette manière vous avez mis en place un quota **souple** pour fenestros | + | Telnet n'est ni démarré ni activé. Il convient donc de le démarrer |
- | Quand l' | + | < |
+ | [root@centos8 ~]# systemctl status telnet.socket | ||
+ | ● telnet.socket - Telnet Server Activation Socket | ||
+ | | ||
+ | | ||
+ | Docs: man: | ||
+ | | ||
+ | | ||
+ | |||
+ | [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' | + | [root@centos8 ~]# systemctl status telnet.socket |
+ | ● telnet.socket - Telnet Server Activation Socket | ||
+ | | ||
+ | | ||
+ | Docs: man: | ||
+ | | ||
+ | | ||
+ | | ||
- | <WRAP center round important> | + | Aug 30 02:44:01 centos8.ittraining.loc systemd[1]: Listening on Telnet Server Activation Socket. |
- | **important** - La commande pour désactivez les quotas est **quotaoff**. | + | |
- | </ | + | |
- | ====3.4 - La Commande repquota==== | + | [root@centos8 ~]# systemctl enable telnet.socket |
+ | Created symlink / | ||
+ | </ | ||
- | Pour visualiser les quotas utilisez la commande **repquota** | + | Connectez-vous ensuite via telnet sur le port 15023, vous constaterez que votre connexion n' |
< | < | ||
- | [root@centos8 ~]# repquota /home | + | [root@centos8 ~]# telnet localhost 15023 |
- | *** Report for user quotas | + | Trying ::1... |
- | Block grace time: 7days; Inode grace time: 7days | + | Connected to localhost. |
- | Block limits | + | Escape character is ' |
- | User used soft hard grace used soft hard grace | + | |
- | ---------------------------------------------------------------------- | + | Kernel 4.18.0-305.7.1.el8.i2tch.x86_64 |
- | root -- 20 | + | centos8 login: trainee |
- | trainee | + | Password: |
- | + | Last login: Mon Aug 30 02:37:00 from ::1 | |
+ | [trainee@centos8 ~]$ whoami | ||
+ | trainee | ||
+ | [trainee@centos8 ~]$ pwd | ||
+ | /home/trainee | ||
</ | </ | ||
- | <WRAP center round important> | + | <WRAP center round important |
- | **Important** - Notez que l' | + | **Important** - Notez bien que votre communication telnet passe par le tunnel SSH. |
</ | </ | ||
- | Les options de la commande **repquota** sont : | + | ====3.5 - SCP==== |
- | < | + | ===Présentation=== |
- | [root@centos8 ~]# repquota --help | + | |
- | repquota: Utility for reporting quotas. | + | |
- | Usage: | + | |
- | repquota [-vugsi] [-c|C] [-t|n] [-F quotaformat] [-O (default | xml | csv)] (-a | mntpoint) | + | |
- | -v, --verbose | + | 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 | + | |
- | -g, --group | + | |
- | -P, --project | + | |
- | -s, --human-readable | + | |
- | -t, --truncate-names | + | |
- | -p, --raw-grace | + | |
- | -n, --no-names | + | |
- | -i, --no-autofs | + | |
- | -c, --cache | + | |
- | -C, --no-cache | + | |
- | -F, --format=formatname | + | |
- | -O, --output=format | + | |
- | -a, --all | + | |
- | -h, --help | + | |
- | -V, --version | + | |
- | Bugs to jack@suse.cz | + | $ scp compte@numero_ip(nom_de_machine): |
- | </code> | + | |
- | ====3.5 - La Commande quota==== | + | ou vers une machine distante : |
- | Pour visualiser les quotas d'un utilisateur spécifique, | + | $ scp / |
+ | |||
+ | ===Utilisation=== | ||
+ | |||
+ | Nous allons maintenant | ||
+ | |||
+ | Créez le fichier **/ | ||
< | < | ||
- | [root@centos8 ~]# quota fenestros | + | [trainee@centos8 ~]$ touch scp-test |
- | Disk quotas for user fenestros (uid 1001): no limited resources used | + | [trainee@centos8 ~]$ exit |
- | [root@centos8 ~]# su - fenestros | + | |
- | [fenestros@centos8 ~]$ touch test | + | |
- | [fenestros@centos8 ~]$ exit | + | |
logout | logout | ||
- | [root@centos8 ~]# quota fenestros | + | Connection closed by foreign host. |
- | Disk quotas for user fenestros (uid 1001): | + | [root@centos8 ~]# |
- | | + | |
- | / | + | |
</ | </ | ||
- | Les options de la commande | + | Récupérez le fichier |
< | < | ||
- | [root@centos8 ~]# quota --help | + | [root@centos8 ~]# scp trainee@127.0.0.1:/ |
- | quota: Usage: quota [-guPqvswim] [-l | [-Q | -A]] [-F quotaformat] | + | The authenticity of host ' |
- | quota [-qvswim] [-l | [-Q | -A]] [-F quotaformat] -u username | + | ECDSA key fingerprint is SHA256:Q7T/ |
- | quota [-qvswim] [-l | [-Q | -A]] [-F quotaformat] -g groupname | + | Are you sure you want to continue connecting (yes/no/[fingerprint])? yes |
- | quota [-qvswugPQm] [-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 | ||
- | -u, --user | + | [root@centos8 ~]# ls -l |
- | -g, --group | + | total 32 |
- | -P, --project | + | -rw-------. 1 root root 1358 Jun 16 06:40 anaconda-ks.cfg |
- | -q, --quiet print more terse message | + | drwxr-xr-x. 3 root root 21 Jun 16 06:39 home |
- | -v, --verbose | + | -rw-r--r--. 1 root root 1749 Aug 24 11:20 I2TCH.asc |
- | -s, --human-readable | + | -rw-r--r--. 1 root root 1853 Jun 16 06:54 initial-setup-ks.cfg |
- | --always-resolve | + | -rw-r--r--. 1 root root 31 Aug 24 11:22 message.txt |
- | composed of only digits | + | -rw-r--r--. 1 root root 561 Aug 24 11:32 message.txt.asc |
- | -w, --no-wrap | + | -rw-r--r--. 1 root root 367 Aug 24 11:30 message.txt.gpg |
- | -p, --raw-grace print grace time in seconds since epoch | + | -rw-r--r--. 1 root root 329 Aug 24 11:23 message.txt.sig |
- | -l, --local-only do not query NFS filesystems | + | -rw-r--r--. 1 root root 0 Aug 30 03:55 scp-test |
- | -Q, --quiet-refuse | + | -rw-r--r--. 1 root root 46 Aug 29 06:22 wget_file.txt |
- | not respond | + | |
- | -i, --no-autofs | + | |
- | -F, --format=formatname | + | |
- | -f, --filesystem-list | + | |
- | -A, --all-nfs | + | |
- | -m, --no-mixed-pathnames | + | |
- | --show-mntpoint | + | |
- | | + | |
- | -h, --help display this help message and exit | + | |
- | -V, --version | + | |
- | + | ||
- | Bugs to: jack@suse.cz | + | |
</ | </ | ||
- | ====3.6 - La Commande warnquota==== | + | ====3.6 - Mise en Place des Clefs Asymétriques==== |
- | La commande **warnquota** vérifie | + | Il convient maintenant de se connecter sur le << |
- | Sous RHEL/CentOS, warnquota | + | < |
+ | [root@centos8 ~]# ssh -l trainee 127.0.0.1 | ||
+ | \S | ||
+ | Kernel \r on an \m | ||
+ | trainee@127.0.0.1' | ||
+ | Activate the web console with: systemctl enable --now cockpit.socket | ||
+ | |||
+ | [trainee@centos8 ~]$ ls -la | grep .ssh | ||
+ | drwx------. | ||
+ | </code> | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | **Important** - Si le dossier distant .ssh n'existe | ||
+ | </ | ||
+ | |||
+ | Ensuite, il convient de transférer le fichier local **.ssh/ | ||
< | < | ||
- | [root@centos8 ~]# which warnquota | + | [trainee@centos8 ~]$ exit |
- | /usr/ | + | logout |
+ | Connection to 127.0.0.1 closed. | ||
+ | |||
+ | [root@centos8 ~]# exit | ||
+ | logout | ||
+ | |||
+ | [trainee@centos8 ~]$ scp .ssh/id_ecdsa.pub trainee@127.0.0.1:/home/trainee/.ssh/authorized_keys | ||
+ | The authenticity of host ' | ||
+ | ECDSA key fingerprint is SHA256:Q7T/CP0SLiMbMAIgVzTuEHegYS/spPE5zzQchCHD5Vw. | ||
+ | Are you sure you want to continue connecting (yes/no/[fingerprint])? | ||
+ | Warning: Permanently added ' | ||
+ | \S | ||
+ | Kernel \r on an \m | ||
+ | trainee@127.0.0.1' | ||
+ | id_ecdsa.pub | ||
</ | </ | ||
- | Installez donc le paquet **quota-warnquota** | + | Connectez-vous via telnet |
< | < | ||
- | [root@centos7 | + | [trainee@centos8 |
- | ... | + | The authenticity of host ' |
+ | ECDSA key fingerprint is SHA256: | ||
+ | Are you sure you want to continue connecting (yes/ | ||
+ | Warning: Permanently added ' | ||
+ | \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 ~]$ | ||
</ | </ | ||
- | Les options de la commande | + | <WRAP center round important 60%> |
+ | **Important** - Lors de la connexion au serveur, l' | ||
+ | </ | ||
+ | |||
+ | Insérez maintenant les clefs publiques restantes dans le fichier .ssh/ | ||
< | < | ||
- | [root@centos8 ~]# warnquota --help | + | [trainee@centos8 ~]$ cd .ssh |
- | warnquota: Usage: | + | [trainee@centos8 .ssh]$ ls |
- | | + | authorized_keys |
+ | [trainee@centos8 .ssh]$ cat authorized_keys | ||
+ | ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHDrzSXP+Ecxf/ | ||
- | -u, --user | + | [trainee@centos8 .ssh]$ cat id_rsa.pub >> authorized_keys |
- | -g, --group | + | [trainee@centos8 .ssh]$ cat id_dsa.pub >> authorized_keys |
- | -s, --human-readable | + | [trainee@centos8 .ssh]$ cat id_ed25519.pub >> authorized_keys |
- | -i, --no-autofs | + | |
- | -d, --no-details | + | |
- | -F, --format=formatname | + | |
- | -c, --config=config-file | + | |
- | -q, --quota-tab=quotatab-file | + | |
- | -a, --admins-file=admins-file | + | |
- | -h, --help | + | |
- | -v, --version | + | |
- | warnquota: Bugs to jack@suse.cz | + | [trainee@centos8 |
+ | ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHDrzSXP+Ecxf/ | ||
+ | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQD3ZSMn/ | ||
+ | ssh-dss AAAAB3NzaC1kc3MAAACBALIdwEEqHrMWSUdzARm9ldsZK9ebbtZShtmwgdjphOk77fxymK0y6wV7QEmLL25LOcLb12uZ1F0LtRt/ | ||
+ | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOfFQULLU8IZyKiSU63D2Zz6yGLqyHcBHnCRdSR9JSmc trainee@centos8.ittraining.loc | ||
</ | </ | ||
----- | ----- | ||
- | < | ||
- | <div align=" | ||
Copyright © 2021 Hugh Norris. | Copyright © 2021 Hugh Norris. | ||
- | </ |