Salut,
Voilà, j’ai une ip local (192.168.1.13) qui est banni, et j’aimerai bien pouvoir (cela va de soit …) la dé-bannir.
iptables -t filter -D fail2ban-ssh (N° de la chaine)
Or cela ne m’est guère possible, et pour cause … elle n’apparaît pô avec iptables.
Enfin ssh & ssh-ddos, par exemple.
root@serveur-local:~# iptables -S | grep fail2ban
-N fail2ban-PHP-fopen
-N fail2ban-apache-anti-scripts
-N fail2ban-apache-dosevasive
-N fail2ban-apache-w00tw00t
-N fail2ban-courierauth
-N fail2ban-couriersmtp
-N fail2ban-pam-generic
-N fail2ban-sasl
-A INPUT -p tcp -m multiport --dports 25,465,143,220,993,110,995 -j fail2ban-sasl
-A INPUT -p tcp -m multiport --dports 80,443 -j fail2ban-PHP-fopen
-A INPUT -p tcp -j fail2ban-pam-generic
-A INPUT -p tcp -m multiport --dports 25,465,143,220,993,110,995 -j fail2ban-courierauth
-A INPUT -j fail2ban-apache-dosevasive
-A INPUT -p tcp -m multiport --dports 25,465 -j fail2ban-couriersmtp
-A INPUT -p tcp -m tcp --dport 80 -j fail2ban-apache-anti-scripts
-A INPUT -p tcp -m tcp --dport 80 -j fail2ban-apache-w00tw00t
-A fail2ban-PHP-fopen -j RETURN
-A fail2ban-apache-anti-scripts -j RETURN
-A fail2ban-apache-dosevasive -j RETURN
-A fail2ban-apache-w00tw00t -j RETURN
-A fail2ban-courierauth -j RETURN
-A fail2ban-couriersmtp -j RETURN
-A fail2ban-pam-generic -j RETURN
-A fail2ban-sasl -j RETURN
root@serveur-local:~#
[code]root@serveur-local:~# iptables -t filter -L -n > Lire-IP-bannis.txt && cat Lire-IP-bannis.txt
Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-sasl tcp – 0.0.0.0/0 0.0.0.0/0 multiport dports 25,465,143,220,993,110,995
fail2ban-PHP-fopen tcp – 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
fail2ban-pam-generic tcp – 0.0.0.0/0 0.0.0.0/0
fail2ban-courierauth tcp – 0.0.0.0/0 0.0.0.0/0 multiport dports 25,465,143,220,993,110,995
fail2ban-apache-dosevasive all – 0.0.0.0/0 0.0.0.0/0
fail2ban-couriersmtp tcp – 0.0.0.0/0 0.0.0.0/0 multiport dports 25,465
fail2ban-apache-anti-scripts tcp – 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
fail2ban-apache-w00tw00t tcp – 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain fail2ban-PHP-fopen (1 references)
target prot opt source destination
RETURN all – 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-apache-anti-scripts (1 references)
target prot opt source destination
DROP all – 192.168.1.13 0.0.0.0/0
RETURN all – 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-apache-dosevasive (1 references)
target prot opt source destination
RETURN all – 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-apache-w00tw00t (1 references)
target prot opt source destination
RETURN all – 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-courierauth (1 references)
target prot opt source destination
RETURN all – 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-couriersmtp (1 references)
target prot opt source destination
RETURN all – 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-pam-generic (1 references)
target prot opt source destination
RETURN all – 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-sasl (1 references)
target prot opt source destination
RETURN all – 0.0.0.0/0 0.0.0.0/0
root@serveur-local:~#[/code]
Et pourtant l’ip local est belle et bien là! Entre autres …
[code]root@serveur-local:~# fail2ban-client status ssh
Status for the jail: ssh
|- filter
| |- File list: /var/log/auth.log
| |- Currently failed: 0
| - Total failed: 17- action
|- Currently banned: 6
| - IP list: 125.64.43.106 61.47.47.55 192.168.1.13 58.51.91.54 211.202.2.109 202.103.226.187- Total banned: 6
root@serveur-local:~#[/code]
root@serveur-local:~# iptables -S | grep ' 22 '
root@serveur-local:~#
Une idée please …