Quellcode durchsuchen

Installation de serveur Proxmox: travail en cours 1: installation terminée

lauhub vor 10 Monaten
Ursprung
Commit
b0da58be46

+ 2 - 0
gnu-linux/partitionnement/raid5-luks-lvm-configuration.md

@@ -113,12 +113,14 @@ sudo mkfs.ext4 /dev/md1
 5. Installer le système de démarrage (voir kimsufi.md)
 
 ### Étape 1 : Créer le RAID 5
+
 ```bash
 sudo mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sd[b-d]
 ```
 - Laissez le RAID se synchroniser après la création.
 
 ### Étape 2 : Ajouter le chiffrement LUKS
+
 1. Initialiser le chiffrement LUKS sur le RAID :
    ```bash
    sudo cryptsetup luksFormat /dev/md0

+ 252 - 0
gnu-linux/serveurs/installation/ecaz-history-installation.md

@@ -0,0 +1,252 @@
+% Historique installation ECAZ
+
+
+### history
+
+```
+# history | cut -c8-
+apt install ifupdown
+cat << EOF > /etc/network/interfaces
+auto lo
+iface lo inet loopback
+auto eth0
+allow-hotplug eth0
+iface eth0 inet dhcp
+EOF
+cat << EOF > /etc/resolv.conf
+nameserver 1.1.1.1
+nameserver 1.0.0.1
+EOF
+_hostname=ecaz
+_domain=aezi.fr
+echo "$_hostname" > /etc/hostname
+echo "127.0.1.1 $_hostname.$_domain $_hostname" >> /etc/hosts
+echo "Europe/Paris" > /etc/timezone
+dpkg-reconfigure -f noninteractive tzdata
+reset
+cat << EOF > /etc/apt/sources.list
+deb http://deb.debian.org/debian bookworm main contrib non-free-firmware
+# deb-src http://deb.debian.org/debian bookworm main contrib non-free-firmware
+deb http://deb.debian.org/debian bookworm-updates main contrib non-free-firmware
+# deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free-firmware
+# deb http://deb.debian.org/debian bookworm-backports main contrib non-free-firmware
+# deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free-firmware
+deb http://security.debian.org/debian-security bookworm-security main contrib non-free-firmware
+# deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free-firmware
+EOF
+cat << EOF > /etc/apt/apt.conf.d/999aptsettings
+APT::Install-Recommends "0";
+APT::Install-Suggests "0";
+EOF
+apt update && apt install -y busybox console-setup cryptsetup dropbear grub-pc initramfs-tools kbd linux-image-amd64 linux-perf locales ssh dropbear-initramfs cryptsetup-initramfs
+mkdir /root/.ssh && chmod 600 /root/.ssh
+mkdir /etc/dropbear-initramfs/ && chmod 600 /etc/dropbear-initramfs/
+echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEyzZAymNeWxeDjSUzkyEJLzwGqZt+VvdmidomWL0QLb lauhub@Mac-15-Laurent.local" >> /root/.ssh/authorized_keys
+echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEyzZAymNeWxeDjSUzkyEJLzwGqZt+VvdmidomWL0QLb lauhub@Mac-15-Laurent.local" >> /etc/dropbear-initramfs/authorized_keys
+mkdir -p /root/.ssh && chmod 600 /root/.ssh
+mkdir -p /etc/dropbear-initramfs/ && chmod 600 /etc/dropbear-initramfs/
+echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEyzZAymNeWxeDjSUzkyEJLzwGqZt+VvdmidomWL0QLb lauhub@Mac-15-Laurent.local" >> /root/.ssh/authorized_keys
+echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEyzZAymNeWxeDjSUzkyEJLzwGqZt+VvdmidomWL0QLb lauhub@Mac-15-Laurent.local" >> /etc/dropbear-initramfs/authorized_keys
+sed -i.old s/GRUB_CMDLINE_LINUX=\"\"/GRUB_CMDLINE_LINUX=\"net.ifnames=0\ biosdevname=0\ ip=:::::eth0:dhcp\"/g /etc/default/grub
+less /etc/default/grup
+less /etc/default/grub
+nano /etc/dropbear-initramfs/config
+nano /etc/dropbear-initramfs/config
+ll /dev/mapper
+alias ll='ls -l'
+ll /dev/mapper
+nano /etc/initramfs-tools/initramfs.conf
+cp /etc/initramfs-tools/initramfs.conf /etc/initramfs-tools/initramfs.conf.original
+nano /etc/initramfs-tools/initramfs.conf
+nano /etc/dropbear-initramfs/config
+nano /etc/dropbear-initramfs/config
+cat /etc/dropbear-initramfs/authorized_keys
+cat /root/.ssh/authorized_keys 
+nano /etc/dropbear-initramfs/authorized_keys
+nano /root/.ssh/authorized_keys 
+cat /etc/crypttab
+nano /etc/crypttab
+update-grub && update-initramfs -u -k all
+cat /etc/dropbear-initramfs/authorized_keys
+nano /etc/dropbear-initramfs/authorized_keys
+less /etc/default/grub
+nano /etc/default/grub
+blkid
+nano /etc/default/grub
+update-grub && update-initramfs -u -k all
+/usr/sbin/grub-probe
+/usr/sbin/grub-probe --help
+ll /boot/grub/device.map
+/usr/sbin/grub-probe -v -t cryptodisk_uuid
+/usr/sbin/grub-probe -v -t cryptodisk_uuid /Dev/md1
+/usr/sbin/grub-probe -v -t cryptodisk_uuid /dev/md1
+/usr/sbin/grub-probe -v /dev/md1
+nano /etc/default/locale 
+update-locale
+update-locale --help
+update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
+nano /etc/default/locale 
+update-locale 
+nano /etc/default/locale 
+ssh-keyscan localhost 2> /dev/null | ssh-keygen -l -f -
+locale-gen
+update-locale 
+dpkg-reconfigure locales
+less /etc/default/locale 
+update-locale
+update-grub && update-initramfs -u -k all
+blkid
+ll /dev/vg_raid
+ll /dev/vg_raid/lv_root
+blkid lv_root
+blkid | grep lv_root
+nano /etc/fstab
+mount | grep boot
+blkid | grep md1
+nano /etc/fstab
+update-grub && update-initramfs -u -k all
+ll /dev/md1
+dpkg-reconfigure mdadm
+apt install mdadm
+update-grub && update-initramfs -u -k all
+cat /etc/mdadm/mdadm.conf
+ll -d /etc/dropbear-initramfs/
+ll /etc/dropbear-initramfs/
+dpkg-reconfigure dropbear
+dpkg-reconfigure dropbear-initramfs
+cat /etc/crypttab 
+blkid | grep 5e99eca6
+apt install busyox dropbear*
+apt install busybox dropbear dropbear-initramfs
+cat /etc/dropbear/initramfs/dropbear.conf 
+mkdir -p /etc/dropbear/initramfs/ && chmod 600 /etc/dropbear/initramfs/
+echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEyzZAymNeWxeDjSUzkyEJLzwGqZt+VvdmidomWL0QLb lauhub@Mac-15-Laurent.local" >> /etc/dropbear/initramfs/authorized_keys
+less /etc/dropbear/initramfs/config
+less /etc/dropbear/initramfs/dropbear.conf 
+cat /etc/dropbear-initramfs/config
+rm /etc/dropbear-initramfs/config
+nano /etc/dropbear/initramfs/dropbear.conf 
+update-grub && update-initramfs -u -k all
+cat /etc/crypttab 
+blkid | grep 5e99eca6
+cat /etc/mdadm/mdadm.conf
+blkid | grep ba46c22d
+lsblk
+lsblk -o name,uuid,mountpoint
+lsblk
+lsblk -o name,uuid,mountpoint
+blkid
+lsblk -o name,uuid,mountpoint /dev/md1
+lsblk -o name,uuid,mountpoint /dev/md0
+lsblk  /dev/md0
+blkid | grep md0
+cat /etc/crypttab 
+blkid | grep raid_crypt
+apt install cryptsetup-initramfs
+dpkg-reconfigure cryptsetup-initramfs
+sudo blkid
+blkid
+sudo echo bonjour
+blkid | grep raid
+cat /etc/crypttab 
+blkid | grep 5e99eca6-5db2-4f4b-bea8-6c6dff404406
+dmsetup targets
+apt install cryptsetup
+ll /dev/mapper
+ll /dev/dm-3
+cat /etc/crypttab 
+ll /cryptroot/crypttab
+update-initramfs -u -k all
+lsblk -fs
+man crypttab
+mdadm --detail --scan
+cat /etc/crypttab 
+cat /etc/mdadm/mdadm.conf 
+cp /etc/mdadm/mdadm.conf /etc/mdadm/mdadm.conf.autogenerated
+mdadm --detail --scan >>  /etc/mdadm/mdadm.conf
+nano /etc/mdadm/mdadm.conf 
+update-initramfs -v -u -k all
+update-initramfs -u -k all
+apt install mdadm
+apt search mdadm
+less /etc/crypttab
+nano /etc/crypttab
+update-initramfs -u -k all
+adduser lauhub
+adduser lauhub sudo
+ll /home/lauhub/
+mkdir /home/lauhub/.ssh/
+touch /home/lauhub/.ssh/authorized_keys ; chmod 600 /home/lauhub/.ssh/authorized_keys
+echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEyzZAymNeWxeDjSUzkyEJLzwGqZt+VvdmidomWL0QLb lauhub@Mac-15-Laurent.local" >> /home/lauhub/.ssh/authorized_keys
+chmod 600 /home/lauhub/.ssh/authorized_keys
+cat /home/lauhub/.ssh/authorized_keys 
+ll /home/lauhub/.ssh/authorized_keys 
+nano /etc/default/grub
+update-grub 
+update-initramfs -u -k all
+apt install zstd
+update-initramfs -u -k all
+exit
+alias ll='ls -l'
+less /etc/default/grub.d/init-select.cfg 
+less /etc/default/grub
+less /etc/default/grub
+less /etc/initramfs-tools/initramfs.conf
+less /etc/initramfs-tools/initramfs.conf
+nano /etc/initramfs-tools/initramfs.conf
+less /etc/dropbear/initramfs/dropbear.conf
+apt install dropbear-initramfs
+man 8 dropbera
+man 8 dropbear
+ll /etc/dropbear-initramfs/
+rm /etc/dropbear-initramfs/authorized_keys 
+rmdir /etc/dropbear-initramfs/
+echo 'IP="${ip_address}::${gateway_ip}:${netmask}:${optional_fqdn}:${interface_name}:none"'
+ll /etc/initramfs-tools/conf.d/ip
+apt install manpages
+man 8 dropbear
+apt install man 
+man 8 dropbear
+man 5 initramfs.conf
+man initramfs-tools
+nano /etc/default/grub
+man initramfs-tools
+man 8 dropbear
+nano /etc/dropbear/initramfs/dropbear.conf 
+update-initramfs -u -k all
+nano /etc/dropbear/initramfs/dropbear.conf 
+cat /etc/dropbear/initramfs/dropbear.conf 
+nano /etc/default/grub
+man grub
+man grub2
+ip a
+sudo nano /etc/network/interfaces
+nano /etc/network/interfaces
+man interfaces
+nano /etc/default/grub
+update-grub 
+apt install lvm2
+update-grub 
+ll /etc/grub.d
+less /etc/grub.d/40_custom 
+less /boot/grub/grub.cfg 
+man mdadm
+mdadm --detail --scan
+mdadm --examine /dev/sd1
+mdadm --examine /dev/sda1
+less /boot/grub/grub.cfg 
+for identifier in {a..c} ; do grub-install /dev/sd${identifier} ; done
+ls /sys/firmware/efi
+find /sys/firmware/ -name '*efi*'
+apt install efibootmgr
+efibootdump
+efibootdump /dev/sda
+efibootmgr
+cat /etc/default/grub
+cat /etc/dropbear/initramfs/dropbear.conf 
+cat /etc/crypttab 
+cat /etc/fstab 
+cat /etc/mdadm/mdadm.conf 
+history | cut -c8-
+```
+

Datei-Diff unterdrückt, da er zu groß ist
+ 1205 - 0
gnu-linux/serveurs/installation/ecaz-serveur-proxmox.md


+ 296 - 0
gnu-linux/serveurs/installation/installation-proxmox.md

@@ -0,0 +1,296 @@
+% Installation de proxmox
+
+[Install Proxmox VE on Debian 12 Bookworm - Proxmox VE](https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_12_Bookworm)
+
+# Configuration
+
+Proxmox requiert une configuration réseau avec IP statique
+
+## Récupération des adresses fournies par le DHCP
+
+On récupère les informations données par le DHCP avec les commandes `ip a` (équivalente à `ip addr show`) et `ip r` (équivalente à `ip route show`)
+
+```bash
+$ ip a
+1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
+    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
+    inet 127.0.0.1/8 scope host lo
+       valid_lft forever preferred_lft forever
+    inet6 ::1/128 scope host noprefixroute 
+       valid_lft forever preferred_lft forever
+2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
+    link/ether 4c:72:b9:20:ac:9e brd ff:ff:ff:ff:ff:ff
+    altname eno1
+    altname enp0s25
+    inet 188.165.235.71/24 brd 188.165.235.255 scope global dynamic eth0
+       valid_lft 63054sec preferred_lft 63054sec
+    inet6 fe80::4e72:b9ff:fe20:ac9e/64 scope link 
+       valid_lft forever preferred_lft forever
+```
+
+La sortie précédente nous indique:
+
+- l'IP: `188.165.235.71`
+- le nom de l'interface: `eth0`
+- les alias (`altname`): `eno1` et `enp0s25`
+- l'adresse de broadcast : `188.165.235.255`
+- la longueur du masque de sous-réseau: `/24`
+
+```bash
+$ ip r
+default via 188.165.235.254 dev eth0 
+188.165.235.0/24 dev eth0 proto kernel scope link src 188.165.235.71 
+```
+
+La sortie précédente nous indique:
+
+- la passerelle (gateway) : `188.165.235.254`
+- l'identifiant du sous-réseau: `188.165.235.0`
+
+### DNS
+
+Le DNS est donné par `cat /etc/resolv.conf`:
+
+```
+nameserver 213.186.33.99
+```
+
+### Sauvegarde du fichier `/etc/network/interfaces`
+
+```bash
+sudo cp /etc/network/interfaces /etc/network/interfaces.restore
+```
+
+### Création du fichier `/etc/network/interfaces`
+
+```
+iface eth0 inet static
+    address 188.165.235.71
+    alias eno1 enp0s25
+    gateway 188.165.235.254
+    network 188.165.235.0
+    netmask 255.255.255.0
+    broadcast 188.165.235.255
+    dns-nameservers 213.186.33.99 208.67.222.123
+
+```
+
+### Vérification du fichier `/etc/network/interfaces`
+
+
+sudo ifup --no-act eth0
+
+
+## Restauration automatique du réseau
+
+### OVH
+
+En cas de problème avec le fichier `/etc/network/interfaces`, on perdra la connexion réseau. Une possibilité est de redémarrer le serveur en mode Rescue, mais avec un temps d'attente qui peut être assez long.
+
+Pour éviter tout problème, on va plutôt installer un script dans le crontab de root. Ce script redémarrera la machine au bout de 5 minutes en cas de problème réseau, avec les anciens paramètres.
+
+```bash
+$ sudo su - 
+root@server:~# mkdir bin
+root@server:~# nano bin/restore_network
+```
+
+Y placer le code suivant:
+
+```bash
+#!/bin/bash
+
+# Vérifier si la machine peut accéder à Internet
+check_network() {
+    ping -c 1 8.8.8.8 >/dev/null 2>&1
+    return $?
+}
+
+# Chemins des fichiers
+INTERFACES_FILE="/etc/network/interfaces"
+RESTORE_FILE="/etc/network/interfaces.restore"
+
+# Fonction principale
+main() {
+    if check_network; then
+        echo "Le réseau est fonctionnel. Aucune action nécessaire."
+    else
+        echo "Le réseau n'est pas fonctionnel. Restauration du fichier interfaces..."
+        if [ -f "$RESTORE_FILE" ]; then
+            cp "$RESTORE_FILE" "$INTERFACES_FILE"
+            echo "Fichier restauré avec succès."
+            
+            echo "Redémarrage des interfaces réseau..."
+            ifdown -a && ifup -a
+            echo "Les interfaces réseau ont été redémarrées."
+        else
+            echo "Le fichier $RESTORE_FILE n'existe pas. Impossible de restaurer."
+            exit 1
+        fi
+    fi
+}
+
+# Appel de la fonction principale
+main
+```
+
+
+```bash
+chmod +x bin/restore_network
+```
+
+
+### Redémarrage des interfaces réseau
+
+```
+sudo ifdown eth0 ; sudo ifup eth0
+```
+
+## Nom de la machine
+
+Il faut ajouter une ligne au fichier `/etc/hosts` et qui correspond au nom de la machine.
+
+```
+188.165.235.71 ecaz.aezi.fr ecaz
+```
+
+On vérifie qu'au moins une adresse (hors boucle locale) est affichée par la commande suivante:
+
+```bash
+hostname --ip-address
+```
+
+Exemple:
+
+```
+127.0.1.1 188.165.235.71
+```
+
+# Installation de proxmox
+
+## Préparation du gestionnaire de paquets APT
+
+```bash
+echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bookworm pve-no-subscription" | sudo tee /etc/apt/sources.list.d/pve-install-repo.list
+```
+
+### Ajout des clés de vérification
+
+```bash
+sudo wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg 
+```
+
+Vérification
+
+```bash
+sha512sum /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg > downloaded.txt ; echo "7da6fe34168adc6e479327ba517796d4702fa2f8b4f0a9833f5ea6e6b48f6507a6da403a274fe201595edc86a84463d50383d07f64bdde2e3658108db7d6dc87  /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg" > expected.txt ; diff downloaded.txt expected.txt && echo OK || echo KO ; rm downloaded.txt expected.txt
+```
+
+Devrait afficher `OK`
+
+
+### Mise à jour
+
+```bash
+sudo apt update && sudo apt full-upgrade
+```
+
+### Installation de `proxmox`
+
+```bash
+sudo apt install proxmox-default-kernel
+```
+
+Redémarrer
+
+```bash
+sudo shutdown -r now
+```
+
+Installation des paquets complémentaires:
+
+```bash
+sudo apt install proxmox-ve postfix open-iscsi chrony
+```
+
+#### Configuration de `postfix`
+
+- `Internet site`
+- `ecaz.aezi.fr`
+
+#### Post-installation de `proxmox`
+
+Suppression du noyau Debian:
+
+```bash
+sudo apt remove linux-image-amd64 'linux-image-6.1*'
+sudo update-grub
+```
+
+Suppression du paquet `os-prober`:
+
+```bash
+sudo apt remove os-prober
+```
+
+## Autorisation des tunnels SSH
+
+Pour permettre le tunnelling, on édite le fichier `/etc/ssh/sshd_config` et on positionne à `yes` les options suivantes:
+
+```conf
+GatewayPorts yes
+PermitTunnel yes
+```
+
+Redémarrer le service `ssh`:
+
+```bash
+sudo systemctl restart ssh
+```
+
+## Ouverture d'un tunnel pour accéder à l'interface *proxmox*
+
+La commande la plus simple pour créer un tunnel redirigeant le port local 8006 vers le port distant du serveur *proxmox* n°8006 est:
+
+```bash
+ssh -L 8006:localhost:8006 ecaz
+```
+
+Cependant, ceci ouvre une session Shell.
+
+Pour ouvrir le tunnel sans ouvrir une session dans le terminal on va plutôt utiliser:
+
+```bash
+ssh -f -N -T -L 8006:localhost:8006 ecaz
+```
+
+
+# Finalisation de l'installation de *proxmox*
+
+## Connexion à l'interface
+
+Après avoir ouver le tunnel, se connecter avec son navigateur à l'adresse suivante: [https://localhost:8006](https://localhost:8006)
+
+Accepter les risques de sécurité (tout passe par le tunnel SSH, donc les communications sont chiffrées entre votre poste de travail et le serveur)
+
+:::warning
+
+Si vous êtes sur un ordinateur public, n'acceptez pas les risques et utilisez un ordinateur personnel.
+
+:::
+
+Se connecter avec l'utilisateur `root` (GNU/Linux) du serveur. S'il n'a pas de mot de passe, il faut lui en créer un.
+
+## Suppression de la notification de non-souscription
+
+```bash
+sudo echo "Ensure sudo password is entered"
+sudo su - <<EOF
+cp /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js.original
+sed -Ezi.bak "s/(function\(orig_cmd\) \{)/\1\n\torig_cmd\(\);\n\treturn;/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service
+EOF
+```
+
+Source: [Remove Proxmox Subscription Notice (Tested to 8.2) | McLaren Data Systems](https://mclarendatasystems.com/remove-proxmox51-subscription-notice/)
+
+

+ 9 - 4
gnu-linux/serveurs/installation/kimsufi.md

@@ -172,7 +172,7 @@ chroot /mnt /bin/bash
 ### Installation de `ifupdown`
 
 ```
