Просмотр исходного кода

Merge pull request #336 from mariusv/master

fail2ban support for Trusty
Alex Payne 10 лет назад
Родитель
Сommit
e26940569d
2 измененных файлов: 9 добавлений и 0 удалений
  1. 5
    0
      roles/common/tasks/security.yml
  2. 4
    0
      roles/common/templates/etc_fail2ban_jail.local.j2

+ 5
- 0
roles/common/tasks/security.yml Просмотреть файл

@@ -9,6 +9,11 @@
9 9
   template: src=etc_fail2ban_jail.local.j2 dest=/etc/fail2ban/jail.local
10 10
   notify: restart fail2ban
11 11
 
12
+- name: Copy fail2ban configuration into place for Ubuntu Trusty
13
+  template: src=etc_trusty_fail2ban_jail.local.j2 dest=/etc/fail2ban/jail.local
14
+  when: ansible_sistributon_release == 'trusty'
15
+  notify: restart fail2ban
16
+
12 17
 - name: Copy fail2ban dovecot configuration into place
13 18
   copy: src=etc_fail2ban_filter.d_dovecot-pop3imap.conf dest=/etc/fail2ban/filter.d/dovecot-pop3imap.conf
14 19
   notify: restart fail2ban

+ 4
- 0
roles/common/templates/etc_fail2ban_jail.local.j2 Просмотреть файл

@@ -28,7 +28,11 @@ maxretry = 1
28 28
 enabled = true
29 29
 filter = dovecot-pop3imap
30 30
 action = iptables-multiport[name=dovecot-pop3imap, port="pop3,imap,993,995", protocol=tcp]
31
+{% if ansible_distribution == 'Ubuntu' %}
32
+logpath = /var/log/mail.log
33
+{% else %}
31 34
 logpath = /var/log/maillog
35
+{% endif %}
32 36
 maxretry = 20
33 37
 findtime = 1200
34 38
 bantime = 1200

Загрузка…
Отмена
Сохранить