Je viens d'installer une Debian 10 sur un serveur virtuel (Proxmox) qui tourne pour le moment en local.
C'est un serveur de test pour me familiariser avec Debian 10.
J'ai installé fail2ban
Code: Select all
sudo apt-get install fail2ban
Code: Select all
sudo iptables -L -n
En voulant modifiér le /etc/fail2ban/jail.conf j'ai lu qu'il ne faut pas modifier ce fichierChain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
# YOU SHOULD NOT MODIFY THIS FILE.
et j'ai ainsi crée le fichier jail.local
Code: Select all
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
Code: Select all
sudo vim /etc/fail2ban/jail.local
Puis j'ai redémarré fail2ban comme suite[sshd]
# To use more aggressive sshd modes set filter parameter "mode" in jail.local:
# normal (default), ddos, extra or aggressive (combines all).
# See "tests/files/logs/sshd" or "filter.d/sshd.conf" for usage example and details.
#mode = normal
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
[dropbear]
enabled = true
port = ssh
logpath = %(dropbear_log)s
backend = %(dropbear_backend)s
[selinux-ssh]
port = ssh
logpath = %(auditd_log)s
Code: Select all
sudo fail2ban-client restart
Code: Select all
sudo iptables -L -n
Aucune règle à été transcrite dans iptables!Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
La command suivante
Code: Select all
sudo fail2ban-client status
On voit donc bel et bien que les deux règles ont été prise en compte en tout cas par fail2ban ...Status
|- Number of jail: 2
`- Jail list: dropbear, sshd
La commande
Code: Select all
apt-cache policy iptables
iptables:
Installé : 1.8.2-4
Candidat : 1.8.2-4
Table de version :
*** 1.8.2-4 500
500 http://deb.debian.org/debian buster/main i386 Packages
100 /var/lib/dpkg/status
et la commande
Code: Select all
apt-cache policy nftables
Ma question: Que doit je faire pour que fail2ban me permet de transcrire / créer des règles dans iptables?nftables:
Installé : (aucun)
Candidat : 0.9.0-2
Table de version :
0.9.0-2 500
500 http://deb.debian.org/debian buster/main i386 Packages
Merci d'avance pour votre aide