diff --git a/reveal/sysadmin.html b/reveal/sysadmin.html index 18d7378..3d423bf 100644 --- a/reveal/sysadmin.html +++ b/reveal/sysadmin.html @@ -110,6 +110,7 @@ $ crontab -l

ntpd

+ Démon de protocole de temps réseau.
@@ -148,6 +149,7 @@ $ timedatectl
 

systemd

+ Gestionnaire système et service

systemd est un gestionnaire de services

@@ -205,13 +207,13 @@ $ timedatectl

Postfix

+ Agent de transport de courriers électroniques
-

Installation

+

Installation et configuration


 # apt install postfix
     
-

Configuration

  • process : /etc/postfix/master.cf
  • options : /etc/postfix/main.cf
  • @@ -320,6 +322,7 @@ local7.* -/var/log/dhcp.log
+

Exemple de configuration

     
 # vim /etc/logrotate.d/dpkg
@@ -345,6 +348,7 @@ local7.*    -/var/log/dhcp.log
     alertes par mail si certains termes apparaissent dans ce fichier.

+

Installation, configuration et gestion

     
 # apt install log2mail
@@ -369,6 +373,7 @@ template = /etc/log2mail/mail
     

Logcheck envoie par mail, les lignes inconnues (non répertoriées dans ses règles) trouvées dans certains journaux.

+

Installation et configuration

       
 # aptitude install logcheck logcheck-database
@@ -397,43 +402,49 @@ TMP="/tmp"
 
 
-

fail2ban

+

fail2ban

+

Exécute des actions à la détection de comportements anormaux.

-
-
+    

Installation et commandes utiles

+
+      
 # apt install fail2ban
-
-
+      
+      
 # fail2ban-client status
-
-
+      
+      
 # fail2ban-client status ssh
-
-
+      
+    
+
+
+

Exemple de filtre

+
+      
 # vim /etc/fail2ban/filter.d/demo :
-
+      
 [Definition]
 failregex =  warning: \[\]: authentication failed:
 ignoreregex =
-
+
-

fail2ban (suite)

-
-
+    

Exemple de jail

+
+      
 # vim /etc/fail2ban/jail.local
-
+      
 [demo-rule]
-
-enabled = true
-port    = http,https
-filter  = demo
-logpath = /var/log/demo.log
+enabled  = true
+port     = http,https
+filter   = demo
+logpath  = /var/log/demo.log
 maxretry = 3
 findtime = 1800
-bantime = 3600
-
+bantime = 3600 +
@@ -881,7 +892,7 @@ umask : # vim /etc/exports /srv/nfs 192.0.2.4(rw,root_squash,sync,no_subtree_check) -/srv/nfs2 192.0.2.0/27(ro) 192.0.242(rw) +/srv/nfs2 192.0.2.0/27(ro) 192.0.242(rw) # apt install nfs-common # mount -t nfs -o nfsvers=3 192.0.2.1:/srv/nfs /mnt