iptables & log
Bonjour,
Je mets en place chez moi une passerelle ADSL sous Debian Sarge. J'ai
mis en place quelques règles basiques pour iptables et j'aimerais
maintenant voir les paquets qui sont jetés. J'ai donc créé une chaine
pour tout logger et j'ai essayé de renvoyer ces log dans un fichiers
type /var/log/iptables.log au lieu du /var/log/messages.
Mais j'ai plusieurs problèmes : tous les paquets droppés ne sont pas
loggés, les log ne vont ni ds iptables.log ni dans messages..
Mes règles :
(15:07)root:/home/tchupy# iptables -L -v
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- lo any anywhere anywhere
42225 1789K ACCEPT all -- eth0 any anywhere anywhere
6354 9146K ACCEPT all -- ppp0 any anywhere anywhere
state RELATED,ESTABLISHED
695 35719 LOG_DROP all -- any any anywhere anywhere
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
105K 16M ACCEPT all -- eth0 any anywhere anywhere
101K 46M ACCEPT all -- ppp0 any anywhere
anywhere state RELATED,ESTABLISHED
0 0 LOG_DROP all -- any any anywhere anywhere
Chain OUTPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any lo anywhere anywhere
61052 70M ACCEPT all -- any eth0 anywhere anywhere
3608 248K ACCEPT all -- any ppp0 anywhere anywhere
0 0 LOG_DROP all -- any any anywhere anywhere
Chain LOG_DROP (3 references)
pkts bytes target prot opt in out source destination
77 3784 LOG all -- any any anywhere
anywhere LOG level debug prefix `[LOG IPTABLES] : '
695 35719 DROP all -- any any anywhere anywhere
Déjà ce que je comprends, c'est comment je peux avoir 77 paquets qui ont
matché la règle 1 de LOG_DROP alors que 695 paquets ont été détruit
ensuite..
Dans mon syslog.conf, j'ai rajouté la ligne :
kern.=debug /var/log/iptables.log
Je l'ai relancé et aucun changement.. sauf que maintenant il n'y a ni
log dans /var/log/messages ni dans iptables.log...
Est ce que quelqu'un a une idée qui pourrait m'aider ?
MERCI
Reply to: