Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-15446

fail2ban doesn't load jails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 14
    • Fix Version/s: None
    • Component/s: Fail2Ban, FreePBX Distro
    • Labels:
      None
    • Bug Tracker:
      Customer Issue
    • ToDo:
    • Asterisk Version:
      13
    • Distro Version:
      14
    • Distro:
      FreePBX Distro

      Description

      Hello,

       

      It seems that fail2ban does not load properly on a default installation of the FreePBX Distro, after everything is configured on the GUI. 

      
      [root@freepbx ~]# fail2ban-client status
      Status
      |- Number of jail: 0
      `- Jail list:

       

      fail2ban server is running correctly:

      
      root      9007 94.4  0.4 836872 14020 ?        Sl   13:25   5:19 /usr/bin/python /usr/bin/fail2ban-server -f -s /var/run/fail2ban/fail2ban.sock -p /var/run/fail2ban/fail2ban.pid -x

      I've found out that by changing the fail2ban systemd service configuration file and restarting it, the jails are correctly loaded. 

       

      
      [root@freepbx system]# fail2ban-client status
      Status
      |- Number of jail: 7
      `- Jail list: apache-tcpwrapper, recidive, ssh-iptables, apache-badbots, pbx-gui, asterisk-iptables, vsftpd-iptables

      New fail2ban.service:

       

      
      [Unit]
      Description=Fail2Ban Service
      Documentation=man:fail2ban(1)
      After=network.target iptables.service firewalld.service
      PartOf=firewalld.service
      
      [Service]
      Type=forking
      ExecStart=/usr/bin/fail2ban-client -x start
      ExecStop=/usr/bin/fail2ban-client stop
      ExecReload=/usr/bin/fail2ban-client reload
      PIDFile=/var/run/fail2ban/fail2ban.pid
      Restart=always
      
      [Install]
      WantedBy=multi-user.target
      

      Thanks,

       

      Marcos

       

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  xrobau Rob Thomas
                  Reporter:
                  inframorphus Infraestrutura Morphus
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    NextupJiraPlusStatus

                    Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.