Iptables

Salut,

Je me suis inspiré du script de ricardo mais quand je scan ma machine, il y a 4 ports, le 22,80,53 et 111 alors que je n’ai pas encore ajout" de règles, est-ce fail2ban? Dois-je quand-même ouvrir les ports 22,80 et 443?

Que me conseillez-vous comme règle pour lire les logs.

Je suis un peu perdu. :cry:

debian:/home/artex# iptables -L -vn

[code]Chain INPUT (policy ACCEPT 4862 packets, 1174K bytes)
pkts bytes target prot opt in out source destination
112 5772 fail2ban-ssh tcp – * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22
109 6924 fail2ban-apache tcp – * * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
109 6924 fail2ban-apache-overflows tcp – * * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
109 6924 fail2ban-apache-multiport tcp – * * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
112 5772 fail2ban-ssh-ddos tcp – * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22
109 6924 fail2ban-apache-noscript tcp – * * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
4809 1164K fail2ban-pam-generic tcp – * * 0.0.0.0/0 0.0.0.0/0
4862 1174K LOG all – * * 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 4

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 4839 packets, 378K bytes)
pkts bytes target prot opt in out source destination

Chain ACCEPTLOG (0 references)
pkts bytes target prot opt in out source destination

Chain LOG_DROP (0 references)
pkts bytes target prot opt in out source destination

Chain fail2ban-apache (1 references)
pkts bytes target prot opt in out source destination

Chain fail2ban-apache-multiport (1 references)
pkts bytes target prot opt in out source destination
109 6924 RETURN all – * * 0.0.0.0/0 0.0.0.0/0

Chain fail2ban-apache-noscript (1 references)
pkts bytes target prot opt in out source destination
109 6924 RETURN all – * * 0.0.0.0/0 0.0.0.0/0

Chain fail2ban-apache-overflows (1 references)
pkts bytes target prot opt in out source destination
109 6924 RETURN all – * * 0.0.0.0/0 0.0.0.0/0

Chain fail2ban-pam-generic (1 references)
pkts bytes target prot opt in out source destination
4809 1164K RETURN all – * * 0.0.0.0/0 0.0.0.0/0

Chain fail2ban-ssh (1 references)
pkts bytes target prot opt in out source destination
112 5772 RETURN all – * * 0.0.0.0/0 0.0.0.0/0

Chain fail2ban-ssh-ddos (1 references)
pkts bytes target prot opt in out source destination
112 5772 RETURN all – * * 0.0.0.0/0 0.0.0.0/0

Chain fail2ban-xinetd-fail (0 references)
pkts bytes target prot opt in out source destination
0 0 RETURN all – * * 0.0.0.0/0 0.0.0.0/0

Chain fail2ban-xinetd-fail-log (0 references)
pkts bytes target prot opt in out source destination
0 0 LOG all – * * 0.0.0.0/0 0.0.0.0/0 limit: avg 6/min burst 2 LOG flags 0 level 4 prefix `fail2ban-xinetd-fail:DROP '
0 0 DROP all – * * 0.0.0.0/0 0.0.0.0/0
[/code]

Ben oui visiblement, fail2ban a mis ces règles pour décompter les connexions…

4 ports dans quel état ? Ouvert, fermé, filtré… ?
Scan avec quoi ? Depuis où ?

Comme c’est depuis le 1er Mars, à mon avis c’est obsolète. Le rajout du commentaire a remonté de fil…