Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
elearning:workbooks:centos:6:avance:l104 [2020/02/21 07:11] – créée admin | elearning:workbooks:centos:6:avance:l104 [2023/02/15 15:54] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
~~PDF: | ~~PDF: | ||
+ | |||
+ | Version : **2022.01** | ||
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
- | ======LRF304 | + | ======LCF303 |
- | =====Rôle du noyau===== | + | =====Contenu |
- | Le noyau ou //kernel// est la partie du système | + | * **LCF303 - Gestion du Réseau TCPv4** |
+ | * Contenu du Module | ||
+ | * Configuration du Réseau sous RHEL/CentOS 5 et 6 | ||
+ | * Configuration de TCP/IP | ||
+ | * DHCP | ||
+ | * /etc/sysconfig/ | ||
+ | * / | ||
+ | * IP Fixe | ||
+ | * / | ||
+ | * / | ||
+ | * La Commande hostname | ||
+ | * La Commande ifconfig | ||
+ | * Activer/ | ||
+ | * / | ||
+ | * Résolution | ||
+ | * /etc/resolv.conf | ||
+ | * / | ||
+ | * / | ||
+ | * Services réseaux | ||
+ | * xinetd | ||
+ | * TCP Wrapper | ||
+ | * Routage Statique | ||
+ | * La Commande route | ||
+ | * Activer/ | ||
+ | * Configuration du Réseau sous RHEL/CentOS 7 | ||
+ | * La Commande nmcli | ||
+ | * Connections et Profils | ||
+ | * Ajouter une Deuxième Adresse IP à un Profil | ||
+ | * La Commande hostname | ||
+ | * La Commande ip | ||
+ | * Activer/ | ||
+ | * Routage Statique | ||
+ | * La commande ip | ||
+ | * Activer/ | ||
+ | * Diagnostique du Réseau | ||
+ | * ping | ||
+ | * netstat -i | ||
+ | * traceroute | ||
+ | * Connexions à Distance | ||
+ | * Telnet | ||
+ | * wget | ||
+ | * ftp | ||
+ | * SSH | ||
+ | * Introduction | ||
+ | * SSH-1 | ||
+ | * SSH-2 | ||
+ | * L' | ||
+ | * L' | ||
+ | * Installation | ||
+ | * Configuration | ||
+ | * Serveur | ||
+ | * Utilisation | ||
+ | * Tunnels SSH | ||
+ | * SCP | ||
+ | * Introduction | ||
+ | * Utilisation | ||
+ | * Mise en place des clefs | ||
- | * la diminution de la taille | + | =====Configuration |
- | * la prise en charge de nouveau matériel, | + | |
- | * l' | + | |
- | * l' | + | |
- | * la correction de bogues, | + | |
- | * le besoin d'une fonctionnalité expérimentale. | + | |
- | Commencez par identifier le noyau utilisé par votre machine : | + | ==== Configuration de TCP/IP ==== |
- | < | + | La configuration TCP/IP se trouve dans le répertoire **/ |
- | [root@centos7 ~]# uname -r | + | |
- | 3.10.0-327.13.1.el7.x86_64 | + | === DHCP === |
- | </ | + | |
- | Dans le cas d'une utilisation courante de Linux, il est cependant préférable de faire appel aux **modules**. Les modules se trouvent dans le répertoire **/lib/modules/< | + | == /etc/sysconfig/network == |
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | build | + | NETWORKING=yes |
- | extra | + | HOSTNAME=centos6 |
- | kernel | + | |
</ | </ | ||
- | Les commandes pour manipuler | + | Dans ce fichier vous pouvez constater |
- | * insmod | + | ^ Directive ^ Description ^ |
- | * rmmod | + | | NETWORKING | Indique que la prise en charge du réseau est activée | |
- | * lsmod | + | | HOSTNAME | Indique le nom d' |
- | * modprobe | + | |
- | Par exemple | + | Ce fichier peut également contenir les directives suivantes |
+ | |||
+ | ^ Directive ^ Description ^ | ||
+ | | GATEWAY | Indique l' | ||
+ | | GATEWAYDEV | Indique l' | ||
+ | | NISDOMAIN | Indique le domaine NIS s'il en existe un | | ||
+ | | NETWORKING_IPV6 | Active ou désactive le support IPv6 | | ||
+ | |||
+ | ==/ | ||
+ | |||
+ | **ifcfg-eth0** | ||
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | Module | + | DEVICE=" |
- | ip6t_rpfilter | + | NM_CONTROLLED=" |
- | ip6t_REJECT | + | ONBOOT=yes |
- | ipt_REJECT | + | TYPE=Ethernet |
- | xt_conntrack | + | BOOTPROTO=dhcp |
- | ebtable_nat | + | DEFROUTE=yes |
- | ebtable_broute | + | IPV4_FAILURE_FATAL=yes |
- | bridge | + | IPV6INIT=no |
- | stp 12976 1 bridge | + | NAME=" |
- | llc 14552 2 stp,bridge | + | UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 |
- | ebtable_filter | + | HWADDR=08: |
- | ebtables | + | PEERDNS=yes |
- | ip6table_nat | + | PEERROUTES=yes |
- | nf_conntrack_ipv6 | + | |
- | nf_defrag_ipv6 | + | |
- | nf_nat_ipv6 | + | |
- | ip6table_mangle | + | |
- | ip6table_security | + | |
- | ip6table_raw | + | |
- | ip6table_filter | + | |
- | ip6_tables | + | |
- | iptable_nat | + | |
- | nf_conntrack_ipv4 | + | |
- | nf_defrag_ipv4 | + | |
- | nf_nat_ipv4 | + | |
- | nf_nat | + | |
- | nf_conntrack | + | |
- | iptable_mangle | + | |
- | iptable_security | + | |
- | iptable_raw | + | |
- | iptable_filter | + | |
- | dm_mirror | + | |
- | dm_region_hash | + | |
- | dm_log | + | |
- | dm_mod | + | |
- | crc32_pclmul | + | |
- | ghash_clmulni_intel | + | |
- | aesni_intel | + | |
- | lrw 13286 1 aesni_intel | + | |
- | gf128mul | + | |
- | glue_helper | + | |
- | snd_intel8x0 | + | |
- | ablk_helper | + | |
- | cryptd | + | |
- | snd_ac97_codec | + | |
- | ac97_bus | + | |
- | ppdev 17671 0 | + | |
- | snd_seq | + | |
- | snd_seq_device | + | |
- | snd_pcm | + | |
- | pcspkr | + | |
- | sg | + | |
- | parport_pc | + | |
- | parport | + | |
- | snd_timer | + | |
- | snd 83425 8 snd_ac97_codec, | + | |
- | soundcore | + | |
- | i2c_piix4 | + | |
- | video 24400 0 | + | |
- | i2c_core | + | |
- | nfsd 302418 | + | |
- | auth_rpcgss | + | |
- | nfs_acl | + | |
- | lockd 93600 1 nfsd | + | |
- | grace 13295 2 nfsd, | + | |
- | sunrpc | + | |
- | ip_tables | + | |
- | xfs | + | |
- | libcrc32c | + | |
- | sd_mod | + | |
- | crc_t10dif | + | |
- | crct10dif_generic | + | |
- | sr_mod | + | |
- | cdrom 42556 1 sr_mod | + | |
- | ata_generic | + | |
- | pata_acpi | + | |
- | ahci | + | |
- | libahci | + | |
- | ata_piix | + | |
- | crct10dif_pclmul | + | |
- | crct10dif_common | + | |
- | crc32c_intel | + | |
- | serio_raw | + | |
- | libata | + | |
- | e1000 | + | |
</ | </ | ||
- | Pour ajouter un module, on peut utiliser | + | Dans ce fichier vous pouvez constater les directives suivantes : |
+ | |||
+ | ^ Directive ^ Description ^ | ||
+ | | DEVICE | Indique le nom de l' | ||
+ | | NM_CONTROLLED | Indique que le service NetworkManager est utilisé pour gérer les interfaces réseau | | ||
+ | | ONBOOT | Indique que l' | ||
+ | | TYPE | Indique que le type de réseau est ethernet. | ||
+ | | BOOTPROTO | Indique comment monter l' | ||
+ | | DEFROUTE | Définit l' | ||
+ | | IPV4_FAILURE_FATAL | Stipule que si IPv4 et IPv6 sont activés et la connexion IPv4 est perdue, la connexion IPv6 est considérée d' | ||
+ | | IPV6INIT | Indique que le support IPv6 ne sera pas initialisé | | ||
+ | | NAME | Indique un nom descriptif de l' | ||
+ | | UUID | Indique la valeur de l'UUID de l' | ||
+ | | HWADDR | Indique l' | ||
+ | | PEERDNS |Indique que le fichier / | ||
+ | |||
+ | |||
+ | <WRAP center round todo> | ||
+ | Recherchez la définition de la directive | ||
+ | </ | ||
+ | |||
+ | === IP Fixe === | ||
+ | |||
+ | == / | ||
+ | |||
+ | < | ||
+ | NETWORKING=yes | ||
+ | NETWORKING_IPV6=no | ||
+ | HOSTNAME=centos6.fenestros.loc | ||
+ | </ | ||
+ | |||
+ | ==/ | ||
+ | |||
+ | **ifcfg-eth0** | ||
+ | |||
+ | < | ||
+ | DEVICE=" | ||
+ | NM_CONTROLLED=" | ||
+ | ONBOOT=yes | ||
+ | TYPE=Ethernet | ||
+ | BOOTPROTO=static | ||
+ | IPV6INIT=no | ||
+ | HWADDR=" | ||
+ | NETMASK=255.255.255.0 | ||
+ | IPADDR=10.0.2.15 | ||
+ | GATEWAY=10.0.2.2 | ||
+ | DNS1=8.8.8.8 | ||
+ | DNS2=8.8.4.4 | ||
+ | DOMAIN=fenestros.loc | ||
+ | USERCTL=yes | ||
+ | </ | ||
+ | |||
+ | Dans ce fichier vous pouvez constater les nouvelles directives suivantes : | ||
+ | |||
+ | ^ Directive ^ Description ^ | ||
+ | | NETMASK | Indique | ||
+ | | IPADDR | Indique l' | ||
+ | | GATEWAY | ||
+ | | DNS1 | Indique le DNS primaire | | ||
+ | | DNS2 | Indique le DNS secondaire | | ||
+ | | DOMAIN | ||
+ | | USERCTL | Indique que les utilisateurs normaux peuvent activer/ | ||
+ | |||
+ | <WRAP center round important> | ||
+ | Notez que %%VirtualBox%% fournit une passerelle par défaut ( 10.0.2.2 ). | ||
+ | </ | ||
+ | |||
+ | Après avoir modifier les deux fichiers **/ | ||
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | [root@centos7 | + | Arrêt du démon NetworkManager : [ OK ] |
- | Module | + | [root@centos6 |
- | bonding | + | [root@centos6 ~]# service network start |
- | ip6t_rpfilter | + | Activation de l' |
- | ip6t_REJECT | + | Activation de l' |
- | ipt_REJECT | + | [root@centos6 ~]# |
- | xt_conntrack | + | |
- | ebtable_nat | + | |
- | ebtable_broute | + | |
- | bridge | + | |
- | stp 12976 1 bridge | + | |
- | llc 14552 2 stp, | + | |
- | ebtable_filter | + | |
- | ebtables | + | |
- | ip6table_nat | + | |
- | nf_conntrack_ipv6 | + | |
- | nf_defrag_ipv6 | + | |
- | nf_nat_ipv6 | + | |
- | ip6table_mangle | + | |
- | ip6table_security | + | |
- | ip6table_raw | + | |
- | ip6table_filter | + | |
- | ip6_tables | + | |
- | y, | + | |
- | --More-- | + | |
</ | </ | ||
- | Pour supprimer un module, on peut utiliser | + | |
+ | ====La Commande hostname==== | ||
+ | |||
+ | Lors du passage à une configuration en IPv4 fixe vous avez modifié | ||
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | [root@centos7 | + | centos6 |
- | Module | + | [root@centos6 |
- | ip6t_rpfilter | + | [root@centos6 ~]# hostname |
- | ip6t_REJECT | + | centos6.fenestros.loc |
- | ipt_REJECT | + | |
- | xt_conntrack | + | |
- | ebtable_nat | + | |
- | ebtable_broute | + | |
- | bridge | + | |
- | stp 12976 1 bridge | + | |
- | llc 14552 2 stp, | + | |
- | ebtable_filter | + | |
- | ebtables | + | |
- | ip6table_nat | + | |
- | nf_conntrack_ipv6 | + | |
- | nf_defrag_ipv6 | + | |
- | nf_nat_ipv6 | + | |
- | ip6table_mangle | + | |
- | ip6table_security | + | |
- | ip6table_raw | + | |
- | ip6table_filter | + | |
- | ip6_tables | + | |
- | y, | + | |
- | iptable_nat | + | |
- | --More-- | + | |
</ | </ | ||
- | Les dépendances des modules sont résolues par la commande **modprobe** grâce aux fichier **/ | + | Pour afficher le FQDN du système vous pouvez également utiliser |
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | kernel/ | + | centos6.fenestros.loc |
- | kernel/ | + | |
- | kernel/ | + | |
- | kernel/ | + | |
- | kernel/ | + | |
- | kernel/ | + | |
- | kernel/ | + | |
- | kernel/ | + | |
- | to/lrw.ko kernel/ | + | |
- | kernel/ | + | |
- | kernel/ | + | |
- | el/ | + | |
- | kernel/ | + | |
- | helper.ko kernel/ | + | |
- | kernel/ | + | |
- | kernel/ | + | |
- | kernel/ | + | |
- | kernel/ | + | |
- | kernel/ | + | |
- | kernel/ | + | |
- | kernel/ | + | |
- | f128mul.ko kernel/ | + | |
- | kernel/ | + | |
- | --More--(0%) | + | |
</ | </ | ||
- | Il est possible d' | + | ===Options de la commande |
+ | |||
+ | Les options de cette commande sont : | ||
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | filename: | + | Syntaxe |
- | author: Thomas Davis, tadavis@lbl.gov and many others | + | domainname [-v] {domaine_nis|-F fichier} |
- | description: | + | hostname [-v] [-d|-f|-s|-a|-i|-y] |
- | version: | + | hostname [-v] |
- | license: | + | |
- | alias: | + | hostname -V|--version|-h|--help |
- | rhelversion: | + | |
- | srcversion: | + | |
- | depends: | + | |
- | intree: | + | |
- | vermagic: | + | |
- | signer: | + | -i, --ip-address |
- | sig_key: | + | -f, --fqdn, --long |
- | sig_hashalgo: | + | -d, --domain |
- | parm: | + | -y, --yp, --nis nom de domaine NIS/YP |
- | parm: | + | -F, --file |
- | parm: | + | |
- | parm: | + | This command can read or set the hostname or the NIS domainname. You can |
- | parm: | + | also read the DNS domain or the FQDN (fully qualified domain name). |
- | parm: | + | Unless you are using bind or NIS for host lookups you can change the |
- | parm: | + | FQDN (Fully Qualified Domain Name) and the DNS domain name (which is |
- | parm: | + | part of the FQDN) in the /etc/hosts file. |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
</ | </ | ||
- | Dernièrement, | + | ====La Commande ifconfig==== |
+ | |||
+ | Pour afficher la configuration IP de la machine il faut saisir la commande suivante | ||
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | mlx4.conf | + | eth0 Link encap: |
+ | inet adr:10.0.2.15 | ||
+ | adr inet6: fe80:: | ||
+ | UP BROADCAST RUNNING MULTICAST | ||
+ | RX packets: | ||
+ | TX packets: | ||
+ | collisions: | ||
+ | RX bytes: | ||
- | [root@centos7 ~]# cat / | + | lo Link encap: |
- | # This file is intended for users to select the various module options | + | inet adr:127.0.0.1 Masque:255.0.0.0 |
- | # they need for the mlx4 driver. | + | adr inet6: ::1/128 Scope:Hôte |
- | # any user made changes to this file are preserved. Any changes made | + | UP LOOPBACK RUNNING |
- | # to the libmlx4.conf file in this directory are overwritten on | + | RX packets:8 errors:0 dropped:0 overruns:0 frame:0 |
- | # pacakge upgrade. | + | TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 |
- | # | + | |
- | # Some sample options and what they would do | + | RX bytes:480 (480.0 b) TX bytes:480 (480.0 b) |
- | # Enable debugging output, device managed flow control, and disable SRIOV | + | |
- | #options mlx4_core debug_level=1 log_num_mgm_entry_size=-1 probe_vf=0 num_vfs=0 | + | |
- | # | + | |
- | # Enable debugging output and create SRIOV devices, but don't attach any of | + | |
- | # the child devices to the host, only the parent device | + | |
- | #options mlx4_core debug_level=1 probe_vf=0 num_vfs=7 | + | |
- | # | + | |
- | # Enable debugging output, SRIOV, and attach one of the SRIOV child devices | + | |
- | # in addition to the parent device to the host | + | |
- | #options mlx4_core debug_level=1 probe_vf=1 num_vfs=7 | + | |
- | # | + | |
- | # Enable per priority flow control for send and receive, setting both priority | + | |
- | # 1 and 2 as no drop priorities | + | |
- | #options mlx4_en pfctx=3 pfcrx=3 | + | |
</ | </ | ||
- | =====Compilation et installation du noyau et des modules===== | + | La commande ifconfig est également utilisée pour configurer une interface. |
- | Commencez par installer les paquets necessaires | + | Créez maintenant une interface fictive ainsi : |
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | Loaded plugins: fastestmirror, | + | </code> |
- | Loading mirror speeds from cached hostfile | + | |
- | * base: centos.mirrors.ovh.net | + | |
- | * extras: centos.mirror.fr.planethoster.net | + | |
- | * updates: mirror1.evolution-host.com | + | |
- | Resolving Dependencies | + | |
- | --> Running transaction check | + | |
- | ---> Package gcc-c++.x86_64 0: | + | |
- | --> Processing Dependency: libstdc++-devel = 4.8.5-4.el7 for package: gcc-c++-4.8.5-4.el7.x86_64 | + | |
- | ---> Package libXi-devel.x86_64 0:1.7.4-2.el7 will be installed | + | |
- | --> Processing Dependency: xorg-x11-proto-devel for package: libXi-devel-1.7.4-2.el7.x86_64 | + | |
- | --> Processing Dependency: pkgconfig(xfixes) for package: libXi-devel-1.7.4-2.el7.x86_64 | + | |
- | --> Processing Dependency: pkgconfig(xext) for package: libXi-devel-1.7.4-2.el7.x86_64 | + | |
- | --> Processing Dependency: pkgconfig(x11) for package: libXi-devel-1.7.4-2.el7.x86_64 | + | |
- | --> Processing Dependency: pkgconfig(inputproto) for package: libXi-devel-1.7.4-2.el7.x86_64 | + | |
- | ---> Package ncurses-devel.x86_64 | + | |
- | ---> Package qt3-devel.x86_64 0: | + | |
- | --> Processing Dependency: qt3 = 3.3.8b-51.el7 for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: mesa-libGLU-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: mesa-libGL-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libpng-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libmng-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libjpeg-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libXt-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libXrender-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libXrandr-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libXinerama-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libXft-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libXcursor-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libSM-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libICE-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: freetype-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: fontconfig-devel for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libqui.so.1()(64bit) for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libqt-mt.so.3()(64bit) for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | --> Processing Dependency: libmng.so.1()(64bit) for package: qt3-devel-3.3.8b-51.el7.x86_64 | + | |
- | ---> Package rpmdevtools.noarch 0:8.3-5.el7 will be installed | + | |
- | --> Processing Dependency: rpm-build >= 4.4.2.3 for package: rpmdevtools-8.3-5.el7.noarch | + | |
- | --> Running transaction check | + | |
- | ---> Package fontconfig-devel.x86_64 0: | + | |
- | --> Processing Dependency: pkgconfig(expat) for package: fontconfig-devel-2.10.95-7.el7.x86_64 | + | |
- | ---> Package freetype-devel.x86_64 0: | + | |
- | --> Processing Dependency: zlib-devel for package: freetype-devel-2.4.11-11.el7.x86_64 | + | |
- | ---> Package libICE-devel.x86_64 0: | + | |
- | ---> Package libSM-devel.x86_64 0: | + | |
- | ---> Package libX11-devel.x86_64 0: | + | |
- | --> Processing Dependency: pkgconfig(xcb) >= 1.1.92 for package: libX11-devel-1.6.3-2.el7.x86_64 | + | |
- | --> Processing Dependency: pkgconfig(xcb) for package: libX11-devel-1.6.3-2.el7.x86_64 | + | |
- | ---> Package libXcursor-devel.x86_64 0: | + | |
- | ---> Package libXext-devel.x86_64 0: | + | |
- | ---> Package libXfixes-devel.x86_64 0: | + | |
- | ---> Package libXft-devel.x86_64 0: | + | |
- | ---> Package libXinerama-devel.x86_64 0: | + | |
- | ---> Package libXrandr-devel.x86_64 0: | + | |
- | ---> Package libXrender-devel.x86_64 0: | + | |
- | ---> Package libXt-devel.x86_64 0: | + | |
- | ---> Package libjpeg-turbo-devel.x86_64 0: | + | |
- | ---> Package libmng.x86_64 0: | + | |
- | ---> Package libmng-devel.x86_64 0: | + | |
- | ---> Package libpng-devel.x86_64 2: | + | |
- | ---> Package libstdc++-devel.x86_64 0: | + | |
- | ---> Package mesa-libGL-devel.x86_64 0: | + | |
- | --> Processing Dependency: pkgconfig(xshmfence) >= 1.1 for package: mesa-libGL-devel-10.6.5-3.20150824.el7.x86_64 | + | |
- | --> Processing Dependency: pkgconfig(libdrm) >= 2.4.38 for package: mesa-libGL-devel-10.6.5-3.20150824.el7.x86_64 | + | |
- | --> Processing Dependency: pkgconfig(xxf86vm) for package: mesa-libGL-devel-10.6.5-3.20150824.el7.x86_64 | + | |
- | --> Processing Dependency: pkgconfig(xdamage) for package: mesa-libGL-devel-10.6.5-3.20150824.el7.x86_64 | + | |
- | --> Processing Dependency: gl-manpages for package: mesa-libGL-devel-10.6.5-3.20150824.el7.x86_64 | + | |
- | ---> Package mesa-libGLU-devel.x86_64 0: | + | |
- | ---> Package qt3.x86_64 0: | + | |
- | ---> Package rpm-build.x86_64 0: | + | |
- | --> Processing Dependency: system-rpm-config for package: rpm-build-4.11.3-17.el7.x86_64 | + | |
- | --> Processing Dependency: perl(Thread:: | + | |
- | ---> Package xorg-x11-proto-devel.noarch 0: | + | |
- | --> Running transaction check | + | |
- | ---> Package expat-devel.x86_64 0: | + | |
- | ---> Package gl-manpages.noarch 0: | + | |
- | ---> Package libXdamage-devel.x86_64 0: | + | |
- | ---> Package libXxf86vm-devel.x86_64 0: | + | |
- | ---> Package libdrm-devel.x86_64 0: | + | |
- | ---> Package libxcb-devel.x86_64 0: | + | |
- | --> Processing Dependency: pkgconfig(xau) >= 0.99.2 for package: libxcb-devel-1.11-4.el7.x86_64 | + | |
- | ---> Package libxshmfence-devel.x86_64 0:1.2-1.el7 will be installed | + | |
- | ---> Package perl-Thread-Queue.noarch 0: | + | |
- | ---> Package redhat-rpm-config.noarch 0: | + | |
- | --> Processing Dependency: dwz >= 0.4 for package: redhat-rpm-config-9.1.0-68.el7.centos.noarch | + | |
- | --> Processing Dependency: perl-srpm-macros for package: redhat-rpm-config-9.1.0-68.el7.centos.noarch | + | |
- | ---> Package zlib-devel.x86_64 0: | + | |
- | --> Running transaction check | + | |
- | ---> Package dwz.x86_64 0: | + | |
- | ---> Package libXau-devel.x86_64 0: | + | |
- | ---> Package perl-srpm-macros.noarch 0:1-8.el7 will be installed | + | |
- | --> Finished Dependency Resolution | + | |
- | Dependencies Resolved | + | Constatez maintenant le résultat : |
- | ======================================================================================================================================================================== | + | < |
- | Package | + | [root@centos6 ~]# ifconfig |
- | ======================================================================================================================================================================== | + | eth0 Link encap: |
- | Installing: | + | inet adr:10.0.2.15 Bcast:10.0.2.255 Masque:255.255.255.0 |
- | gcc-c++ | + | adr inet6: fe80:: |
- | | + | UP BROADCAST RUNNING MULTICAST |
- | | + | RX packets: |
- | | + | TX packets: |
- | | + | |
- | Installing for dependencies: | + | RX bytes: |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | libXcursor-devel | + | |
- | libXdamage-devel | + | |
- | libXext-devel | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | libpng-devel | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | perl-Thread-Queue | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | Transaction Summary | + | eth0: |
- | ======================================================================================================================================================================== | + | inet adr: |
- | Install | + | UP BROADCAST RUNNING MULTICAST |
- | Total download size: 27 M | + | lo Link encap:Boucle locale |
- | Installed size: 90 M | + | inet adr:127.0.0.1 |
- | Is this ok [y/d/N]: y | + | adr inet6: ::1/128 Scope: |
+ | UP LOOPBACK RUNNING | ||
+ | RX packets:8 errors:0 dropped:0 overruns:0 frame:0 | ||
+ | TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 | ||
+ | collisions: | ||
+ | RX bytes:480 (480.0 b) TX bytes:480 (480.0 b) | ||
</ | </ | ||
- | <WRAP center round alert> | + | ===Options |
- | Il n'est pas conseillé | + | |
- | </ | + | |
- | ====Déplacer /home==== | + | Les options de cette commande sont : |
- | <WRAP center round todo> | + | <code> |
- | Arrêtez votre machine virtuelle. Ajoutez un deuxième disque de 20 Go au contrôleur SATA en utilisant la section **Stockage** des paramètres de la machine virtuelle. Le format du disque doit être **vmdk**. Nommez ce disque **RedHatHome** et re-démarrez la machine virtuelle en vous connectant directement en tant que **root**. | + | [root@centos6 ~]# ifconfig --help |
- | </WRAP> | + | Usage: |
+ | ifconfig [-a] [-v] [-s] <interface> | ||
+ | [add < | ||
+ | [del < | ||
+ | [[-]broadcast [< | ||
+ | [netmask < | ||
+ | [outfill <NN>] [keepalive < | ||
+ | [hw <HW> < | ||
+ | [[-]trailers] | ||
+ | [multicast] | ||
+ | [mem_start < | ||
+ | [txqueuelen < | ||
+ | [[-]dynamic] | ||
+ | [up|down] ... | ||
- | Créez une seule partition sur **/dev/sdb** : | + | < |
+ | Liste des types de matériels possibles: | ||
+ | loop (Boucle locale) slip (IP ligne série) cslip (IP ligne série - VJ ) | ||
+ | slip6 (IP ligne série - 6 bits) cslip6 (IP ligne série - 6 bits VJ) adaptive (IP ligne série adaptative) | ||
+ | strip (Metricom Starmode IP) ash (Ash) ether (Ethernet) | ||
+ | tr (16/4 Mbps Token Ring) tr (16/4 Mbps Token Ring (New)) ax25 (AMPR AX.25) | ||
+ | netrom (AMPR NET/ROM) rose (AMPR ROSE) tunnel (IPIP Tunnel) | ||
+ | ppp (Protocole Point-à-Point) hdlc ((Cisco)-HDLC) lapb (LAPB) | ||
+ | arcnet (ARCnet) dlci (Frame Relay DLCI) frad (Périphériue d' | ||
+ | sit (IPv6-dans-IPv4) fddi (Fiber Distributed Data Interface) hippi (HIPPI) | ||
+ | irda (IrLAP) ec (Econet) x25 (generic X.25) | ||
+ | infiniband (InfiniBand) | ||
+ | < | ||
+ | Liste des familles d' | ||
+ | unix (Domaine UNIX) inet (DARPA Internet) inet6 (IPv6) | ||
+ | ax25 (AMPR AX.25) netrom (AMPR NET/ROM) rose (AMPR ROSE) | ||
+ | ipx (Novell IPX) ddp (Appletalk DDP) ec (Econet) | ||
+ | ash (Ash) x25 (CCITT X.25) | ||
+ | </ | ||
+ | |||
+ | ====Activer/ | ||
+ | |||
+ | Deux commandes existent pour activer et désactiver manuellement une interface réseau | ||
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | Welcome to fdisk (util-linux 2.23.2). | + | [root@centos6 ~]# ifconfig |
+ | lo Link encap: | ||
+ | inet adr: | ||
+ | adr inet6: ::1/128 Scope:Hôte | ||
+ | UP LOOPBACK RUNNING | ||
+ | RX packets:384 errors:0 dropped:0 overruns:0 frame:0 | ||
+ | TX packets:384 errors:0 dropped:0 overruns:0 carrier:0 | ||
+ | collisions: | ||
+ | RX bytes: | ||
- | Changes will remain in memory only, until you decide to write them. | + | [root@centos6 ~]# ifup eth0 |
- | Be careful before using the write command. | + | État de connexion active& |
+ | État de chemin actif& | ||
+ | état& | ||
+ | Connexion activée | ||
+ | [root@centos6 ~]# ifconfig | ||
+ | eth0 Link encap: | ||
+ | inet adr:10.0.2.15 | ||
+ | adr inet6: fe80:: | ||
+ | UP BROADCAST RUNNING MULTICAST | ||
+ | RX packets:27 errors:0 dropped:0 overruns:0 frame:0 | ||
+ | TX packets:42 errors:0 dropped:0 overruns:0 carrier:0 | ||
+ | collisions: | ||
+ | RX bytes:4271 (4.1 KiB) TX bytes:6145 (6.0 KiB) | ||
- | Device does not contain a recognized partition table | + | lo Link encap: |
- | Building a new DOS disklabel with disk identifier 0x88708329. | + | inet adr:127.0.0.1 Masque: |
+ | adr inet6: ::1/128 Scope: | ||
+ | UP LOOPBACK RUNNING | ||
+ | RX packets:392 errors:0 dropped:0 overruns:0 frame:0 | ||
+ | TX packets:392 errors:0 dropped:0 overruns:0 carrier:0 | ||
+ | collisions: | ||
+ | RX bytes:33600 (32.8 KiB) TX bytes:33600 (32.8 KiB) | ||
+ | </ | ||
- | Command (m for help): n | + | ===/ |
- | Partition type: | + | |
- | | + | |
- | | + | |
- | Select (default p): p | + | |
- | Partition number (1-4, default 1): | + | |
- | First sector (2048-41943039, | + | |
- | Using default value 2048 | + | |
- | Last sector, +sectors or +size{K, | + | |
- | Using default value 41943039 | + | |
- | Partition 1 of type Linux and of size 20 GiB is set | + | |
- | Command (m for help): w | + | Ce fichier contient la correspondance entre des noms de réseaux et l' |
- | The partition table has been altered! | + | |
- | Calling ioctl() to re-read partition table. | + | < |
- | Syncing disks. | + | [root@centos6 ~]# cat / |
+ | default 0.0.0.0 | ||
+ | loopback 127.0.0.0 | ||
+ | link-local 169.254.0.0 | ||
</ | </ | ||
- | Créez maintenant un système de fichiers ext4 sur **/dev/sdb1** : | + | === Résolution d' |
+ | |||
+ | La configuration DNS est stockée dans le fichier | ||
+ | |||
+ | |||
+ | == / | ||
+ | |||
+ | La configuration DNS est stockée dans le fichier / | ||
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | mke2fs 1.42.9 (28-Dec-2013) | + | # Generated by NetworkManager |
- | Filesystem label= | + | |
- | OS type: Linux | + | |
- | Block size=4096 (log=2) | + | |
- | Fragment size=4096 (log=2) | + | |
- | Stride=0 blocks, Stripe width=0 blocks | + | |
- | 1310720 inodes, 5242624 blocks | + | |
- | 262131 blocks (5.00%) reserved for the super user | + | |
- | First data block=0 | + | |
- | Maximum filesystem blocks=2153775104 | + | |
- | 160 block groups | + | |
- | 32768 blocks per group, 32768 fragments per group | + | |
- | 8192 inodes per group | + | |
- | Superblock backups stored on blocks: | + | |
- | 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, | + | |
- | 4096000 | + | |
- | Allocating group tables: done | + | |
- | Writing inode tables: done | + | # No nameservers found; try putting DNS servers into your |
- | Creating journal (32768 blocks): done | + | # ifcfg files in / |
- | Writing superblocks and filesystem accounting information: | + | # |
+ | # DNS1=xxx.xxx.xxx.xxx | ||
+ | # DNS2=xxx.xxx.xxx.xxx | ||
+ | # DOMAIN=lab.foo.com bar.foo.com | ||
+ | nameserver 8.8.8.8 | ||
+ | nameserver 8.8.4.4 | ||
+ | search fenestros.loc | ||
</ | </ | ||
- | Montez | + | <WRAP center round important> |
+ | Notez que les DNS utilisés sont les serveurs DNS publics de Google. | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==/ | ||
+ | |||
+ | L' | ||
< | < | ||
- | [root@centos7 | + | [root@centos6 |
+ | hosts: | ||
</ | </ | ||
- | Copiez le contenu | + | == /etc/hosts == |
+ | |||
+ | Le mot **files** dans la sortie | ||
< | < | ||
- | [root@centos7 | + | [root@centos6 |
+ | 10.0.2.15 centos6 # | ||
+ | 127.0.0.1 localhost.localdomain localhost | ||
+ | :: | ||
</ | </ | ||
- | Démontez /dev/sdb1 et déplacez /home vers /root : | + | Pour tester le serveur DNS, deux commandes sont possibles |
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | [root@centos7 | + | Server: |
+ | Address: | ||
+ | |||
+ | Non-authoritative answer: | ||
+ | www.i2tch.com canonical name = i2tch.com. | ||
+ | Name: | ||
+ | Address: 90.119.37.144 | ||
+ | |||
+ | [root@centos6 | ||
+ | |||
+ | ; <<>> | ||
+ | ;; global options: +cmd | ||
+ | ;; Got answer: | ||
+ | ;; ->> | ||
+ | ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1 | ||
+ | |||
+ | ;; OPT PSEUDOSECTION: | ||
+ | ; EDNS: version: 0, flags:; udp: 65494 | ||
+ | ;; QUESTION SECTION: | ||
+ | ; | ||
+ | |||
+ | ;; ANSWER SECTION: | ||
+ | www.i2tch.com. 6563 IN CNAME i2tch.com. | ||
+ | i2tch.com. 50 IN A 90.119.37.144 | ||
+ | |||
+ | ;; Query time: 1 msec | ||
+ | ;; SERVER: 8.8.8.8# | ||
+ | ;; WHEN: Mon Jan 22 18:00:27 CET 2018 | ||
+ | ;; MSG SIZE rcvd: 72 | ||
</ | </ | ||
- | Identifiez l'UUID de /dev/ | + | ==== Services réseaux ==== |
+ | |||
+ | Quand un client émet une demande de connexion vers une application réseau sur un serveur, il utilise un socket attaché à un port local **supérieur à 1023**, alloué d'une manière dynamique. La requête contient le port de destination sur le serveur. Certaines applications serveurs se gèrent toutes seules, ce qui est la cas par exemple d' | ||
+ | |||
+ | === xinetd === | ||
+ | |||
+ | Sous RHEL/CentOS 6 xinetd n'est pas installé par défaut. Installez-le grâce à yum : | ||
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | lrwxrwxrwx. 1 root root 10 9 août 06:47 a5e2457f-7337-41f4-b958-e403eb419f94 | + | Loaded plugins: fastestmirror, |
+ | Loading mirror speeds from cached hostfile | ||
+ | * base: fr2.rpmfind.net | ||
+ | * extras: fr2.rpmfind.net | ||
+ | * updates: fr2.rpmfind.net | ||
+ | Setting up Install Process | ||
+ | Resolving Dependencies | ||
+ | --> Running transaction check | ||
+ | ---> | ||
+ | --> Finished Dependency Resolution | ||
+ | |||
+ | Dependencies Resolved | ||
+ | |||
+ | ================================================================================ | ||
+ | | ||
+ | ================================================================================ | ||
+ | Installing: | ||
+ | | ||
+ | |||
+ | Transaction Summary | ||
+ | ================================================================================ | ||
+ | Install | ||
+ | Upgrade | ||
+ | |||
+ | Total download size: 121 k | ||
+ | Installed size: 258 k | ||
+ | Is this ok [y/N]: y | ||
+ | Downloading Packages: | ||
+ | xinetd-2.3.14-33.el6.i686.rpm | ||
+ | Running rpm_check_debug | ||
+ | Running Transaction Test | ||
+ | Transaction Test Succeeded | ||
+ | Running Transaction | ||
+ | Installing | ||
+ | |||
+ | Installed: | ||
+ | xinetd.i686 2: | ||
+ | |||
+ | Complete! | ||
</ | </ | ||
- | Editez | + | Le programme xinetd est configuré via le fichier **/etc/xinetd.conf** : |
- | <file txt /etc/fstab> | + | <code> |
+ | [root@centos6 ~]# cat /etc/xinetd.conf | ||
# | # | ||
- | # /etc/fstab | + | # This is the master xinetd configuration file. Settings in the |
- | # Created | + | # default section will be inherited |
+ | # unless explicitly overridden in the service configuration. See | ||
+ | # xinetd.conf in the man pages for a more detailed explanation of | ||
+ | # these attributes. | ||
+ | |||
+ | defaults | ||
+ | { | ||
+ | # The next two items are intended to be a quick access place to | ||
+ | # temporarily enable or disable services. | ||
# | # | ||
- | # Accessible filesystems, | + | # enabled = |
- | # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info | + | # disabled = |
+ | |||
+ | # Define general logging characteristics. | ||
+ | log_type = SYSLOG daemon | ||
+ | log_on_failure = HOST | ||
+ | log_on_success = PID HOST DURATION EXIT | ||
+ | |||
+ | # Define access restriction defaults | ||
# | # | ||
- | UUID=e65fe7da-cda8-4f5a-a827-1b5cabe94bed / | + | # |
- | UUID=2d947276-66e8-41f4-8475-b64b67d7a249 /boot | + | # |
- | UUID=3181601a-7295-4ef0-a92c-f21f76b18e64 swap swap defaults | + | # max_load = 0 |
- | UUID=a5e2457f-7337-41f4-b958-e403eb419f94 / | + | cps = 50 10 |
+ | instances = 50 | ||
+ | per_source = 10 | ||
+ | # Address and networking defaults | ||
+ | # | ||
+ | # bind = | ||
+ | # mdns = yes | ||
+ | v6only = no | ||
+ | |||
+ | # setup environmental attributes | ||
+ | # | ||
+ | # | ||
+ | groups = yes | ||
+ | umask = 002 | ||
+ | |||
+ | # Generally, banners are not used. This sets up their global defaults | ||
+ | # | ||
+ | # banner = | ||
+ | # | ||
+ | # | ||
+ | } | ||
+ | |||
+ | includedir / | ||
+ | </ | ||
+ | |||
+ | Les valeurs des directives dans le fichier **/ | ||
+ | |||
+ | Les variables les plus importantes dans **/ | ||
+ | |||
+ | ^ Directive | ||
+ | | instances | ||
+ | | log_type | ||
+ | | log_on_succes | ||
+ | | log_on_failure | ||
+ | | cps | Indique 50 connexions par seconde avec un temps d' | ||
+ | |||
+ | Les options concernant les journaux sont : | ||
+ | |||
+ | | HOST | Journalisation de l' | ||
+ | | PID | Journalisation du PID du processus qui reçoit la demande d' | ||
+ | | DURATION | ||
+ | | EXIT | Journalisation de l' | ||
+ | |||
+ | Il est aussi possible de trouver les options suivantes pour les journaux : | ||
+ | |||
+ | | ATTEMPT | ||
+ | | USERID | ||
+ | |||
+ | Examinons maintenant le répertoire **/ | ||
+ | |||
+ | < | ||
+ | [root@centos6 ~]# ls -l / | ||
+ | total 52 | ||
+ | -rw-------. 1 root root 1157 7 déc. 22:07 chargen-dgram | ||
+ | -rw-------. 1 root root 1159 7 déc. 22:07 chargen-stream | ||
+ | -rw-r--r--. 1 root root 523 25 juin 2011 cvs | ||
+ | -rw-------. 1 root root 1157 7 déc. 22:07 daytime-dgram | ||
+ | -rw-------. 1 root root 1159 7 déc. 22:07 daytime-stream | ||
+ | -rw-------. 1 root root 1157 7 déc. 22:07 discard-dgram | ||
+ | -rw-------. 1 root root 1159 7 déc. 22:07 discard-stream | ||
+ | -rw-------. 1 root root 1148 7 déc. 22:07 echo-dgram | ||
+ | -rw-------. 1 root root 1150 7 déc. 22:07 echo-stream | ||
+ | -rw-r--r--. 1 root root 332 20 mai 2009 rsync | ||
+ | -rw-------. 1 root root 1212 7 déc. 22:07 tcpmux-server | ||
+ | -rw-------. 1 root root 1149 7 déc. 22:07 time-dgram | ||
+ | -rw-------. 1 root root 1150 7 déc. 22:07 time-stream | ||
+ | </ | ||
+ | |||
+ | A l' | ||
+ | |||
+ | < | ||
+ | [root@centos6 ~]# cat / | ||
+ | # default: off | ||
+ | # description: | ||
+ | # files. CVS stores all the versions of a file in a single \ | ||
+ | # file in a clever way that only stores the differences \ | ||
+ | # between versions. | ||
+ | service cvspserver | ||
+ | { | ||
+ | disable = yes | ||
+ | port = 2401 | ||
+ | socket_type = stream | ||
+ | protocol = tcp | ||
+ | wait = no | ||
+ | user = root | ||
+ | passenv = PATH | ||
+ | server = / | ||
+ | env = HOME=/ | ||
+ | server_args = -f --allow-root=/ | ||
+ | # bind = 127.0.0.1 | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Les directives principales de ce fichier sont : | ||
+ | |||
+ | ^ Paramètre | ||
+ | | disable | ||
+ | | port | Le numéro de port ou, à défaut, le numéro indiqué pour le service dans le fichier / | ||
+ | | socket_type | ||
+ | | protocol | ||
+ | | wait | **no** : indique si xinetd active un serveur par client. **yes** : indique que xinetd active un seul serveur pour tous les client | | ||
+ | | user | Indique le compte sous lequel le serveur est exécuté | | ||
+ | | server | ||
+ | | env | Définit un environnement système | | ||
+ | | server_args | ||
+ | |||
+ | Cependant il est aussi possible d' | ||
+ | |||
+ | ^ Paramètre | ||
+ | | nice | Fixe le niveau de nice entre -19 et +20 | 10 | | ||
+ | | max_load | ||
+ | | bind | Limite le service à l' | ||
+ | | only_from | ||
+ | | no_access | ||
+ | | access_time | ||
+ | | redirect | ||
+ | |||
+ | Afin d' | ||
+ | |||
+ | === TCP Wrapper === | ||
+ | |||
+ | **TCP Wrapper** contrôle l' | ||
+ | |||
+ | Quand une requête arrive pour un serveur, xinetd active le wrapper **tcpd** au lieu d' | ||
+ | |||
+ | **tcpd** met à jour un journal et vérifie si le client a le droit d' | ||
+ | |||
+ | * **/ | ||
+ | * **/ | ||
+ | |||
+ | Il faut noter que si ces fichiers n' | ||
+ | |||
+ | Le format d'une ligne dans un de ces deux fichiers est: | ||
+ | |||
+ | < | ||
+ | démon : liste_de_clients | ||
</ | </ | ||
- | Créez | + | Par exemple dans le cas d'un serveur **démon**, on verrait une ligne dans le fichier **/ |
+ | |||
+ | < | ||
+ | démon : LOCAL, .fenestros.loc | ||
+ | </ | ||
+ | |||
+ | ce qui implique que les machines dont le nom ne comporte pas de point ainsi que les machines du domaine **fenestros.loc** sont autorisées à utiliser le service. | ||
+ | |||
+ | Le mot clef **ALL** peut être utilisé pour indiquer tout. Par exemple, **ALL:ALL** dans le fichier **/ | ||
+ | |||
+ | ====Routage Statique==== | ||
+ | |||
+ | ===La Commande route=== | ||
+ | |||
+ | Pour afficher la table de routage de la machine vous pouvez utiliser la commande **route** | ||
< | < | ||
- | [root@centos7 | + | [root@centos6 |
+ | Table de routage IP du noyau | ||
+ | Destination | ||
+ | 192.168.1.0 | ||
+ | 10.0.2.0 | ||
+ | link-local | ||
+ | default | ||
</ | </ | ||
- | Montez / | + | La table issue de la commande **route** indique les informations suivantes: |
+ | |||
+ | * La destination qui peut être un hôte ou un réseau et est identifiée par les champs **Destination** et **Genmask** | ||
+ | * La route à prendre identifiée par les champs **Gateway** et **Iface**. Dans le cas d'une valeur de 0.0.0.0 ceci spécifie une route directe. La valeur d' | ||
+ | * Le champ **Indic** qui peux prendre un ou plusieurs de svaleurs suivantes: | ||
+ | * U - **Up** - la route est active | ||
+ | * H - **Host** - la route conduit à un hôte | ||
+ | * G - **Gateways** - la route passe par une passerelle | ||
+ | * Le champ **Metric** indique le nombre de sauts (passerelles) pour atteindre la destination, | ||
+ | * Le champ **Ref** indique le nombre de références à cette route. Ce champs est usilisé par le Noyau de Linux, | ||
+ | * Le champ **Use** indique le nombre de recherches associés à cette route. | ||
+ | |||
+ | La commande **route** permet aussi de paramétrer le routage indirect. Par exemple pour supprimer la route vers le réseau 192.168.1.0 | ||
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | [root@centos7 | + | [root@centos6 |
- | sysfs on /sys type sysfs (rw, | + | Table de routage IP du noyau |
- | proc on /proc type proc (rw, | + | Destination |
- | devtmpfs on /dev type devtmpfs (rw, | + | 10.0.2.0 |
- | securityfs on / | + | link-local * |
- | tmpfs on /dev/shm type tmpfs (rw, | + | default |
- | devpts on /dev/pts type devpts (rw, | + | |
- | tmpfs on /run type tmpfs (rw, | + | |
- | tmpfs on / | + | |
- | cgroup on / | + | |
- | pstore on / | + | |
- | cgroup on / | + | |
- | cgroup on / | + | |
- | cgroup on / | + | |
- | cgroup on / | + | |
- | cgroup on / | + | |
- | cgroup on / | + | |
- | cgroup on / | + | |
- | cgroup on / | + | |
- | cgroup on / | + | |
- | configfs on / | + | |
- | /dev/sda2 on / type xfs (rw, | + | |
- | selinuxfs on / | + | |
- | systemd-1 on / | + | |
- | debugfs on / | + | |
- | hugetlbfs on / | + | |
- | mqueue on /dev/mqueue type mqueue (rw, | + | |
- | tmpfs on /tmp type tmpfs (rw, | + | |
- | sunrpc on / | + | |
- | nfsd on / | + | |
- | /dev/sda1 on /boot type xfs (rw, | + | |
- | /dev/sdb1 on /home type ext4 (rw, | + | |
- | tmpfs on / | + | |
</ | </ | ||
- | Notez la taille de /home : | + | Pour ajouter |
< | < | ||
- | [trainee@centos7 | + | [root@centos6 |
- | Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur | + | [root@centos6 ~]# route |
- | / | + | Table de routage IP du noyau |
- | devtmpfs | + | Destination |
- | tmpfs 245M 0 | + | 192.168.1.0 |
- | tmpfs 245M 4,7M 240M 2% /run | + | 10.0.2.0 * |
- | tmpfs 245M 0 | + | link-local |
- | tmpfs 245M | + | default |
- | / | + | |
- | / | + | |
- | tmpfs | + | |
</ | </ | ||
- | <WRAP center round todo> | + | <WRAP center round important> |
- | Fermez | + | La commande utilisée pour ajouter une passerelle par défaut prend la forme suivante **route add default gw // |
</ | </ | ||
- | ====Créer un Nouveau Noyau==== | + | Les options cette commande sont : |
- | Pour créer l' | + | < |
+ | [root@centos6 ~]# route --help | ||
+ | Syntaxe: route [-nNvee] [-FC] [< | ||
+ | route [-v] [-FC] {add|del|flush} ... Modifie la table de routage pour AF. | ||
+ | |||
+ | route {-h|--help} [< | ||
+ | route {-V|--version} | ||
+ | |||
+ | -v, --verbose | ||
+ | -n, --numeric | ||
+ | -e, --extend | ||
+ | -F, --fib display Forwarding Information Base (default) | ||
+ | -C, --cache | ||
+ | |||
+ | < | ||
+ | Liste les familles d' | ||
+ | inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) | ||
+ | netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) | ||
+ | x25 (CCITT X.25) | ||
+ | </code> | ||
+ | |||
+ | Vous pouvez aussi utiliser | ||
< | < | ||
- | [trainee@centos7 | + | [root@centos6 |
- | [trainee@centos7 ~]$ ls -laR rpmbuild/ | + | Table de routage IP du noyau |
- | rpmbuild/: | + | Destination |
- | total 28 | + | 192.168.1.0 192.168.1.2 255.255.255.0 |
- | drwxrwxr-x. 7 trainee trainee 4096 9 août 06:56 . | + | 192.168.1.0 |
- | drwx------. 15 trainee trainee 4096 9 août 06:56 .. | + | 10.0.2.0 0.0.0.0 |
- | drwxrwxr-x. 2 trainee trainee 4096 9 août 06:56 BUILD | + | 0.0.0.0 |
- | drwxrwxr-x. 2 trainee trainee 4096 9 août 06:56 RPMS | + | </ |
- | drwxrwxr-x. 2 trainee trainee 4096 9 août 06:56 SOURCES | + | |
- | drwxrwxr-x. 2 trainee trainee 4096 9 août 06:56 SPECS | + | |
- | drwxrwxr-x. 2 trainee trainee 4096 9 août 06:56 SRPMS | + | |
- | rpmbuild/ | + | La table issue de la commande **netstat |
- | total 8 | + | |
- | drwxrwxr-x. 2 trainee trainee 4096 9 août 06:56 . | + | |
- | drwxrwxr-x. 7 trainee trainee 4096 9 août 06:56 .. | + | |
- | rpmbuild/ | + | * La champ **MSS** indique la taille maximale des segments TCP sur la route, |
- | total 8 | + | |
- | drwxrwxr-x. 2 trainee trainee 4096 9 août 06:56 . | + | |
- | drwxrwxr-x. 7 trainee trainee 4096 9 août 06:56 .. | + | |
- | rpmbuild/SOURCES: | + | ===Activer/désactiver le routage sur le serveur=== |
- | total 8 | + | |
- | drwxrwxr-x. 2 trainee trainee 4096 9 août 06:56 . | + | |
- | drwxrwxr-x. 7 trainee trainee 4096 9 août 06:56 .. | + | |
- | rpmbuild/ | + | Pour activer le routage sur le serveur, il convient d' |
- | total 8 | + | |
- | drwxrwxr-x. 2 trainee trainee 4096 9 août 06:56 . | + | |
- | drwxrwxr-x. 7 trainee trainee 4096 9 août 06:56 .. | + | |
- | rpmbuild/SRPMS: | + | < |
- | total 8 | + | [root@centos6 ~]# echo 1 > /proc/ |
- | drwxrwxr-x. 2 trainee trainee 4096 9 août 06:56 . | + | [root@centos6 ~]# cat / |
- | drwxrwxr-x. 7 trainee trainee 4096 9 août 06:56 .. | + | 1 |
</ | </ | ||
- | Téléchargez | + | Pour désactiver |
< | < | ||
- | [trainee@centos7 | + | [root@centos6 |
- | Linux centos7.fenestros.loc 3.10.0-327.13.1.el7.x86_64 | + | [root@centos6 ~]# cat / |
+ | 0 | ||
+ | </code> | ||
- | [trainee@centos7 ~]$ wget http:// | + | =====Configuration du Réseau sous RHEL/CentOS |
- | --2016-08-09 06: | + | |
- | Résolution de vault.centos.org (vault.centos.org)... 88.208.217.170, | + | |
- | Connexion vers vault.centos.org (vault.centos.org)|88.208.217.170|: | + | |
- | requête HTTP transmise, en attente de la réponse...200 OK | + | |
- | Longueur: 83047820 (79M) [application/ | + | |
- | Sauvegarde en : «kernel-3.10.0-327.13.1.el7.src.rpm» | + | |
- | 100%[==============================================================================================================================> | + | RHEL/CentOS 7 utilise exclusivement **Network Manager** pour gérer le réseau. Network Manager est composé de deux éléments : |
- | 2016-08-09 07:00:00 (471 KB/s) - «kernel-3.10.0-327.13.1.el7.src.rpm» sauvegardé [83047820/ | + | * un service qui gère les connexions réseaux et rapporte leurs états, |
+ | * des front-ends qui passent par un API de configuration du service. | ||
+ | |||
+ | <WRAP center round important> | ||
+ | **Important** : Notez qu' | ||
+ | </ | ||
+ | |||
+ | Le service NetworkManager doit toujours être lancé : | ||
+ | |||
+ | < | ||
+ | [root@centos7 ~]# systemctl status NetworkManager.service | ||
+ | ● NetworkManager.service - Network Manager | ||
+ | | ||
+ | | ||
+ | Main PID: 673 (NetworkManager) | ||
+ | | ||
+ | | ||
+ | | ||
+ | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | ||
+ | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | ||
+ | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | ||
+ | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | ||
+ | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | ||
+ | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | ||
+ | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | ||
+ | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | ||
+ | Aug 08 11:03:55 centos7.fenestros.loc NetworkManager[673]: | ||
+ | Aug 08 11:03:55 centos7.fenestros.loc dhclient[2673]: | ||
</ | </ | ||
- | Installez maintenant les dépendances | + | ====La Commande nmcli==== |
+ | |||
+ | La commande **nmcli** (Network Manager Command Line Interface) est utilisée | ||
+ | |||
+ | Les options et les sous-commandes peuvent être consultées | ||
< | < | ||
- | [trainee@centos7 ~]$ su - | + | [root@centos7 ~]# nmcli help |
- | Mot de passe : fenestros | + | Usage: nmcli [OPTIONS] OBJECT { COMMAND |
- | [root@centos7 ~]# yum-builddep / | + | |
- | Loaded plugins: fastestmirror, | + | |
- | Enabling base-source repository | + | |
- | Enabling extras-source repository | + | |
- | Enabling updates-source repository | + | |
- | base-source | + | |
- | extras-source | + | |
- | updates-source | + | |
- | (1/3): extras-source/ | + | |
- | (2/3): base-source/ | + | |
- | (3/3): updates-source/ | + | |
- | Loading mirror speeds from cached hostfile | + | |
- | * base: centos.mirrors.ovh.net | + | |
- | * extras: centos.mirror.fr.planethoster.net | + | |
- | * updates: mirror1.evolution-host.com | + | |
- | Checking for new repos for mirrors | + | |
- | Getting requirements for kernel-3.10.0-327.13.1.el7.src | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | --> Running transaction check | + | |
- | ---> Package asciidoc.noarch 0: | + | |
- | --> Processing Dependency: source-highlight for package: asciidoc-8.6.8-5.el7.noarch | + | |
- | --> Processing Dependency: graphviz for package: asciidoc-8.6.8-5.el7.noarch | + | |
- | --> Processing Dependency: docbook-style-xsl for package: asciidoc-8.6.8-5.el7.noarch | + | |
- | ---> Package hmaccalc.x86_64 0: | + | |
- | ---> Package m4.x86_64 0: | + | |
- | ---> Package newt-devel.x86_64 0: | + | |
- | --> Processing Dependency: slang-devel for package: newt-devel-0.52.15-4.el7.x86_64 | + | |
- | ---> Package perl-ExtUtils-Embed.noarch 0: | + | |
- | --> Processing Dependency: perl-devel for package: perl-ExtUtils-Embed-1.30-286.el7.noarch | + | |
- | ---> Package python-devel.x86_64 0: | + | |
- | ---> Package xmlto.x86_64 0: | + | |
- | --> Processing Dependency: text-www-browser for package: xmlto-0.0.25-7.el7.x86_64 | + | |
- | --> Processing Dependency: flex for package: xmlto-0.0.25-7.el7.x86_64 | + | |
- | --> Processing Dependency: docbook-dtds for package: xmlto-0.0.25-7.el7.x86_64 | + | |
- | --> Running transaction check | + | |
- | ---> Package docbook-dtds.noarch 0: | + | |
- | --> Processing Dependency: sgml-common for package: docbook-dtds-1.0-60.el7.noarch | + | |
- | ---> Package docbook-style-xsl.noarch 0: | + | |
- | ---> Package flex.x86_64 0: | + | |
- | ---> Package graphviz.x86_64 0: | + | |
- | --> Processing Dependency: libXaw.so.7()(64bit) for package: graphviz-2.30.1-19.el7.x86_64 | + | |
- | ---> Package lynx.x86_64 0: | + | |
- | ---> Package perl-devel.x86_64 4: | + | |
- | --> Processing Dependency: systemtap-sdt-devel for package: 4: | + | |
- | --> Processing Dependency: perl(ExtUtils:: | + | |
- | --> Processing Dependency: perl(ExtUtils:: | + | |
- | --> Processing Dependency: perl(ExtUtils:: | + | |
- | --> Processing Dependency: libdb-devel for package: 4: | + | |
- | --> Processing Dependency: gdbm-devel for package: 4: | + | |
- | ---> Package slang-devel.x86_64 0: | + | |
- | ---> Package source-highlight.x86_64 0: | + | |
- | --> Processing Dependency: ctags for package: source-highlight-3.1.6-6.el7.x86_64 | + | |
- | --> Processing Dependency: libboost_regex.so.1.53.0()(64bit) for package: source-highlight-3.1.6-6.el7.x86_64 | + | |
- | --> Running transaction check | + | |
- | ---> Package boost-regex.x86_64 0: | + | |
- | ---> Package ctags.x86_64 0: | + | |
- | ---> Package gdbm-devel.x86_64 0: | + | |
- | ---> Package libXaw.x86_64 0: | + | |
- | ---> Package libdb-devel.x86_64 0: | + | |
- | ---> Package perl-ExtUtils-Install.noarch 0: | + | |
- | ---> Package perl-ExtUtils-MakeMaker.noarch 0: | + | |
- | --> Processing Dependency: perl(Test:: | + | |
- | --> Processing Dependency: perl(ExtUtils:: | + | |
- | ---> Package perl-ExtUtils-ParseXS.noarch 1: | + | |
- | ---> Package sgml-common.noarch 0: | + | |
- | ---> Package systemtap-sdt-devel.x86_64 0: | + | |
- | --> Running transaction check | + | |
- | ---> Package perl-ExtUtils-Manifest.noarch 0: | + | |
- | ---> Package perl-Test-Harness.noarch 0: | + | |
- | --> Finished Dependency Resolution | + | |
- | Dependencies Resolved | + | OPTIONS |
+ | -t[erse] | ||
+ | -p[retty] | ||
+ | -m[ode] tabular|multiline | ||
+ | -f[ields] < | ||
+ | -e[scape] yes|no | ||
+ | -n[ocheck] | ||
+ | -a[sk] | ||
+ | -w[ait] < | ||
+ | -v[ersion] | ||
+ | -h[elp] | ||
- | ======================================================================================================================================================================== | + | OBJECT |
- | Package | + | |
- | ======================================================================================================================================================================== | + | |
- | Installing: | + | |
- | asciidoc | + | |
- | hmaccalc | + | |
- | m4 x86_64 | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | Installing for dependencies: | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | Transaction Summary | + | [root@centos7 ~]# nmcli g help |
- | ======================================================================================================================================================================== | + | Usage: nmcli general { COMMAND | help } |
- | Install | + | |
+ | COMMAND := { status | hostname | permissions | logging } | ||
+ | |||
+ | | ||
+ | |||
+ | hostname [< | ||
+ | |||
+ | permissions | ||
+ | |||
+ | logging [level <log level>] [domains <log domains> | ||
+ | |||
+ | |||
+ | [root@centos7 ~]# nmcli g status help | ||
+ | Usage: nmcli general status { help } | ||
+ | |||
+ | Show overall status of NetworkManager. | ||
+ | ' | ||
- | Total download size: 9.0 M | ||
- | Installed size: 43 M | ||
- | Is this ok [y/d/N]: y | ||
</ | </ | ||
- | Installez maintenant le paquet | + | ====Connections et Profils==== |
+ | |||
+ | 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@centos7 ~]# exit | + | [root@centos7 ~]# nmcli c show |
- | logout | + | NAME UUID TYPE DEVICE |
- | [trainee@centos7 ~]$ rpm -Uvh kernel-3.10.0-327.13.1.el7.src.rpm | + | Wired connection |
- | Mise à jour / installation... | + | |
- | | + | |
- | attention : utilisateur builder inexistant | + | |
- | attention : groupe builder inexistant | + | |
- | attention : utilisateur builder inexistant | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant - utilisation de root | + | |
- | attention : utilisateur builder inexistant - utilisation de root | + | |
- | attention : groupe builder inexistant | + | |
</ | </ | ||
- | <WRAP center round important> | + | Comme on peut constater ici, il n' |
- | Les erreurs sont sans importance. | + | |
- | </ | + | |
- | ====Préparer l' | + | Créez donc un profil IP fixe rattaché au périphérique |
- | + | ||
- | Naviguez vers le repertoire | + | |
< | < | ||
- | [trainee@centos7 ~]$ cd ~/ | + | [root@centos7 ~]# nmcli connection add con-name ip_fixe ifname enp0s3 type ethernet ip4 10.0.2.16/24 gw4 10.0.2.2 |
- | [trainee@centos7 SPECS]$ rpmbuild | + | Connection ' |
- | Construction pour plate-formes cibles: x86_64 | + | |
- | Construction pour cible x86_64 | + | |
- | erreur : Dépendances de construction manquantes: | + | |
- | pesign >= 0.109-4 est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64 | + | |
- | elfutils-devel est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64 | + | |
- | binutils-devel est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64 | + | |
- | bison est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64 | + | |
- | audit-libs-devel est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64 | + | |
- | numactl-devel est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64 | + | |
- | pciutils-devel est nécessaire pour kernel-3.10.0-327.13.1.el7.x86_64 | + | |
</ | </ | ||
- | <WRAP center round important> | + | Constatez sa présence : |
- | Notez qu'il existe toujours des dépendances manquantes ! | + | |
- | </ | + | |
- | Redevenez | + | < |
+ | [root@centos7 ~]# nmcli c show | ||
+ | NAME UUID TYPE DEVICE | ||
+ | ip_fixe | ||
+ | Wired connection 1 45b701c1-0a21-4d76-a795-2f2bcba86955 | ||
+ | </ | ||
+ | |||
+ | Notez que la sortie n' | ||
< | < | ||
- | [trainee@centos7 | + | [root@centos7 |
- | /home/trainee | + | GENERAL.DEVICE: |
- | [trainee@centos7 ~]$ su - | + | GENERAL.TYPE: |
- | Mot de passe : | + | GENERAL.HWADDR: |
- | Dernière connexion | + | GENERAL.MTU: |
- | [root@centos7 ~]# yum install elfutils-devel binutils-devel bison audit-libs-devel numactl-devel pciutils-devel pesign | + | GENERAL.STATE: |
- | ... | + | GENERAL.CONNECTION: |
+ | GENERAL.CON-PATH: | ||
+ | WIRED-PROPERTIES.CARRIER: | ||
+ | IP4.ADDRESS[1]: | ||
+ | IP4.GATEWAY: | ||
+ | IP4.DNS[1]: | ||
+ | IP6.ADDRESS[1]: fe80:: | ||
+ | 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: | ||
</ | </ | ||
- | Vous pouvez maintenant | + | Pour activer le profil ip_fixe, |
< | < | ||
- | [root@centos7 ~]# exit | + | [root@centos7 ~]# nmcli connection up ip_fixe |
- | logout | + | |
- | [trainee@centos7 ~]$ cd ~/ | + | |
- | [trainee@centos7 SPECS]$ rpmbuild -bp --target=$(uname -m) kernel.spec | + | |
- | Construction pour plate-formes cibles: x86_64 | + | |
- | Construction pour cible x86_64 | + | |
- | Exécution_de(%prep) : /bin/sh -e / | + | |
- | + umask 022 | + | |
- | + cd / | + | |
- | + patch_command=' | + | |
- | + cd / | + | |
- | + rm -rf kernel-3.10.0-327.13.1.el7 | + | |
- | + / | + | |
- | + cd kernel-3.10.0-327.13.1.el7 | + | |
- | + /usr/bin/xz -dc / | + | |
- | + / | + | |
- | ... | + | |
</ | </ | ||
- | A l'issu du processus, examinez l' | + | Le profil ip_fixe est maintenant activé tandis que le profil enp0s3 a été désactivé |
< | < | ||
- | [trainee@centos7 | + | [root@centos7 |
- | total 824 | + | NAME UUID TYPE DEVICE |
- | drwxr-xr-x. 24 trainee trainee | + | ip_fixe |
- | drwxr-xr-x. 3 trainee trainee | + | Wired connection |
- | drwxr-xr-x. 32 trainee trainee | + | [root@centos7 ~]# nmcli d show |
- | drwxr-xr-x. | + | GENERAL.DEVICE: enp0s3 |
- | -rw-r--r--. | + | GENERAL.TYPE: ethernet |
- | -rw-r--r--. 1 trainee trainee 126420 | + | GENERAL.HWADDR: 08: |
- | drwxr-xr-x. 2 trainee trainee | + | GENERAL.MTU: 1500 |
- | -rw-r--r--. 1 trainee trainee | + | GENERAL.STATE: 100 (connected) |
- | -rw-r--r--. | + | GENERAL.CONNECTION: ip_fixe |
- | drwxr-xr-x. 4 trainee trainee | + | GENERAL.CON-PATH: / |
- | drwxr-xr-x. 101 trainee trainee | + | WIRED-PROPERTIES.CARRIER: on |
- | drwxr-xr-x. 114 trainee trainee | + | IP4.ADDRESS[1]: 10.0.2.16/24 |
- | drwxr-xr-x. 36 trainee trainee | + | IP4.GATEWAY: 10.0.2.2 |
- | drwxr-xr-x. 74 trainee trainee | + | IP6.ADDRESS[1]: |
- | -rw-r--r--. | + | IP6.GATEWAY: |
- | drwxr-xr-x. 27 trainee trainee | + | |
- | drwxr-xr-x. 2 trainee trainee | + | GENERAL.DEVICE: lo |
- | drwxr-xr-x. | + | GENERAL.TYPE: loopback |
- | -rw-r--r--. | + | GENERAL.HWADDR: |
- | -rw-r--r--. 1 trainee trainee | + | GENERAL.MTU: 65536 |
- | drwxr-xr-x. 11 trainee trainee | + | GENERAL.STATE: 10 (unmanaged) |
- | drwxr-xr-x. 10 trainee trainee | + | GENERAL.CONNECTION: |
- | -rw-r--r--. 1 trainee trainee | + | GENERAL.CON-PATH: |
- | -rw-r--r--. 1 trainee trainee 260223 29 févr. 18:35 MAINTAINERS | + | IP4.ADDRESS[1]: 127.0.0.1/8 |
- | -rw-r--r--. 1 trainee trainee | + | IP4.GATEWAY: |
- | drwxr-xr-x. | + | IP6.ADDRESS[1]: |
- | drwxr-xr-x. 56 trainee trainee | + | IP6.GATEWAY: |
- | -rw-r--r--. | + | |
- | -rw-r--r--. | + | |
- | drwxr-xr-x. 12 trainee trainee | + | |
- | -rw-r--r--. | + | |
- | drwxr-xr-x. 13 trainee trainee | + | |
- | drwxr-xr-x. 9 trainee trainee | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
</ | </ | ||
- | A l'intérieur de ce répertoire se trouve le fichier .config utilisé pour compiler le noyau : | + | Pour consulter les paramètres d'un profil, utilisez la commande suivante |
< | < | ||
- | [trainee@centos7 | + | [root@centos7 ~]# nmcli -p connection show "Wired connection 1" |
- | # | + | =============================================================================== |
- | # Automatically generated file; DO NOT EDIT. | + | Connection profile details (Wired connection 1) |
- | # Linux/ | + | =============================================================================== |
- | # | + | connection.id: |
- | CONFIG_64BIT=y | + | connection.uuid: |
- | CONFIG_X86_64=y | + | connection.interface-name: |
- | CONFIG_X86=y | + | connection.type: |
- | CONFIG_INSTRUCTION_DECODER=y | + | connection.autoconnect: |
- | CONFIG_OUTPUT_FORMAT="elf64-x86-64" | + | connection.autoconnect-priority: |
- | CONFIG_ARCH_DEFCONFIG=" | + | connection.timestamp: |
- | CONFIG_LOCKDEP_SUPPORT=y | + | connection.read-only: no |
- | CONFIG_STACKTRACE_SUPPORT=y | + | connection.permissions: |
- | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | + | connection.zone: -- |
- | CONFIG_MMU=y | + | connection.master: |
- | CONFIG_NEED_DMA_MAP_STATE=y | + | connection.slave-type: |
- | CONFIG_NEED_SG_DMA_LENGTH=y | + | connection.autoconnect-slaves: |
- | CONFIG_GENERIC_ISA_DMA=y | + | connection.secondaries: |
- | CONFIG_GENERIC_BUG=y | + | connection.gateway-ping-timeout: |
- | CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y | + | connection.metered: |
- | CONFIG_GENERIC_HWEIGHT=y | + | ------------------------------------------------------------------------------- |
- | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | + | 802-3-ethernet.port: -- |
- | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | + | 802-3-ethernet.speed: |
- | CONFIG_GENERIC_CALIBRATE_DELAY=y | + | 802-3-ethernet.duplex: |
- | CONFIG_ARCH_HAS_CPU_RELAX=y | + | 802-3-ethernet.auto-negotiate: |
- | CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y | + | 802-3-ethernet.mac-address: |
- | CONFIG_ARCH_HAS_CPU_AUTOPROBE=y | + | 802-3-ethernet.cloned-mac-address: |
- | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | + | 802-3-ethernet.mac-address-blacklist: |
- | CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y | + | 802-3-ethernet.mtu: |
- | CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y | + | 802-3-ethernet.s390-subchannels: |
- | CONFIG_ARCH_HIBERNATION_POSSIBLE=y | + | 802-3-ethernet.s390-nettype: |
- | CONFIG_ARCH_SUSPEND_POSSIBLE=y | + | 802-3-ethernet.s390-options: |
- | CONFIG_ZONE_DMA32=y | + | 802-3-ethernet.wake-on-lan: |
- | CONFIG_AUDIT_ARCH=y | + | 802-3-ethernet.wake-on-lan-password: |
- | CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y | + | ------------------------------------------------------------------------------- |
- | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y | + | ipv4.method: |
- | CONFIG_HAVE_INTEL_TXT=y | + | ipv4.dns: |
- | CONFIG_X86_64_SMP=y | + | ipv4.dns-search: |
- | CONFIG_X86_HT=y | + | ipv4.addresses: |
- | CONFIG_ARCH_HWEIGHT_CFLAGS=" | + | ipv4.gateway: |
- | CONFIG_ARCH_SUPPORTS_UPROBES=y | + | ipv4.routes: |
- | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | + | ipv4.route-metric: |
- | CONFIG_IRQ_WORK=y | + | ipv4.ignore-auto-routes: |
- | CONFIG_BUILDTIME_EXTABLE_SORT=y | + | ipv4.ignore-auto-dns: |
+ | ipv4.dhcp-client-id: | ||
+ | ipv4.dhcp-send-hostname: | ||
+ | ipv4.dhcp-hostname: | ||
+ | ipv4.never-default: | ||
+ | ipv4.may-fail: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | ipv6.method: | ||
+ | ipv6.dns: | ||
+ | ipv6.dns-search: | ||
+ | ipv6.addresses: | ||
+ | ipv6.gateway: | ||
+ | ipv6.routes: | ||
+ | ipv6.route-metric: | ||
+ | ipv6.ignore-auto-routes: | ||
+ | ipv6.ignore-auto-dns: | ||
+ | ipv6.never-default: | ||
+ | ipv6.may-fail: | ||
+ | ipv6.ip6-privacy: | ||
+ | ipv6.dhcp-send-hostname: | ||
+ | ipv6.dhcp-hostname: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | [root@centos7 ~]# nmcli -p connection show ip_fixe | ||
+ | =============================================================================== | ||
+ | | ||
+ | =============================================================================== | ||
+ | connection.id: | ||
+ | connection.uuid: | ||
+ | connection.interface-name: | ||
+ | connection.type: | ||
+ | connection.autoconnect: | ||
+ | connection.autoconnect-priority: | ||
+ | connection.timestamp: | ||
+ | connection.read-only: | ||
+ | connection.permissions: | ||
+ | connection.zone: | ||
+ | connection.master: | ||
+ | connection.slave-type: | ||
+ | connection.autoconnect-slaves: | ||
+ | connection.secondaries: | ||
+ | connection.gateway-ping-timeout: | ||
+ | connection.metered: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | 802-3-ethernet.port: | ||
+ | 802-3-ethernet.speed: | ||
+ | 802-3-ethernet.duplex: | ||
+ | 802-3-ethernet.auto-negotiate: | ||
+ | 802-3-ethernet.mac-address: | ||
+ | 802-3-ethernet.cloned-mac-address: | ||
+ | 802-3-ethernet.mac-address-blacklist: | ||
+ | 802-3-ethernet.mtu: | ||
+ | 802-3-ethernet.s390-subchannels: | ||
+ | 802-3-ethernet.s390-nettype: | ||
+ | 802-3-ethernet.s390-options: | ||
+ | 802-3-ethernet.wake-on-lan: | ||
+ | 802-3-ethernet.wake-on-lan-password: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | ipv4.method: | ||
+ | ipv4.dns: | ||
+ | ipv4.dns-search: | ||
+ | ipv4.addresses: | ||
+ | ipv4.gateway: | ||
+ | ipv4.routes: | ||
+ | ipv4.route-metric: | ||
+ | ipv4.ignore-auto-routes: | ||
+ | ipv4.ignore-auto-dns: | ||
+ | ipv4.dhcp-client-id: | ||
+ | ipv4.dhcp-send-hostname: | ||
+ | ipv4.dhcp-hostname: | ||
+ | ipv4.never-default: | ||
+ | ipv4.may-fail: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | ipv6.method: | ||
+ | ipv6.dns: | ||
+ | ipv6.dns-search: | ||
+ | ipv6.addresses: | ||
+ | ipv6.gateway: | ||
+ | ipv6.routes: | ||
+ | ipv6.route-metric: | ||
+ | ipv6.ignore-auto-routes: | ||
+ | ipv6.ignore-auto-dns: | ||
+ | ipv6.never-default: | ||
+ | ipv6.may-fail: | ||
+ | ipv6.ip6-privacy: | ||
+ | ipv6.dhcp-send-hostname: | ||
+ | ipv6.dhcp-hostname: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | =============================================================================== | ||
+ | | ||
+ | =============================================================================== | ||
+ | GENERAL.NAME: | ||
+ | GENERAL.UUID: | ||
+ | GENERAL.DEVICES: | ||
+ | GENERAL.STATE: | ||
+ | GENERAL.DEFAULT: | ||
+ | GENERAL.DEFAULT6: | ||
+ | GENERAL.VPN: | ||
+ | GENERAL.ZONE: | ||
+ | GENERAL.DBUS-PATH: | ||
+ | GENERAL.CON-PATH: | ||
+ | GENERAL.SPEC-OBJECT: | ||
+ | GENERAL.MASTER-PATH: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | IP4.ADDRESS[1]: | ||
+ | IP4.GATEWAY: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | IP6.ADDRESS[1]: | ||
+ | IP6.GATEWAY: | ||
+ | ------------------------------------------------------------------------------- | ||
+ | </ | ||
- | # | + | Pour consulter la liste profils associés à un périphérique, |
- | --Plus--(1%) | + | |
+ | < | ||
+ | [root@centos7 ~]# nmcli -f CONNECTIONS device show enp0s3 | ||
+ | CONNECTIONS.AVAILABLE-CONNECTION-PATHS: / | ||
+ | CONNECTIONS.AVAILABLE-CONNECTIONS[1]: | ||
+ | CONNECTIONS.AVAILABLE-CONNECTIONS[2]: | ||
</ | </ | ||
- | Ce fichier est généré par une des trois commandes suivantes et ne doit **pas** être édité manuellement | + | Les fichiers de configuration pour le periphérique |
- | * make config | + | < |
- | | + | [root@centos7 ~]# ls -l / |
- | | + | -rw-r--r--. 1 root root 296 Aug 8 11:08 ifcfg-ip_fixe |
+ | -rw-r--r--. 1 root root 254 Sep 16 2015 ifcfg-lo | ||
+ | </ | ||
- | Dans ce fichier, vous pouvez constater la présence de lignes correspondantes à des fonctionalités suivies par une lettre ou une valeur. Dans le cas d'une lettre, la signification est la suivante | + | L' |
- | * **y** | + | < |
- | * la fonctionalité est incluse dans le noyau monolithique ou dans le cas d'une dépendance d'un module, dans le module concerné, | + | [root@centos7 ~]# cat / |
- | * **m** | + | TYPE=Ethernet |
- | * la fonctionalité est incluse en tant que module, | + | BOOTPROTO=none |
- | * **n** | + | IPADDR=10.0.2.16 |
- | * la fonctionalité n'est pas incluse. Cette option est rarement visible car dans bien les cas, la fonctionalité est simplement commentée dans le fichier lui-même. | + | PREFIX=24 |
+ | GATEWAY=10.0.2.2 | ||
+ | DEFROUTE=yes | ||
+ | IPV4_FAILURE_FATAL=no | ||
+ | IPV6INIT=yes | ||
+ | IPV6_AUTOCONF=yes | ||
+ | IPV6_DEFROUTE=yes | ||
+ | IPV6_PEERDNS=yes | ||
+ | IPV6_PEERROUTES=yes | ||
+ | IPV6_FAILURE_FATAL=no | ||
+ | NAME=ip_fixe | ||
+ | UUID=fb3a11d9-4e03-4032-b26e-09d1195d2bcd | ||
+ | DEVICE=enp0s3 | ||
+ | ONBOOT=yes | ||
+ | </ | ||
- | Le fichier **Makefile** contient le nom du noyau et spécifie les informations suivantes | + | La résolution des noms est donc inactive |
- | * VERSION, | + | < |
- | * PATCHLEVEL, | + | [root@centos7 ~]# ping www.free.fr |
- | * SUBLEVEL, | + | ping: unknown host www.free.fr |
- | * EXTRAVERSION. | + | </ |
- | Les trois premières informations sont gérées par **kernel.org** et Linus Torvalds en personne tandis que l' | + | Modifiez donc la configuration du profil |
< | < | ||
- | [trainee@centos7 | + | [root@centos7 |
- | VERSION = 3 | + | </code> |
- | PATCHLEVEL = 10 | + | |
- | SUBLEVEL = 0 | + | |
- | EXTRAVERSION = | + | |
- | NAME = Unicycling Gorilla | + | |
- | RHEL_MAJOR = 7 | + | |
- | RHEL_MINOR = 2 | + | |
- | RHEL_RELEASE = 327.13.1 | + | |
- | RHEL_DRM_VERSION = 4 | + | |
- | RHEL_DRM_PATCHLEVEL = 1 | + | |
- | RHEL_DRM_SUBLEVEL = 0 | + | |
- | # *DOCUMENTATION* | + | L' |
- | # To see a list of typical targets execute "make help" | + | |
- | # More info can be located in ./README | + | |
- | # Comments in this file are targeted only to the developer, do not | + | |
- | # expect to learn how to build the kernel reading this file. | + | |
- | # Do not: | + | < |
- | # o use make's built-in rules and variables | + | [root@centos7 ~]# cat / |
- | # (this increases performance and avoids hard-to-debug behaviour); | + | TYPE=Ethernet |
- | # o print " | + | BOOTPROTO=none |
- | MAKEFLAGS += -rR --no-print-directory | + | DEFROUTE=yes |
+ | IPV4_FAILURE_FATAL=no | ||
+ | IPV6INIT=yes | ||
+ | IPV6_AUTOCONF=yes | ||
+ | IPV6_DEFROUTE=yes | ||
+ | IPV6_FAILURE_FATAL=no | ||
+ | NAME=ip_fixe | ||
+ | UUID=fb3a11d9-4e03-4032-b26e-09d1195d2bcd | ||
+ | DEVICE=enp0s3 | ||
+ | ONBOOT=yes | ||
+ | IPADDR=10.0.2.16 | ||
+ | PREFIX=24 | ||
+ | GATEWAY=10.0.2.2 | ||
+ | DNS1=8.8.8.8 | ||
+ | IPV6_PEERDNS=yes | ||
+ | IPV6_PEERROUTES=yes | ||
+ | </ | ||
- | # Avoid funny character set dependencies | + | Afin que la modification du serveur DNS soit prise en compte, re-démarrez le service NetworkManager : |
- | unexport LC_ALL | + | |
- | LC_COLLATE=C | + | |
- | LC_NUMERIC=C | + | |
- | export LC_COLLATE LC_NUMERIC | + | |
- | # We are using a recursive build, so we need to do a little thinking | + | < |
- | # to get the ordering right. | + | [root@centos7 ~]# systemctl restart NetworkManager.service |
- | # | + | [root@centos7 ~]# systemctl status NetworkManager.service |
- | # Most importantly: sub-Makefiles should only ever modify files in | + | ● NetworkManager.service - Network Manager |
- | # their own directory. If in some directory we have a dependency on | + | |
- | # a file in another dir (which doesn't happen often, but it's often | + | |
- | # unavoidable when linking the built-in.o targets which finally | + | Main PID: 8394 (NetworkManager) |
- | # turn into vmlinux), we will call a sub make in that other dir, and | + | |
- | # after that we are sure that everything which is in that other dir | + | └─8394 / |
- | # is now up to date. | + | |
- | # | + | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: |
- | # The only cases where we need to modify files which have global | + | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: |
- | # effects are thus separated out and done before the recursive | + | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: |
- | # descending is started. They are now explicitly listed as the | + | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: |
- | # prepare rule. | + | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: |
- | --Plus--(2%) | + | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: |
+ | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | ||
+ | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | ||
+ | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | ||
+ | Aug 08 11:16:53 centos7.fenestros.loc NetworkManager[8394]: | ||
</ | </ | ||
- | <WRAP center round important> | + | Vérifiez que le fichier |
- | 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' | + | |
- | </ | + | |
- | Utilisez maintenant | + | < |
+ | [root@centos7 ~]# cat / | ||
+ | # Generated by NetworkManager | ||
+ | search fenestros.loc | ||
+ | nameserver 8.8.8.8 | ||
+ | </ | ||
+ | |||
+ | Dernièrement vérifiez | ||
< | < | ||
- | [trainee@centos7 | + | [root@centos7 |
- | [trainee@centos7 linux-3.10.0-327.13.1.el7.x86_64]$ make oldconfig | + | PING www.free.fr (212.27.48.10) 56(84) bytes of data. |
- | scripts/ | + | 64 bytes from www.free.fr (212.27.48.10): icmp_seq=1 ttl=63 time=10.4 ms |
- | # | + | 64 bytes from www.free.fr (212.27.48.10): icmp_seq=2 ttl=63 time=9.44 ms |
- | # configuration written to .config | + | 64 bytes from www.free.fr (212.27.48.10): icmp_seq=3 ttl=63 time=12.1 ms |
- | # | + | ^C |
+ | --- www.free.fr ping statistics --- | ||
+ | 3 packets transmitted, | ||
+ | rtt min/ | ||
</ | </ | ||
<WRAP center round important> | <WRAP center round important> | ||
- | Cette commande lit le fichier .config du noyau actuel et le compare avec celui des sources du noyau. S' | + | **Important** : Notez qu' |
</ | </ | ||
- | ====Paramétrage du noyau==== | + | ====Ajouter une Deuxième Adresse IP à un Profil==== |
- | Après avoir modifié la configuration du noyau selon vos besoins en utilisant soit la commande **menuconfig** soit la commande **xconfig** (pas necéssaire pour cet exemple), insérez la sortie de la commande | + | Pour ajouter une deuxième adresse IP à un profil sous RHEL/CentOS 7, il convient d' |
< | < | ||
- | [trainee@centos7 | + | [root@centos7 |
- | x86_64 | + | |
- | [trainee@centos7 linux-3.10.0-327.13.1.el7.x86_64]$ vi .config | + | |
- | [trainee@centos7 linux-3.10.0-327.13.1.el7.x86_64]$ head .config | + | |
- | # x86_64 | + | |
- | # | + | |
- | # Automatically generated file; DO NOT EDIT. | + | |
- | # Linux/x86 3.10.0 Kernel Configuration | + | |
- | # | + | |
- | CONFIG_64BIT=y | + | |
- | CONFIG_X86_64=y | + | |
- | CONFIG_X86=y | + | |
- | CONFIG_INSTRUCTION_DECODER=y | + | |
- | CONFIG_OUTPUT_FORMAT=" | + | |
</ | </ | ||
- | Renommez le fichier .config | + | Redémarrez la machine virtuelle puis en tant que root saisissez la commande suivante |
< | < | ||
- | [trainee@centos7 | + | [root@centos7 |
- | [trainee@centos7 linux-3.10.0-327.13.1.el7.x86_64]$ ls ~/ | + | connection.id: |
- | centos.cer | + | connection.uuid: |
- | centos-kpatch.x509 | + | connection.interface-name: |
- | centos-ldup.x509 | + | connection.type: 802-3-ethernet |
- | check-kabi | + | connection.autoconnect: |
- | config-x86_64-generic | + | connection.autoconnect-priority: |
- | cpupower.config | + | connection.timestamp: |
+ | connection.read-only: | ||
+ | connection.permissions: | ||
+ | connection.zone: | ||
+ | connection.master: | ||
+ | connection.slave-type: -- | ||
+ | connection.autoconnect-slaves: | ||
+ | connection.secondaries: | ||
+ | connection.gateway-ping-timeout: | ||
+ | connection.metered: | ||
+ | 802-3-ethernet.port: -- | ||
+ | 802-3-ethernet.speed: | ||
+ | 802-3-ethernet.duplex: | ||
+ | 802-3-ethernet.auto-negotiate: | ||
+ | 802-3-ethernet.mac-address: | ||
+ | 802-3-ethernet.cloned-mac-address: | ||
+ | 802-3-ethernet.mac-address-blacklist: | ||
+ | 802-3-ethernet.mtu: | ||
+ | 802-3-ethernet.s390-subchannels: | ||
+ | 802-3-ethernet.s390-nettype: | ||
+ | 802-3-ethernet.s390-options: | ||
+ | 802-3-ethernet.wake-on-lan: | ||
+ | 802-3-ethernet.wake-on-lan-password: | ||
+ | ipv4.method: | ||
+ | ipv4.dns: | ||
+ | ipv4.dns-search: | ||
+ | ipv4.addresses: | ||
+ | ipv4.gateway: | ||
+ | ipv4.routes: | ||
+ | ipv4.route-metric: | ||
+ | ipv4.ignore-auto-routes: | ||
+ | ipv4.ignore-auto-dns: | ||
+ | ipv4.dhcp-client-id: | ||
+ | ipv4.dhcp-send-hostname: | ||
+ | ipv4.dhcp-hostname: | ||
+ | ipv4.never-default: | ||
+ | ipv4.may-fail: yes | ||
+ | ipv6.method: | ||
+ | ipv6.dns: | ||
+ | ipv6.dns-search: | ||
+ | ipv6.addresses: | ||
+ | ipv6.gateway: | ||
+ | ipv6.routes: | ||
+ | ipv6.route-metric: | ||
+ | ipv6.ignore-auto-routes: | ||
+ | ipv6.ignore-auto-dns: | ||
+ | ipv6.never-default: | ||
+ | ipv6.may-fail: | ||
+ | ipv6.ip6-privacy: | ||
+ | ipv6.dhcp-send-hostname: | ||
+ | ipv6.dhcp-hostname: | ||
+ | GENERAL.NAME: | ||
+ | GENERAL.UUID: | ||
+ | GENERAL.DEVICES: | ||
+ | GENERAL.STATE: | ||
+ | GENERAL.DEFAULT: | ||
+ | GENERAL.DEFAULT6: | ||
+ | GENERAL.VPN: | ||
+ | GENERAL.ZONE: | ||
+ | GENERAL.DBUS-PATH: | ||
+ | GENERAL.CON-PATH: | ||
+ | GENERAL.SPEC-OBJECT: | ||
+ | GENERAL.MASTER-PATH: -- | ||
+ | IP4.ADDRESS[1]: | ||
+ | IP4.ADDRESS[2]: | ||
+ | IP4.GATEWAY: | ||
+ | IP4.DNS[1]: | ||
+ | IP6.ADDRESS[1]: | ||
+ | IP6.GATEWAY: | ||
</ | </ | ||
<WRAP center round important> | <WRAP center round important> | ||
- | Pour un noyau 32 bits, remplacez | + | **Important** : Notez l' |
</ | </ | ||
- | Editez la directive **buildid** dans le fichier **~/rpmbuild/SPECS/kernel.spec** : | + | Consultez maintenant |
< | < | ||
- | [trainee@centos7 | + | [root@centos7 |
- | [trainee@centos7 SPECS]$ vi kernel.spec | + | TYPE=Ethernet |
- | [trainee@centos7 SPECS]$ head kernel.spec | + | BOOTPROTO=none |
- | # We have to override the new %%install behavior because, well... the kernel is special. | + | DEFROUTE=yes |
- | %global __spec_install_pre %{___build_pre} | + | IPV4_FAILURE_FATAL=no |
+ | IPV6INIT=yes | ||
+ | IPV6_AUTOCONF=yes | ||
+ | IPV6_DEFROUTE=yes | ||
+ | IPV6_FAILURE_FATAL=no | ||
+ | NAME=ip_fixe | ||
+ | UUID=fb3a11d9-4e03-4032-b26e-09d1195d2bcd | ||
+ | DEVICE=enp0s3 | ||
+ | ONBOOT=yes | ||
+ | DNS1=8.8.8.8 | ||
+ | IPADDR=10.0.2.16 | ||
+ | PREFIX=24 | ||
+ | IPADDR1=192.168.1.2 | ||
+ | PREFIX1=24 | ||
+ | GATEWAY=10.0.2.2 | ||
+ | IPV6_PEERDNS=yes | ||
+ | IPV6_PEERROUTES=yes | ||
+ | </ | ||
- | Summary: The Linux kernel | + | <WRAP center round important> |
+ | **Important** | ||
+ | </ | ||
- | %define buildid .i2tch | + | ====La Commande hostname==== |
- | # For a kernel released for public testing, released_kernel should be 1. | + | La procédure de la modification du hostname est simplifiée et sa prise en compte est immédiate : |
- | # For internal testing builds during development, | + | |
- | %global released_kernel 1 | + | < |
+ | [root@centos7 ~]# nmcli general hostname centos.fenestros.loc | ||
+ | [root@centos7 ~]# cat / | ||
+ | centos.fenestros.loc | ||
+ | [root@centos7 ~]# hostname | ||
+ | centos.fenestros.loc | ||
+ | [root@centos7 ~]# nmcli general hostname centos7.fenestros.loc | ||
+ | [root@centos7 ~]# cat / | ||
+ | centos7.fenestros.loc | ||
+ | [root@centos7 ~]# hostname | ||
+ | centos7.fenestros.loc | ||
</ | </ | ||
- | ====Compiler le Noyau==== | + | ====La Commande ip==== |
- | La compilation du noyau peut prendre beaucoup de temps. La commande | + | Sous RHEL/CentOS 7 la commande |
< | < | ||
- | [trainee@centos7 | + | [root@centos7 |
+ | 1: lo: < | ||
+ | link/ | ||
+ | inet 127.0.0.1/8 scope host lo | ||
+ | | ||
+ | inet6 ::1/128 scope host | ||
+ | | ||
+ | 2: enp0s3: < | ||
+ | link/ether 08: | ||
+ | inet 10.0.2.16/ | ||
+ | | ||
+ | inet 192.168.1.2/ | ||
+ | | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | [root@centos7 ~]# ip addr | ||
+ | 1: lo: < | ||
+ | link/ | ||
+ | inet 127.0.0.1/8 scope host lo | ||
+ | | ||
+ | inet6 ::1/128 scope host | ||
+ | | ||
+ | 2: enp0s3: < | ||
+ | link/ether 08: | ||
+ | inet 10.0.2.16/ | ||
+ | | ||
+ | inet 192.168.1.2/ | ||
+ | | ||
+ | inet6 fe80:: | ||
+ | | ||
</ | </ | ||
- | A l'issu du processus, les rpm se trouvent dans le répertoire **/ | + | ===Options de la Commande ip=== |
+ | |||
+ | Les options de cette commande sont : | ||
< | < | ||
- | ... | + | [root@centos7 ~]# ip --help |
- | Vérification des fichiers non empaquetés : | + | Usage: ip [ OPTIONS ] OBJECT { COMMAND | help } |
- | Écrit : / | + | ip [ -force ] -batch filename |
- | Écrit : / | + | where OBJECT |
- | Écrit : / | + | tunnel | tuntap | maddr | mroute | mrule | monitor | xfrm | |
- | Écrit : / | + | netns | l2tp | tcp_metrics | token } |
- | Écrit : / | + | OPTIONS |
- | Écrit : / | + | -f[amily] { inet | inet6 | ipx | dnet | bridge | link } | |
- | Écrit : / | + | -4 | -6 | -I | -D | -B | -0 | |
- | Écrit : / | + | -l[oops] { maximum-addr-flush-attempts } | |
- | Écrit : / | + | -o[neline] | -t[imestamp] | -b[atch] [filename] | |
- | Écrit : / | + | -rc[vbuf] [size]} |
- | Écrit : / | + | |
- | Écrit : / | + | |
- | Écrit : / | + | |
- | Écrit : / | + | |
- | Écrit : / | + | |
- | Écrit : / | + | |
- | Exécution_de(%clean) : | + | |
- | + umask 022 | + | |
- | + cd / | + | |
- | + cd kernel-3.10.0-327.13.1.el7 | + | |
- | + rm -rf / | + | |
- | + exit 0 | + | |
</ | </ | ||
- | Notez que la génération du nouveau noyau a consommé plus de 9 Go d' | + | ====Activer/ |
+ | |||
+ | Deux commandes existent pour désactiver et activer manuellement une interface réseau | ||
< | < | ||
- | [trainee@centos7 | + | [root@centos7 |
- | Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur | + | [root@centos7 ~]# nmcli device connect enp0s3 |
- | / | + | |
- | devtmpfs | + | |
- | tmpfs 245M | + | |
- | tmpfs 245M 4,7M 240M 2% /run | + | |
- | tmpfs 245M | + | |
- | tmpfs 245M | + | |
- | / | + | |
- | / | + | |
- | tmpfs | + | |
</ | </ | ||
- | ====Installer le Nouveau Noyau==== | + | ====Routage Statique==== |
- | Installez maintenant les deux paquets **kernel-devel** | + | ===La commande ip=== |
+ | |||
+ | Sous RHEL/CentOS 7, pour supprimer la route vers le réseau 192.168.1.0 il convient d' | ||
< | < | ||
- | [root@centos7 ~]# rpm -ivh / | + | [root@centos7 ~]# ip route |
- | Preparing... ################################# | + | default via 10.0.2.2 dev enp0s3 |
- | Updating / installing... | + | 10.0.2.0/24 dev enp0s3 |
- | 1: | + | 192.168.1.0/24 dev enp0s3 |
- | [root@centos7 ~]# rpm -ivh / | + | |
- | Preparing... ################################# | + | [root@centos7 ~]# ip route del 192.168.1.0/24 via 0.0.0.0 |
- | Updating / installing... | + | |
- | 1:kernel-headers-3.10.0-327.13.1.el################################# | + | [root@centos7 ~]# ip route |
+ | default via 10.0.2.2 dev enp0s3 | ||
+ | 10.0.2.0/24 dev enp0s3 | ||
</ | </ | ||
- | Installez en dernier le nouveau noyau avec la commande **rpm** | + | Pour ajouter |
< | < | ||
- | [root@centos7 ~]# rpm -ivh --force --nodeps | + | [root@centos7 ~]# ip route add 192.168.1.0/24 via 10.0.2.2 |
- | Preparing... ################################# | + | |
- | installing package | + | [root@centos7 ~]# ip route |
+ | default via 10.0.2.2 dev enp0s3 | ||
+ | 10.0.2.0/24 dev enp0s3 | ||
+ | 192.168.1.0/24 via 10.0.2.2 dev enp0s3 | ||
</ | </ | ||
<WRAP center round important> | <WRAP center round important> | ||
- | **Important** : Notez le message d' | + | La commande utilisée pour ajouter une passerelle par défaut prend la forme suivante |
</ | </ | ||
- | Lister maintenant les noyaux installés | + | ===Activer/ |
+ | |||
+ | Pour activer le routage sur le serveur, il convient d' | ||
< | < | ||
- | [root@centos7 ~]# rpm -qa | grep kernel-3 | + | [root@centos7 ~]# echo 1 > / |
- | kernel-3.10.0-327.el7.x86_64 | + | [root@centos7 ~]# cat / |
- | kernel-3.10.0-327.13.1.el7.x86_64 | + | 1 |
</ | </ | ||
- | Un noyau se désinstalle comme tout autre paquet | + | Pour désactiver le routage sur le serveur, il convient de désactiver la retransmission des paquets: |
< | < | ||
- | [root@centos7 ~]# yum remove kernel-3.10.0-327.el7.x86_64 | + | [root@centos7 ~]# echo 0 > / |
- | Loaded plugins: fastestmirror, | + | [root@centos7 ~]# cat / |
- | Resolving Dependencies | + | 0 |
- | --> Running transaction check | + | </code> |
- | ---> Package kernel.x86_64 0:3.10.0-327.el7 will be erased | + | |
- | --> Finished Dependency Resolution | + | |
- | Dependencies Resolved | + | =====Diagnostique du Réseau===== |
- | ======================================================================================================================================================================== | + | ====ping==== |
- | | + | |
- | ======================================================================================================================================================================== | + | |
- | Removing: | + | |
- | | + | |
- | Transaction Summary | + | Pour tester l' |
- | ======================================================================================================================================================================== | + | |
- | Remove | + | |
- | Installed size: 136 M | + | < |
- | Is this ok [y/N]: y | + | [root@centos7 ~]# ping 10.0.2.2 |
+ | PING 10.0.2.2 (10.0.2.2) 56(84) bytes of data. | ||
+ | 64 bytes from 10.0.2.2: icmp_seq=1 ttl=63 time=0.602 ms | ||
+ | 64 bytes from 10.0.2.2: icmp_seq=2 ttl=63 time=0.375 ms | ||
+ | 64 bytes from 10.0.2.2: icmp_seq=3 ttl=63 time=0.512 ms | ||
+ | 64 bytes from 10.0.2.2: icmp_seq=4 ttl=63 time=0.547 ms | ||
+ | ^C | ||
+ | --- 10.0.2.2 ping statistics --- | ||
+ | 4 packets transmitted, | ||
+ | rtt min/ | ||
</ | </ | ||
- | Installez le nouveau noyau avec la commande | + | ===Options de la commande |
+ | |||
+ | Les options de cette commande sont : | ||
< | < | ||
- | [root@centos7 ~]# rpm -ivh --force --nodeps / | + | [root@centos7 ~]# ping --help |
- | Preparing... | + | ping: invalid option |
- | Updating / installing... | + | Usage: ping [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface] |
- | 1:kernel-3.10.0-327.13.1.el7.i2tch ################################# | + | [-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 | ||
</ | </ | ||
- | Lister maintenant | + | ====netstat -i==== |
+ | |||
+ | Pour visualiser | ||
< | < | ||
- | [root@centos7 ~]# rpm -qa | grep kernel-3 | + | [root@centos7 ~]# netstat |
- | kernel-3.10.0-327.13.1.el7.i2tch.x86_64 | + | Kernel Interface table |
- | kernel-3.10.0-327.13.1.el7.x86_64 | + | Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg |
+ | enp0s3 | ||
+ | lo | ||
</ | </ | ||
- | Constatez | + | ===Options de la commande netstat=== |
+ | |||
+ | Les options de cette commande sont : | ||
< | < | ||
- | [root@centos7 ~]# grep i2tch / | + | [root@centos7 ~]# netstat --help |
- | menuentry ' | + | usage: netstat [-vWeenNcCF] [< |
- | linux16 | + | |
- | initrd16 /initramfs-3.10.0-327.13.1.el7.i2tch.x86_64.img | + | |
+ | |||
+ | -r, --route | ||
+ | -I, --interfaces=< | ||
+ | -i, --interfaces | ||
+ | -g, --groups | ||
+ | -s, --statistics | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | -N, --symbolic | ||
+ | -e, --extend | ||
+ | | ||
+ | | ||
+ | -c, --continuous | ||
+ | |||
+ | -l, --listening | ||
+ | -a, --all display all sockets (default: connected) | ||
+ | -F, --fib display Forwarding Information Base (default) | ||
+ | -C, --cache | ||
+ | -Z, --context | ||
+ | |||
+ | < | ||
+ | | ||
+ | < | ||
+ | List of possible address families (which support routing): | ||
+ | inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) | ||
+ | netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) | ||
+ | x25 (CCITT X.25) | ||
</ | </ | ||
+ | |||
+ | ====La commande traceroute==== | ||
+ | |||
+ | La commande ping est à la base de la commande **traceroute**. Cette commande sert à découvrir la route empruntée pour accéder à un site donné : | ||
+ | |||
+ | < | ||
+ | [root@centos7 ~]# traceroute www.i2tch.eu | ||
+ | traceroute to www.i2tch.eu (217.160.122.33), | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 10 * * * | ||
+ | 11 * * * | ||
+ | 12 * * * | ||
+ | 13 * * * | ||
+ | 14 * * * | ||
+ | 15 * * * | ||
+ | 16 * * * | ||
+ | 17 * * * | ||
+ | 18 * * * | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | ===Options de la commande traceroute=== | ||
+ | |||
+ | Les options de cette commande sont : | ||
+ | |||
+ | < | ||
+ | [root@centos7 ~]# traceroute --help | ||
+ | Usage: | ||
+ | traceroute [ -46dFITnreAUDV ] [ -f first_ttl ] [ -g gate,... ] [ -i device ] [ -m max_ttl ] [ -N squeries ] [ -p port ] [ -t tos ] [ -l flow_label ] [ -w waittime ] [ -q nqueries ] [ -s src_addr ] [ -z sendwait ] [ --fwmark=num ] host [ packetlen ] | ||
+ | Options: | ||
+ | -4 Use IPv4 | ||
+ | -6 Use IPv6 | ||
+ | -d --debug | ||
+ | -F --dont-fragment | ||
+ | -f first_ttl | ||
+ | Start from the first_ttl hop (instead from 1) | ||
+ | -g gate, | ||
+ | Route packets through the specified gateway | ||
+ | (maximum 8 for IPv4 and 127 for IPv6) | ||
+ | -I --icmp | ||
+ | -T --tcp Use TCP SYN for tracerouting (default port is 80) | ||
+ | -i device | ||
+ | Specify a network interface to operate with | ||
+ | -m max_ttl | ||
+ | Set the max number of hops (max TTL to be | ||
+ | reached). Default is 30 | ||
+ | -N squeries | ||
+ | Set the number of probes to be tried | ||
+ | simultaneously (default is 16) | ||
+ | -n Do not resolve IP addresses to their domain names | ||
+ | -p port --port=port | ||
+ | initial udp port value for " | ||
+ | (incremented by each probe, default is 33434), or | ||
+ | initial seq for " | ||
+ | default from 1), or some constant destination | ||
+ | port for other methods (with default of 80 for | ||
+ | " | ||
+ | -t tos --tos=tos | ||
+ | traffic class) value for outgoing packets | ||
+ | -l flow_label | ||
+ | Use specified flow_label for IPv6 packets | ||
+ | -w waittime | ||
+ | Set the number of seconds to wait for response to | ||
+ | a probe (default is 5.0). Non-integer (float | ||
+ | point) values allowed too | ||
+ | -q nqueries | ||
+ | Set the number of probes per each hop. Default is | ||
+ | 3 | ||
+ | -r Bypass the normal routing and send directly to a | ||
+ | host on an attached network | ||
+ | -s src_addr | ||
+ | Use source src_addr for outgoing packets | ||
+ | -z sendwait | ||
+ | Minimal time interval between probes (default 0). | ||
+ | If the value is more than 10, then it specifies a | ||
+ | number in milliseconds, | ||
+ | seconds (float point values allowed too) | ||
+ | -e --extensions | ||
+ | -A --as-path-lookups | ||
+ | print results directly after the corresponding | ||
+ | addresses | ||
+ | -M name --module=name | ||
+ | for traceroute operations. Most methods have | ||
+ | their shortcuts (`-I' means `-M icmp' etc.) | ||
+ | -O OPTS, | ||
+ | Use module-specific option OPTS for the | ||
+ | traceroute module. Several OPTS allowed, | ||
+ | separated by comma. If OPTS is " | ||
+ | about available options | ||
+ | --sport=num | ||
+ | `-N 1' | ||
+ | --fwmark=num | ||
+ | -U --udp Use UDP to particular port for tracerouting | ||
+ | (instead of increasing the port per each probe), | ||
+ | default port is 53 | ||
+ | -UL Use UDPLITE for tracerouting (default dest port | ||
+ | is 53) | ||
+ | -D --dccp | ||
+ | is 33434) | ||
+ | -P prot --protocol=prot | ||
+ | --mtu | ||
+ | `-F -N 1' | ||
+ | --back | ||
+ | print if it differs | ||
+ | -V --version | ||
+ | --help | ||
+ | |||
+ | Arguments: | ||
+ | + | ||
+ | packetlen | ||
+ | header plus 40). Can be ignored or increased to a minimal | ||
+ | allowed value | ||
+ | </ | ||
+ | |||
+ | =====Connexions à Distance===== | ||
+ | |||
+ | ==== Telnet ==== | ||
<WRAP center round important> | <WRAP center round important> | ||
- | **Important** : Re-démarrez votre VM en utilisant | + | La commande |
</ | </ | ||
- | Vérifiez ensuite l'utilisation du nouveau noyau : | + | La commande **telnet** est utilisée pour établir une connexion à distance avec un serveur telnet : |
+ | |||
+ | < | ||
+ | # telnet numero_ip | ||
+ | </ | ||
+ | |||
+ | <WRAP center round 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 de cette commande sont : | ||
< | < | ||
- | [root@centos7 ~]# uname -r | + | [root@centos7 ~]# telnet --help |
- | 3.10.0-327.13.1.el7.i2tch.x86_64 | + | telnet: invalid option -- ' |
+ | Usage: telnet [-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user] | ||
+ | [-n tracefile] [-b hostalias ] [-r] | ||
+ | [host-name [port]] | ||
</ | </ | ||
- | =====Gestion des Quotas===== | + | ==== wget ==== |
- | 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, | + | La commande **wget** |
- | quotas par partition. L' | + | |
- | Déconnectez-vous et reconnectez-vous en tant que root. | + | < |
+ | [root@centos7 ~]# wget https:// | ||
+ | --2017-06-22 16: | ||
+ | Resolving www.dropbox.com (www.dropbox.com)... 162.125.65.1 | ||
+ | Connecting to www.dropbox.com (www.dropbox.com)|162.125.65.1|: | ||
+ | HTTP request sent, awaiting response... 302 Found | ||
+ | Location: https:// | ||
+ | --2017-06-22 16: | ||
+ | Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 162.125.65.6 | ||
+ | Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|162.125.65.6|: | ||
+ | HTTP request sent, awaiting response... 200 OK | ||
+ | Length: 17 [text/ | ||
+ | Saving to: ‘fichier_test? | ||
- | Avant de mettre en place des quotas, configurer SELINUX en mode **permissive** afin de ne pas avoir d' | + | 100%[====================================================================================> |
- | < | + | 2017-06-22 16:53:41 (480 KB/s) - ‘fichier_test? |
- | [root@centos7 ~]# getenforce | + | |
- | Enforcing | + | |
- | [root@centos7 ~]# setenforce permissive | + | |
- | [root@centos7 ~]# getenforce | + | |
- | Permissive | + | |
</ | </ | ||
- | Editez ensuite le fichier / | + | ===Options de la commande wget=== |
+ | |||
+ | Les options de cette commande sont : | ||
< | < | ||
- | [root@centos7 ~]# vi / | + | [root@centos7 ~]# wget --help |
- | [root@centos7 ~]# cat / | + | GNU Wget 1.14, a non-interactive network retriever. |
+ | Usage: wget [OPTION]... | ||
- | # This file controls | + | Mandatory arguments to long options are mandatory for short options too. |
- | # SELINUX= can take one of these three values: | + | |
- | # | + | Startup: |
- | # | + | -V, --version |
- | # | + | -h, --help |
- | SELINUX=permissive | + | -b, --background |
- | # SELINUXTYPE= can take one of three two values: | + | -e, --execute=COMMAND |
- | # | + | |
- | # | + | Logging and input file: |
- | # | + | -o, --output-file=FILE |
- | SELINUXTYPE=targeted | + | -a, --append-output=FILE |
+ | -d, --debug | ||
+ | -q, --quiet | ||
+ | -v, --verbose | ||
+ | -nv, --no-verbose | ||
+ | | ||
+ | -i, --input-file=FILE | ||
+ | -F, --force-html | ||
+ | -B, --base=URL | ||
+ | | ||
+ | | ||
+ | |||
+ | Download: | ||
+ | -t, --tries=NUMBER | ||
+ | | ||
+ | -O, --output-document=FILE | ||
+ | -nc, --no-clobber | ||
+ | | ||
+ | -c, --continue | ||
+ | | ||
+ | -N, --timestamping | ||
+ | | ||
+ | --no-use-server-timestamps | ||
+ | the one on the server. | ||
+ | | ||
+ | | ||
+ | -T, --timeout=SECONDS | ||
+ | | ||
+ | | ||
+ | | ||
+ | -w, --wait=SECONDS | ||
+ | | ||
+ | | ||
+ | | ||
+ | -Q, --quota=NUMBER | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | -4, --inet4-only | ||
+ | -6, --inet6-only | ||
+ | | ||
+ | one of IPv6, IPv4, or none. | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Directories: | ||
+ | -nd, --no-directories | ||
+ | -x, --force-directories | ||
+ | -nH, --no-host-directories | ||
+ | | ||
+ | | ||
+ | --cut-dirs=NUMBER | ||
+ | |||
+ | HTTP options: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | this is `index.html' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | -U, --user-agent=AGENT | ||
+ | --no-http-keep-alive | ||
+ | | ||
+ | | ||
+ | --save-cookies=FILE | ||
+ | --keep-session-cookies | ||
+ | | ||
+ | --post-file=FILE use the POST method; send contents | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | HTTPS (SSL/TLS) options: | ||
+ | --secure-protocol=PR | ||
+ | SSLv3, and TLSv1. | ||
+ | --no-check-certificate | ||
+ | | ||
+ | | ||
+ | --private-key=FILE | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | FTP options: | ||
+ | | ||
+ | | ||
+ | --no-remove-listing | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | WARC options: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | --warc-dedup=FILENAME | ||
+ | --no-warc-compression | ||
+ | --no-warc-digests | ||
+ | | ||
+ | | ||
+ | WARC writer. | ||
+ | |||
+ | Recursive download: | ||
+ | -r, --recursive | ||
+ | -l, --level=NUMBER | ||
+ | | ||
+ | -k, --convert-links | ||
+ | local files. | ||
+ | --backups=N | ||
+ | -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 | ||
+ | --trust-server-names | ||
+ | url last component. | ||
+ | -X, --exclude-directories=LIST | ||
+ | -np, --no-parent | ||
+ | |||
+ | Mail bug reports and suggestions to < | ||
</ | </ | ||
- | Commencez | + | ==== ftp ==== |
+ | |||
+ | <WRAP center round important> | ||
+ | La commande **ftp** n'est pas installée | ||
+ | </ | ||
+ | |||
+ | La commande **ftp** est utilisée pour le transfert de fichiers: | ||
< | < | ||
- | [root@centos7 ~]# rpm -qa | grep quota | + | [root@centos7 ~]# ftp ftp2.fenestros.com |
- | quota-4.01-11.el7_2.1.x86_64 | + | Connected to ftp2.fenestros.com (213.186.33.14). |
- | quota-nls-4.01-11.el7_2.1.noarch | + | 220 anonymous.ftp.ovh.net NcFTPd Server (licensed copy) ready. |
+ | Name (ftp2.fenestros.com: | ||
+ | 331 Guest login ok, send your complete e-mail address as password. | ||
+ | Password: | ||
+ | 230 Logged in anonymously. | ||
+ | Remote system type is UNIX. | ||
+ | Using binary mode to transfer files. | ||
+ | ftp> | ||
</ | </ | ||
- | Editez le fichier | + | Une fois connecté, il convient d' |
< | < | ||
- | [root@centos7 ~]# vi /etc/fstab | + | ftp> help |
- | [root@centos7 ~]# cat /etc/fstab | + | Commands may be abbreviated. |
- | # | + | ! debug mdir sendport site |
- | # /etc/fstab | + | $ dir mget put size |
- | # Created by anaconda on Sat Apr 30 11:27:02 2016 | + | account disconnect mkdir pwd status |
- | # | + | append exit mls quit struct |
- | # Accessible filesystems, | + | ascii form mode quote system |
- | # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info | + | bell get modtime recv sunique |
- | # | + | binary glob mput reget tenex |
- | UUID=e65fe7da-cda8-4f5a-a827-1b5cabe94bed / | + | bye hash newer rstatus tick |
- | UUID=2d947276-66e8-41f4-8475-b64b67d7a249 /boot | + | case help nmap rhelp trace |
- | UUID=3181601a-7295-4ef0-a92c-f21f76b18e64 swap swap defaults | + | cd idle nlist rename type |
- | UUID=a080ac6a-d15c-48e2-8461-a7b1aa3ebf1a / | + | cdup image ntrans reset user |
+ | chmod lcd open restart umask | ||
+ | close ls prompt rmdir verbose | ||
+ | cr macdef passive runique ? | ||
+ | delete mdelete proxy send | ||
+ | ftp> | ||
</ | </ | ||
- | Démontez puis remontez /home : | + | Le caractère **!** permet d' |
< | < | ||
- | [root@centos7 ~]# umount | + | ftp> !pwd |
- | [root@centos7 ~]# mount -a | + | /root |
</ | </ | ||
- | Déconnectez-vous et reconnectez-vous en tant que trainee. Vérifiez ensuite que les options soient prises en compte | + | 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 du serveur, il convient d' | ||
+ | |||
+ | < | ||
+ | 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 | ||
+ | </ | ||
+ | |||
+ | Pour fermer la session, il convient d' | ||
< | < | ||
- | [root@centos7 ~]# cat /etc/mtab | + | ftp> quit |
- | rootfs / rootfs rw 0 0 | + | [root@centos7 ~]# |
- | sysfs /sys sysfs rw, | + | |
- | proc /proc proc rw, | + | |
- | devtmpfs /dev devtmpfs rw, | + | |
- | securityfs / | + | |
- | tmpfs /dev/shm tmpfs rw, | + | |
- | devpts /dev/pts devpts rw, | + | |
- | tmpfs /run tmpfs rw, | + | |
- | tmpfs / | + | |
- | cgroup / | + | |
- | pstore / | + | |
- | cgroup / | + | |
- | cgroup / | + | |
- | cgroup / | + | |
- | cgroup / | + | |
- | cgroup / | + | |
- | cgroup / | + | |
- | cgroup / | + | |
- | cgroup / | + | |
- | cgroup / | + | |
- | configfs / | + | |
- | /dev/sda2 / xfs rw, | + | |
- | selinuxfs / | + | |
- | systemd-1 / | + | |
- | debugfs / | + | |
- | hugetlbfs / | + | |
- | tmpfs /tmp tmpfs rw,seclabel 0 0 | + | |
- | mqueue /dev/mqueue mqueue rw, | + | |
- | sunrpc / | + | |
- | nfsd / | + | |
- | /dev/sda1 /boot xfs rw, | + | |
- | tmpfs /run/user/0 tmpfs rw, | + | |
- | /dev/sdb1 /home ext4 rw, | + | |
</ | </ | ||
- | ====La | + | ====SSH==== |
+ | |||
+ | ===Introduction=== | ||
+ | |||
+ | La commande **[[wpfr> | ||
+ | |||
+ | * Le **serveur SSH** | ||
+ | * le démon sshd, qui s' | ||
+ | * 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. | ||
+ | |||
+ | SSH fonctionne de la manière suivante pour la la mise en place d'un canal sécurisé: | ||
+ | |||
+ | * Le client contacte le serveur sur son port 22, | ||
+ | * Les client et le serveur échangent leur version de SSH. En cas de non-compatibilité de versions, l'un des deux met fin au processus, | ||
+ | * Le serveur SSH s' | ||
+ | * Sa clé hôte, | ||
+ | * Sa clé serveur, | ||
+ | * Une séquence aléatoire de huit octets à inclure dans les futures réponses du client, | ||
+ | * Une liste de méthodes de chiffrage, compression et authentification, | ||
+ | * Le client et le serveur produisent un identifiant identique, un haché MD5 long de 128 bits contenant 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é. | ||
+ | |||
+ | ==SSH-1== | ||
+ | |||
+ | SSH-1 utilise une paire de clefs de type RSA1. Il assure l' | ||
+ | |||
+ | Afin de s' | ||
+ | |||
+ | * **Kerberos**, | ||
+ | * **Rhosts**, | ||
+ | * **%%RhostsRSA%%**, | ||
+ | * Par **clef asymétrique**, | ||
+ | * **TIS**, | ||
+ | * Par **mot de passe**. | ||
+ | |||
+ | ==SSH-2== | ||
+ | |||
+ | SSH-2 utilise **DSA** ou **RSA**. Il assure l' | ||
+ | |||
+ | * **SSH-TRANS** – Transport Layer Protocol, | ||
+ | * **SSH-AUTH** – Authentification Protocol, | ||
+ | * **SSH-CONN** – Connection Protocol. | ||
+ | |||
+ | SSH-2 diffère de SSH-1 essentiellement dans la phase authentification. | ||
+ | |||
+ | Trois méthodes d' | ||
+ | |||
+ | * Par **clef asymétrique**, | ||
+ | * Identique à SSH-1 sauf avec l' | ||
+ | * **%%RhostsRSA%%**, | ||
+ | * Par **mot de passe**. | ||
+ | |||
+ | ==Options de la commande== | ||
- | Pour activer les quotas sur /home, il convient d' | + | Les options de cette commande |
< | < | ||
- | [root@centos7 | + | [root@centos6 |
- | 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. | + | usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] |
- | quotacheck: Parcours de / | + | [-D [bind_address:]port] |
- | quotacheck: Cannot stat old user quota file / | + | [-i identity_file] [-L [bind_address:]port:host:hostport] |
- | quotacheck: Cannot stat old group quota file / | + | [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] |
- | quotacheck: Cannot stat old user quota file / | + | [-R [bind_address:]port:host:hostport] [-S ctl_path] |
- | quotacheck: Cannot stat old group quota file / | + | [-w local_tun[:remote_tun]] [user@]hostname [command] |
- | quotacheck: Vérifié 100 répertoires et 230 fichiers | + | |
- | quotacheck: Ancien fichier non trouvé. | + | |
- | quotacheck: Ancien fichier non trouvé. | + | |
</ | </ | ||
- | Les options | + | ===L' |
- | < | + | L' |
- | [root@centos7 ~]# quotacheck --help | + | |
- | Utility for checking and repairing quota files. | + | |
- | quotacheck [-gucbfinvdmMR] [-F < | + | |
- | -u, --user | + | Avantage: |
- | -g, --group | + | * Aucune configuration de clef asymétrique |
- | -c, --create-files | + | |
- | -b, --backup | + | |
- | -f, --force | + | |
- | -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 | + | |
- | Rapports de bugs à jack@suse.cz | + | Inconvénients: |
- | </ | + | * L' |
+ | * Moins sécurisé qu'un système par clef asymétrique. | ||
- | Les quotas ont été activés et les fichier **aquota.user** et **aquota.group** ont été créés dans le répertoire | + | ===L' |
+ | |||
+ | * Le **client** envoie au serveur une requête d' | ||
+ | * Le **serveur** recherche une correspondance pour ce module dans le fichier | ||
+ | * Dans le cas où une correspondance n'est pas trouvée, le serveur met fin à la communication, | ||
+ | * Dans le cas contraire le serveur génère une chaîne aléatoire de 256 bits appelée un **challenge** et la chiffre avec la **clé publique du client**, | ||
+ | * Le **client** reçoit le challenge et le décrypte avec la partie privée de sa clé. Il combine le challenge avec l' | ||
+ | | ||
+ | |||
+ | ===Installation=== | ||
+ | |||
+ | Pour installer/mettre à jour le serveur **sshd**, utilisez **yum** | ||
< | < | ||
- | [root@centos7 ~]# ls -la /home | + | [root@centos7 ~]# yum install openssh-server |
- | total 44 | + | Loaded plugins: fastestmirror, |
- | drwxr-xr-x. | + | Loading mirror speeds from cached hostfile |
- | dr-xr-xr-x. 18 root root 4096 11 août 13:27 .. | + | * base: centos.mirror.fr.planethoster.net |
- | -rw-------. 1 root root 7168 11 août 13:39 aquota.group | + | * extras: ftp.ciril.fr |
- | -rw-------. 1 root root 7168 11 août 13:39 aquota.user | + | * updates: centos.mirrors.ovh.net |
- | drwx------. 2 root root 16384 11 août 13:26 lost+found | + | Package openssh-server-6.6.1p1-25.el7_2.x86_64 already installed and latest version |
- | drwx------. 14 trainee trainee | + | Nothing to do |
</ | </ | ||
- | Créez maintenant un utilisateur | + | <WRAP center round important> |
+ | **Important** - Pour les stations de travail, installez | ||
+ | </ | ||
+ | |||
+ | ==Options | ||
+ | |||
+ | Les options de la commande sont : | ||
+ | |||
+ | < | ||
+ | SYNOPSIS | ||
+ | sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-f config_file] [-g login_grace_time] [-h host_key_file] [-k key_gen_time] [-o option] [-p port] [-u len] | ||
+ | </ | ||
+ | |||
+ | ===Configuration=== | ||
+ | |||
+ | <WRAP center round important> | ||
+ | **Important** - La configuration doit s' | ||
+ | </ | ||
+ | |||
+ | ==Serveur== | ||
+ | |||
+ | La configuration du serveur s' | ||
< | < | ||
- | [root@centos7 ~]# groupadd fenestros && useradd fenestros -c FenestrOs -d /home/fenestros -g fenestros -s /bin/bash | + | [root@centos7 ~]# cat /etc/ssh/sshd_config |
- | [root@centos7 ~]# passwd fenestros | + | # $OpenBSD: sshd_config, |
- | Changement de mot de passe pour l' | + | |
- | Nouveau mot de passe : fenestros | + | |
- | MOT DE PASSE INCORRECT | + | |
- | Retapez le nouveau mot de passe : fenestros | + | |
- | passwd : mise à jour réussie de tous les jetons d' | + | |
- | [root@centos7 ~]# | + | |
- | </ | + | |
- | ====La Commande edquota==== | + | # This is the sshd server system-wide configuration file. See |
+ | # sshd_config(5) for more information. | ||
- | Mettez en place maintenant un quota de 10Mo pour l'utilisateur **fenestros** | + | # This sshd was compiled with PATH=/ |
+ | |||
+ | # The strategy used for options in the default sshd_config shipped with | ||
+ | # OpenSSH is to specify options with their default value where | ||
+ | # possible, but leave them commented. | ||
+ | # default value. | ||
+ | |||
+ | # If you want to change the port on a SELinux system, you have to tell | ||
+ | # SELinux about this change. | ||
+ | # semanage port -a -t ssh_port_t -p tcp # | ||
+ | # | ||
+ | #Port 22 | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # The default requires explicit activation of protocol 1 | ||
+ | #Protocol 2 | ||
+ | |||
+ | # HostKey for protocol version 1 | ||
+ | #HostKey / | ||
+ | # HostKeys for protocol version 2 | ||
+ | HostKey / | ||
+ | #HostKey / | ||
+ | HostKey / | ||
+ | HostKey / | ||
+ | |||
+ | # Lifetime and size of ephemeral version 1 server key | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # Ciphers and keying | ||
+ | #RekeyLimit default none | ||
+ | |||
+ | # Logging | ||
+ | # obsoletes QuietMode and FascistLogging | ||
+ | # | ||
+ | SyslogFacility AUTHPRIV | ||
+ | #LogLevel INFO | ||
+ | |||
+ | # Authentication: | ||
+ | |||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # | ||
+ | # | ||
+ | |||
+ | # The default is to check both .ssh/ | ||
+ | # but this is overridden so installations will only check .ssh/ | ||
+ | AuthorizedKeysFile .ssh/ | ||
+ | |||
+ | # | ||
+ | |||
+ | # | ||
+ | # | ||
+ | |||
+ | # For this to work you will also need host keys in / | ||
+ | # | ||
+ | # similar for protocol version 2 | ||
+ | # | ||
+ | # Change to yes if you don't trust ~/ | ||
+ | # RhostsRSAAuthentication and HostbasedAuthentication | ||
+ | # | ||
+ | # Don't read the user's ~/.rhosts and ~/.shosts files | ||
+ | # | ||
+ | |||
+ | # To disable tunneled clear text passwords, change to no here! | ||
+ | # | ||
+ | # | ||
+ | PasswordAuthentication yes | ||
+ | |||
+ | # Change to no to disable s/key passwords | ||
+ | # | ||
+ | ChallengeResponseAuthentication no | ||
+ | |||
+ | # Kerberos options | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # GSSAPI options | ||
+ | GSSAPIAuthentication yes | ||
+ | GSSAPICleanupCredentials no | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # Set this to ' | ||
+ | # and session processing. If this is enabled, PAM authentication will | ||
+ | # be allowed through the ChallengeResponseAuthentication and | ||
+ | # PasswordAuthentication. | ||
+ | # PAM authentication via ChallengeResponseAuthentication may bypass | ||
+ | # the setting of " | ||
+ | # If you just want the PAM account and session checks to run without | ||
+ | # PAM authentication, | ||
+ | # and ChallengeResponseAuthentication to ' | ||
+ | # WARNING: ' | ||
+ | # problems. | ||
+ | UsePAM yes | ||
+ | |||
+ | # | ||
+ | # | ||
+ | # | ||
+ | X11Forwarding yes | ||
+ | # | ||
+ | # | ||
+ | #PermitTTY yes | ||
+ | #PrintMotd yes | ||
+ | # | ||
+ | # | ||
+ | #UseLogin no | ||
+ | UsePrivilegeSeparation sandbox # Default for new installations. | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | #UseDNS yes | ||
+ | #PidFile / | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # no default banner path | ||
+ | #Banner none | ||
+ | |||
+ | # Accept locale-related environment variables | ||
+ | AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES | ||
+ | AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT | ||
+ | AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE | ||
+ | AcceptEnv XMODIFIERS | ||
+ | |||
+ | # override default of no subsystems | ||
+ | Subsystem sftp / | ||
+ | |||
+ | # Example of overriding settings on a per-user basis | ||
+ | #Match User anoncvs | ||
+ | # | ||
+ | # | ||
+ | # PermitTTY no | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | Pour ôter les lignes de commentaires dans ce fichier, utilisez la commande suivante | ||
< | < | ||
- | [root@centos | + | [root@centos7 |
+ | [root@centos7 tmp]# cat sshd_config | ||
+ | HostKey / | ||
+ | HostKey / | ||
+ | HostKey / | ||
+ | SyslogFacility AUTHPRIV | ||
+ | AuthorizedKeysFile .ssh/ | ||
+ | PasswordAuthentication yes | ||
+ | ChallengeResponseAuthentication no | ||
+ | GSSAPIAuthentication yes | ||
+ | GSSAPICleanupCredentials no | ||
+ | UsePAM yes | ||
+ | X11Forwarding yes | ||
+ | UsePrivilegeSeparation sandbox # Default for new installations. | ||
+ | AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES | ||
+ | AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT | ||
+ | AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE | ||
+ | AcceptEnv XMODIFIERS | ||
+ | Subsystem sftp / | ||
</ | </ | ||
- | L' | + | Pour sécuriser le serveur ssh, ajoutez ou modifiez les directives suivantes |
< | < | ||
- | Quotas disque pour user fenestros (uid 1001) : | + | AllowGroups adm |
- | Système de fichiers | + | Banner |
- | | + | HostbasedAuthentication no |
+ | IgnoreRhosts yes | ||
+ | LoginGraceTime 60 | ||
+ | LogLevel INFO | ||
+ | PermitEmptyPasswords no | ||
+ | PermitRootLogin no | ||
+ | PrintLastLog yes | ||
+ | Protocol 2 | ||
+ | StrictModes yes | ||
+ | X11Forwarding no | ||
</ | </ | ||
- | Modifiez ce fichier | + | Votre fichier |
< | < | ||
- | Quotas disque pour user fenestros (uid 1001) : | + | AllowGroups adm |
- | Système de fichiers | + | Banner / |
- | /dev/sdb1 | + | HostbasedAuthentication no |
+ | IgnoreRhosts yes | ||
+ | LoginGraceTime 60 | ||
+ | LogLevel INFO | ||
+ | PermitEmptyPasswords no | ||
+ | PermitRootLogin no | ||
+ | PrintLastLog yes | ||
+ | Protocol 2 | ||
+ | StrictModes yes | ||
+ | X11Forwarding no | ||
+ | HostKey / | ||
+ | HostKey / | ||
+ | HostKey / | ||
+ | SyslogFacility AUTHPRIV | ||
+ | AuthorizedKeysFile .ssh/ | ||
+ | PasswordAuthentication yes | ||
+ | ChallengeResponseAuthentication no | ||
+ | GSSAPIAuthentication yes | ||
+ | GSSAPICleanupCredentials no | ||
+ | UsePAM yes | ||
+ | UsePrivilegeSeparation sandbox # Default for new installations. | ||
+ | AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES | ||
+ | AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT | ||
+ | AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE | ||
+ | AcceptEnv XMODIFIERS | ||
+ | Subsystem sftp / | ||
</ | </ | ||
- | Les options | + | <WRAP center round todo> |
+ | **A Faire** - Renommez le fichier **/ | ||
+ | </ | ||
- | < | + | Pour générer les clefs sur le serveur saisissez la commande suivante en tant que **root**: |
- | [root@centos7 ~]# edquota --help | + | |
- | edquota: Usage: | + | |
- | edquota [-rm] [-u] [-F formatname] [-p username] [-f filesystem] username ... | + | |
- | edquota [-rm] -g [-F formatname] [-p groupname] [-f filesystem] groupname ... | + | |
- | edquota [-u|g] [-F formatname] [-f filesystem] -t | + | |
- | edquota [-u|g] [-F formatname] [-f filesystem] -T username|groupname ... | + | |
- | -u, --user | + | Lors de la génération des clefs, la passphrase doit être **vide**. |
- | -g, --group | + | |
- | -r, --remote | + | |
- | -m, --no-mixed-pathnames | + | |
- | -F, --format=formatname | + | |
- | -p, --prototype=name | + | |
- | --always-resolve | + | |
- | composed only of digits | + | |
- | -f, --filesystem=filesystem | + | |
- | -t, --edit-period | + | |
- | -T, --edit-times | + | |
- | -h, --help | + | |
- | -V, --version | + | |
- | Rapports de bugs à : jack@suse.cz | + | < |
+ | [root@centos7 ~]# ssh-keygen -t dsa | ||
+ | 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: | ||
+ | d5: | ||
+ | The key's randomart image is: | ||
+ | +--[ DSA 1024]----+ | ||
+ | | +oBB.| | ||
+ | | o *.o*| | ||
+ | | . o +.o| | ||
+ | | | ||
+ | | S .=..| | ||
+ | | .o.| | ||
+ | | o| | ||
+ | | E| | ||
+ | | | | ||
+ | +-----------------+ | ||
</ | </ | ||
<WRAP center round important> | <WRAP center round important> | ||
- | Pour mettre en place un quota par group, la procédure | + | Le chemin à indiquer pour le fichier |
</ | </ | ||
- | ====La Commande quotaon==== | + | Les clefs publiques générées possèdent l' |
- | + | ||
- | Appliquez maintenant les quotas | + | |
< | < | ||
- | [root@centos7 ~]# quotaon -a | + | [root@centos7 ~]# ls /etc/ssh |
+ | moduli | ||
+ | ssh_config | ||
</ | </ | ||
- | Les options de la commande **quotaon** sont : | + | Re-démarrez ensuite le service sshd : |
< | < | ||
- | [root@centos7 ~]# quotaon --help | + | [root@centos7 ~]# systemctl restart sshd.service |
- | quotaon: Usage: | + | |
- | quotaon [-guvp] [-F quotaformat] [-x state] -a | + | |
- | quotaon [-guvp] [-F quotaformat] [-x state] filesys | + | |
- | + | ||
- | -a, --all turn quotas on for all filesystems | + | |
- | -f, --off turn quotas off | + | |
- | -u, --user | + | |
- | -g, --group | + | |
- | -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 de 8 000 Ko et un quota **stricte** de 10 000 Ko. | + | Saisissez maintenant les commandes suivantes |
- | Quand l' | + | <WRAP center round important> |
+ | Lors de la génération des clefs, la passphrase doit être **vide**. | ||
+ | </ | ||
- | Il est à noter que vous pouvez soit mettre en place un quota en taille, soit mettre en place un quota basé sur le nombre d'inodes utilisés par l'utilisateur. | + | < |
+ | [trainee@centos7 ~]$ ssh-keygen -t dsa | ||
+ | Generating public/ | ||
+ | Enter file in which to save the key (/ | ||
+ | Created directory | ||
+ | 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: | ||
+ | 97: | ||
+ | The key's randomart image is: | ||
+ | +--[ DSA 1024]----+ | ||
+ | | .. ..=| | ||
+ | | | ||
+ | | ... | ||
+ | | o.. ..E.| | ||
+ | | S.o..oo .| | ||
+ | | .oo o.+. | | ||
+ | | . . =. | | ||
+ | | . | | ||
+ | | | | ||
+ | +-----------------+ | ||
+ | [trainee@centos7 ~]$ 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: | ||
+ | 80: | ||
+ | The key's randomart image is: | ||
+ | +--[ RSA 2048]----+ | ||
+ | | +o=o.. | ||
+ | | * Xo+o. | | ||
+ | | . B.Bo. | | ||
+ | | | ||
+ | | o.S | | ||
+ | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | +-----------------+ | ||
+ | [trainee@centos7 ~]$ ssh-keygen -t ecdsa | ||
+ | Generating public/ | ||
+ | Enter file in which to save the key (/ | ||
+ | Enter passphrase (empty for no passphrase): | ||
+ | Enter same passphrase again: | ||
+ | Your identification has been saved in / | ||
+ | Your public key has been saved in / | ||
+ | The key fingerprint is: | ||
+ | 41: | ||
+ | The key's randomart image is: | ||
+ | +--[ECDSA | ||
+ | | ..... .. o+ | | ||
+ | | ... . .. o . | | ||
+ | |. .. . = .| | ||
+ | | o E . = . | | ||
+ | | . | ||
+ | | . | ||
+ | | o . o . | | ||
+ | | . o . . | | ||
+ | | ..... . | | ||
+ | +-----------------+ | ||
+ | [trainee@centos7 ~]$ ssh-keygen -t ed25519 | ||
+ | Generating public/ | ||
+ | Enter file in which to save the key (/ | ||
+ | Enter passphrase (empty for no passphrase): | ||
+ | Enter same passphrase again: | ||
+ | Your identification has been saved in / | ||
+ | Your public key has been saved in / | ||
+ | The key fingerprint is: | ||
+ | 66: | ||
+ | The key's randomart image is: | ||
+ | +--[ED25519 | ||
+ | | . . +..oo. | ||
+ | | o +..o. . | | ||
+ | | | ||
+ | | . . o . . | | ||
+ | | . . S + E | | ||
+ | | o = o + | | ||
+ | | . + | ||
+ | | | ||
+ | | | | ||
+ | +-----------------+ | ||
+ | </ | ||
<WRAP center round important> | <WRAP center round important> | ||
- | La commande pour désactivez les quotas est **quotaoff**. | + | Les clés générées seront placées dans le répertoire |
</ | </ | ||
- | ====La Commande repquota==== | + | ==Utilisation== |
- | Pour visualiser les quotas utilisez | + | La commande ssh prend la forme suivante: |
+ | |||
+ | ssh -l nom_de_compte numero_ip (nom_de_machine) | ||
+ | |||
+ | En saisissant cette commande | ||
< | < | ||
- | [root@centos7 ~]# repquota /home | + | [trainee@centos7 ~]$ su - |
- | *** Rapport pour les quotas user sur le périphérique /dev/sdb1 | + | Mot de passe : |
- | Période | + | Dernière connexion |
- | Block limits | + | |
- | Utilisateur | + | [root@centos7 ~]# ssh -l trainee localhost |
- | ---------------------------------------------------------------------- | + | The authenticity of host ' |
- | root -- 20 0 | + | ECDSA key fingerprint is 19: |
- | trainee | + | Are you sure you want to continue connecting (yes/no)? yes |
- | | + | Warning: Permanently added ' |
+ | trainee@localhost' | ||
+ | Last login: Mon May 9 23:25:15 2016 from localhost.localdomain | ||
</ | </ | ||
- | <WRAP center round important> | + | ===Tunnels SSH=== |
- | Notez que l' | + | |
- | </ | + | |
- | Les options de la commande **repquota** sont : | + | 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 |
- | [root@centos7 ~]# repquota --help | + | |
- | repquota: Utility for reporting quotas. | + | |
- | Usage: | + | |
- | repquota [-vugsi] [-c|C] [-t|n] [-F quotaformat] (-a | mntpoint) | + | |
- | -v, --verbose | + | ssh -N -f compte@hôte |
- | -u, --user | + | |
- | -g, --group | + | |
- | -s, --human-readable | + | |
- | -t, --truncate-names | + | |
- | -p, --raw-grace | + | |
- | -n, --no-names | + | |
- | -i, --no-autofs | + | |
- | -c, --cache | + | |
- | -C, --no-cache | + | |
- | -F, --format=formatname | + | |
- | -a, --all | + | |
- | -h, --help | + | |
- | -V, --version | + | |
- | Rapports de bugs à jack@suse.cz | + | Dans votre cas, vous allez créer un tunnel dans votre propre vm entre le port 15023 et le port 23 : |
+ | |||
+ | < | ||
+ | [root@centos7 ~]# ssh -N -f trainee@localhost -L15023: | ||
+ | trainee@localhost' | ||
</ | </ | ||
- | ====La Commande quota==== | + | Installez maintenant le client et le serveur telnet : |
+ | |||
+ | < | ||
+ | [root@centos7 ~]# yum install telnet telnet-server | ||
+ | </ | ||
- | Pour visualiser les quotas d'un utilisateur spécifique, | + | Telnet n'est ni démarré ni activé. Il convient |
< | < | ||
- | [root@centos7 ~]# quota fenestros | + | [root@centos7 ~]# systemctl status telnet.socket |
- | Disk quotas for user fenestros | + | ● telnet.socket - Telnet Server Activation Socket |
- | [root@centos7 ~]# su - fenestros | + | |
- | [fenestros@centos7 ~]$ touch test | + | |
- | [fenestros@centos7 ~]$ exit | + | Docs: man: |
- | logout | + | |
- | [root@centos7 ~]# quota fenestros | + | |
- | Disk quotas for user fenestros | + | |
- | Système fichiers | + | [root@centos7 ~]# systemctl start telnet.socket |
- | / | + | |
+ | [root@centos7 ~]# systemctl status telnet.socket | ||
+ | ● telnet.socket - Telnet Server Activation Socket | ||
+ | | ||
+ | | ||
+ | Docs: man: | ||
+ | | ||
+ | | ||
+ | |||
+ | May 09 23:40:13 centos7.fenestros.loc systemd[1]: Listening on Telnet Server Activation Socket. | ||
+ | May 09 23:40:13 centos7.fenestros.loc systemd[1]: Starting Telnet Server Activation Socket. | ||
+ | |||
+ | [root@centos7 ~]# systemctl enable telnet.socket | ||
+ | Created symlink from / | ||
+ | [root@centos7 ~]# systemctl status telnet.socket | ||
+ | ● telnet.socket - Telnet Server Activation Socket | ||
+ | | ||
+ | Active: active (listening) since Mon 2016-05-09 23:40:13 CEST; 36s ago | ||
+ | Docs: man: | ||
+ | Listen: [::]:23 (Stream) | ||
+ | | ||
+ | |||
+ | May 09 23:40:13 centos7.fenestros.loc systemd[1]: Listening on Telnet Server Activation Socket. | ||
+ | May 09 23:40:13 centos7.fenestros.loc systemd[1]: Starting Telnet Server Activation Socket. | ||
</ | </ | ||
- | Les options de la commande **quota** sont : | + | Connectez-vous ensuite via telnet sur le port 15023, vous constaterez que votre connexion n' |
< | < | ||
- | [root@centos7 ~]# quota --help | + | [root@centos7 ~]# telnet localhost 15023 |
- | quota: Usage: quota [-guqvswim] [-l | [-Q | -A]] [-F quotaformat] | + | Trying 127.0.0.1... |
- | quota [-qvswim] [-l | [-Q | -A]] [-F quotaformat] -u username | + | Connected to localhost. |
- | quota [-qvswim] [-l | [-Q | -A]] [-F quotaformat] -g groupname | + | Escape character is '^]'. |
- | quota [-qvswugQm] [-F quotaformat] -f filesystem ... | + | |
- | -u, --user | + | Kernel 3.10.0-327.13.1.el7.x86_64 on an x86_64 |
- | -g, --group | + | centos7 login: trainee |
- | -q, --quiet | + | Password: |
- | -v, --verbose | + | Last login: Mon May 9 23: |
- | -s, --human-readable | + | [trainee@centos7 ~]$ |
- | | + | |
- | composed of only digits | + | |
- | -w, --no-wrap | + | |
- | -p, --raw-grace | + | |
- | -l, --local-only | + | |
- | -Q, --quiet-refuse | + | |
- | not respond | + | |
- | -i, --no-autofs | + | |
- | -F, --format=formatname | + | |
- | -f, --filesystem-list | + | |
- | -A, --all-nfs | + | |
- | -m, --no-mixed-pathnames | + | |
- | | + | |
- | --hide-device | + | |
- | -h, --help | + | |
- | -V, --version | + | |
- | Rapports de bugs à : jack@suse.cz | ||
</ | </ | ||
- | ====La Commande warnquota==== | + | <WRAP center round important> |
+ | Notez bien que votre communication telnet passe par le tunnel SSH. | ||
+ | </ | ||
- | La commande **warnquota** vérifie le ou les disques et envoie un message par mail à tout utilisateur qui a dépassé la limite soft. Elle est enrègle générale appelée par un job cron. Cependant elle peut aussi est appelée d'une manière intéractive. | + | ====SCP==== |
- | Sous RHEL/CentOS 7, warnquota n'est pas installé par défaut | + | ===Introduction=== |
+ | |||
+ | La commande **scp** | ||
+ | |||
+ | $ scp compte@numero_ip(nom_de_machine):/ | ||
+ | |||
+ | ou vers une machine distante : | ||
+ | |||
+ | $ scp / | ||
+ | |||
+ | ===Utilisation=== | ||
+ | |||
+ | Nous allons maintenant utiliser **scp** pour chercher un fichier sur le << | ||
+ | |||
+ | Créez le fichier **/ | ||
< | < | ||
- | [root@centos7 ~]# yum install quota-warnquota | + | [trainee@centos7 ~]$ pwd |
- | Modules complémentaires chargés : fastestmirror, | + | / |
- | base | 3.6 kB 00: | + | [trainee@centos7 ~]$ touch scp_test |
- | extras | + | </code> |
- | updates | + | |
- | Loading mirror speeds from cached hostfile | + | |
- | * base: centos.quelquesmots.fr | + | |
- | * extras: miroir.univ-paris13.fr | + | |
- | * updates: miroir.univ-paris13.fr | + | |
- | Résolution des dépendances | + | |
- | --> Lancement de la transaction de test | + | |
- | ---> Le paquet quota-warnquota.x86_64 1: | + | |
- | --> Résolution des dépendances terminée | + | |
- | Dépendances résolues | + | Récupérez le fichier **scp_test** en utilisant scp : |
- | ======================================================================================================================================================================== | + | < |
- | Package | + | [trainee@centos7 ~]$ touch / |
- | ======================================================================================================================================================================== | + | [trainee@centos7 ~]$ scp trainee@127.0.0.1:/ |
- | Installation | + | The authenticity of host ' |
- | quota-warnquota | + | ECDSA key fingerprint is 19:cd: |
+ | Are you sure you want to continue connecting (yes/no)? yes | ||
+ | Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts. | ||
+ | trainee@127.0.0.1' | ||
+ | scp_test | ||
+ | [trainee@centos7 ~]$ ls / | ||
+ | / | ||
+ | </ | ||
- | Résumé de la transaction | + | ==Mise en place des clefs== |
- | ======================================================================================================================================================================== | + | |
- | Installation | + | |
- | Taille totale des téléchargements | + | Il convient maintenant de se connecter sur le << |
- | Taille d'installation | + | |
- | Is this ok [y/d/N]: y | + | En saisissant cette commande, vous obtiendrez une fenêtre similaire à celle-ci : |
+ | |||
+ | < | ||
+ | [trainee@centos7 ~]$ ssh -l trainee 127.0.0.1 | ||
+ | trainee@127.0.0.1's password: | ||
+ | Last login: Mon May 9 23:42:46 2016 from localhost.localdomain | ||
+ | [trainee@centos7 ~]$ ls -la | grep .ssh | ||
+ | drwx------. | ||
+ | [trainee@centos7 ~]$ exit | ||
+ | logout | ||
+ | Connection to 127.0.0.1 closed. | ||
</ | </ | ||
- | Les options | + | <WRAP center round important> |
+ | Si le dossier distant .ssh n' | ||
+ | </ | ||
+ | |||
+ | Ensuite, il convient de transférer le fichier local **.ssh/ | ||
< | < | ||
- | [root@centos7 ~]# warnquota --help | + | [trainee@centos7 ~]$ scp .ssh/ |
- | warnquota: Usage: | + | trainee@127.0.0.1's password: trainee |
- | | + | id_ecdsa.pub |
+ | </ | ||
- | -u, --user | + | Connectez-vous via telnet et insérer les clefs publiques restantes dans le fichier .ssh/ |
- | -g, --group | + | |
- | -s, --human-readable | + | |
- | -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 | + | |
- | Rapports de bugs à jack@suse.cz | + | < |
+ | root@centos7 ~]# ssh -l trainee localhost | ||
+ | trainee@localhost' | ||
+ | Last login: Tue May 10 01:39:33 2016 from localhost.localdomain | ||
+ | [trainee@centos7 ~]$ cat .ssh/ | ||
+ | [trainee@centos7 ~]$ cat .ssh/ | ||
+ | [trainee@centos7 ~]$ cat .ssh/ | ||
+ | [trainee@centos7 ~]$ cat .ssh/ | ||
+ | ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBG5BtOMFLrUbxD// | ||
+ | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9KOuEH5+kyihhm99Na8UTA4Gi5AfiOVeJyS3UzH7ta73ewmv7JZqaXzar1NlHcpEMkCUs2yKxHyO/ | ||
+ | ssh-dss AAAAB3NzaC1kc3MAAACBAK9/ | ||
+ | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIENas3A3hmXFj1cb+lrn2NAt6g95Pla6qUFQHd1wg2y1 trainee@centos7.fenestros.loc | ||
+ | ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBG5BtOMFLrUbxD// | ||
</ | </ | ||
+ | |||
+ | Lors de la connexion suivante au serveur, l' | ||
+ | |||
+ | < | ||
+ | [trainee@centos7 ~]$ ssh -l trainee localhost | ||
+ | Last login: Tue May 10 01:50:39 2016 from localhost.localdomain | ||
+ | [trainee@centos7 ~]$ exit | ||
+ | déconnexion | ||
+ | Connection to localhost closed. | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important> | ||
+ | Le fichier **authorized_keys** doit avoir les permissions de 600. | ||
+ | </ | ||
----- | ----- | ||
- | < | + | |
- | <div align=" | + | Copyright © 2023 Hugh Norris. |
- | Copyright © 2020 Hugh Norris. | + | |
- | </ | + |