Bug 25921

Summary: Проблема взаимодействия fail2ban и iptables
Product: Sisyphus Reporter: Gulay Boris <boris>
Component: fail2banAssignee: Grigory Ustinov <grenka>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P3 CC: antohami, cas, cow, evg, george, grenka, imz, kotopesutility, lav, nbr, qa_viy, rider, sem, shaba, sin, slev, toni, vitty, viy
Version: unstable   
Hardware: all   
OS: Linux   

Description Gulay Boris 2011-07-18 13:03:41 MSK
У меня не добавляются (или не удаляются) некоторые правила в iptables. В логе fail2ban при этом такие записи:

2011-07-18 11:54:59,966 fail2ban.actions.action: ERROR  iptables -N fail2ban-dovecot-imap
iptables -A fail2ban-dovecot-imap -j RETURN
iptables -I INPUT -p tcp --dport imap -j fail2ban-dovecot-imap returned 200
2011-07-18 11:54:59,976 fail2ban.actions.action: ERROR  iptables -N fail2ban-postfix-spam
iptables -A fail2ban-postfix-spam -j RETURN
iptables -I INPUT -p tcp --dport smtp -j fail2ban-postfix-spam returned 200
2011-07-18 12:47:56,355 fail2ban.jail   : INFO   Jail 'nginx' stopped
2011-07-18 12:47:57,425 fail2ban.jail   : INFO   Jail 'rcguard' stopped
2011-07-18 12:47:58,348 fail2ban.actions.action: ERROR  iptables -D INPUT -p tcp --dport imap -j fai
iptables -F fail2ban-dovecot-imap
iptables -X fail2ban-dovecot-imap returned 100

Очевидно, пощдобная проблема присутствует и в сизифе.
Мне помогло решение отсюда:
http://oschgan.com/drupal/index.php?q=node/52
Описанное изменение заметно замедляет запуск сервиса, но ошибки исчезают и правила добавляются/удаляются корректно. Предлагаю добавить соответствующий код в файл в нашем пакете.
Comment 1 Andrey Cherepanov 2011-07-18 18:02:08 MSK
Переношу на Sisyphus.
Comment 2 Repository Robot 2011-08-02 07:39:50 MSK
fail2ban-0.8.4-alt4.1 -> sisyphus:

* Tue Aug 02 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux> 0.8.4-alt4.1
- Fixed interaction with fail2ban and iptables (ALT #25921)