-sudo apt install ifupdown
+apt install ifupdown
 ```
 
 Configuration des interfaces réseau:
@@ -188,8 +188,8 @@ iface eth0 inet dhcp
 EOF
 
 cat << EOF > /etc/resolv.conf
-nameserver 8.8.8.8
-nameserver 8.8.4.4
+nameserver 1.1.1.1
+nameserver 1.0.0.1
 EOF
 
 
@@ -320,7 +320,11 @@ Et ajouter
 DROPBEAR=y
 ```
 
-Modification du UUID de grub:
+
+:::information
+
+PAS SUR QUE NÉCESSAIRE:
+Modification du UUID de grub dans /etc/default/grub:
 
 ```bash
 GRUB_DEVICE_UUID=b0c29427-58a9-4249-ac28-65b5ca5ff454
@@ -332,6 +336,7 @@ GRUB_DEVICE_UUID=b0c29427-58a9-4249-ac28-65b5ca5ff454
 #GRUB_DISABLE_LINUX_UUID=true
 ```
 
+:::
 
 
 ```bash

+ 79 - 0
gnu-linux/serveurs/installation/post-installation-serveur.md

@@ -0,0 +1,79 @@
+% Post installation du serveur
+
+# Configuration
+
+## Point de montage pour les données
+
+```bash
+sudo mkdir -p /data
+sudo nano /etc/fstab
+```
+
+Ajouter la troisième ligne pour /data
+
+```conf
+UUID=b890c459-64f5-4db7-b526-3e677be8cdb9 / ext4 defaults,relatime 0 1
+UUID=7e4d9e7d-971a-4aaf-a9fc-f365033348ed /boot ext4 defaults,relatime 0 2
+UUID=17216080-dc43-4d4a-9925-6547e6cd8021 /data ext4 defaults,relatime 0 2
+```
+
+Exécuter `mount -a`
+
+```bash
+sudo systemctl daemon-reload
+sudo mount -a
+```
+
+## Fuseau horaire
+
+```
+sudo dpkg-reconfigure tzdata
+```
+
+# Sécurisation
+
+## SSH
+
+`/etc/ssh/sshd_config`
+
+```
+PermitRootLogin prohibit-password
+PasswordAuthentication no
+PermitEmptyPasswords no
+```
+
+## Firewall
+
+Installation et configuration
+
+```bash
+sudo apt install ufw
+sudo ufw allow ssh
+sudo ufw allow http
+sudo ufw allow https
+sudo ufw enable
+```
+
+
+
+## fail2ban
+
+Installation de `fail2ban`
+
+```bash
+sudo apt install fail2ban
+```
+
+Configuration
+
+```bash
+sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
+sudo nano /etc/fail2ban/jail.local
+```
+
+
+
+```bash
+sudo systemctl restart fail2ban
+```
+

+ 0 - 0
gnu-linux/serveurs/proxmox/configuration-ovh.md