openmediavault-fail2ban first version now available for testing

  • Hello


    1 - What's your OMV version ? (dpkg -l | grep openmediavault)
    2 - What's your openmediavault-fail2ban version ? (dpkg -l | grep openmediavault-fail2ban)
    3 - I think fail2ban is started but you have error in log. Can you check fail2ban service is started ? ( ps -ef | grep fail2ban or service fail2ban status )
    4 - I think a file is missing ...
    5 - Have you test to desinstall and reinstall ? (force desinstall in hopeless case : dpkg -P openmediavault-fail2ban)
    6 - With infos on 1,2,3 i can help you fully ;)

  • Hi, i have the same here. Installed yesterday on 1.17 Kralizec...doesent work.


    Shell "Fail2Ban is not running...failed!"


    Fail2Ban Ver. 1.1.1


    ---------------------------------------------------------------------
    Seems ok now after reinstallation! It's running correctly...


    Thanks!

  • output of dpkg -l | grep openmediavault


    ii openmediavault 1.17 all Open network attached storage solutionii openmediavault-clamav 1.3 all OpenMediaVault ClamAV pluginii openmediavault-fail2ban 1.1.1 all OpenMediaVault Fail2ban pluginii openmediavault-forkeddaapd 1.2 all OpenMediaVault forked-daapd (DAAP server) pluginii openmediavault-keyring 0.3 all GnuPG archive keys of the OpenMediaVault archiveii openmediavault-mysql 1.0.16 all MySQL plugin for OpenMediaVault.ii openmediavault-nginx 1.3 all Nginx plugin for OpenMediaVault.ii openmediavault-omvextrasorg 1.17 all OMV-Extras.org Package Repositories for OpenMediaVaultii openmediavault-plexmediaserver 1.0.10 all OpenMediaVault Plex Media Server pluginii openmediavault-sabnzbd 1.0.5 all OpenMediaVault SABnzbd pluginii openmediavault-sensors 1.0.5 all Provides a cpu temperature monitorii openmediavault-subsonic 1.0.5 all A web-based music streamer, jukebox and Podcast receiverii openmediavault-virtualbox 1.2 all VirtualBox plugin for OpenMediaVault.


    output of dpkg -l | grep openmediavault-fail2ban


    ii openmediavault-fail2ban 1.1.1 all OpenMediaVault Fail2 ban plugin


    output of service fail2ban status
    Status of authentication failure monitor:fail2ban is not running ... failed!


    reinstall does not work even removing with dpkg -P openmediavault-fail2ban and reinstalling after.


    i have confirmed that the files are there when installed. so i don't think i miss any files.



    after a few more try's i got it working finally.


    one more question, where do i alter or add the filters?

  • Hum it's strange ...


    to deinstall :

    Code
    apt-get remove openmediavault-fail2ban
    apt-get purge openmediavault-fail2ban


    or

    Code
    dpkg -r openmediavault-fail2ban
    dpkg -P openmediavault-fail2ban


    After "dpkg -l | grep openmediavault-fail2ban" maybe empty
    And you can now reinstall with webgui into plugin section


    It's ok ??


    For this moment you must alter or add filters manually, there are in /etc/fail2ban/filter.d/
    It's a new feature needed ?

  • It would certainly be nice is we could add and alter filters in the webgui


    fail2ban is working now


    i have one more feature request: when adding a jail write it to jail.local instead of jail.conf in that way when fail2ban get's updated your jails still work after the upgrade because jail.conf get's overwritten by the upgrade

  • Testing this now, and it seems to be working, but 3 comments:
    - Why doesn't this use a monochrome icon like everything else in omv? The color icon sticks out like a sore thumb!
    - Why does it have default jails for apache and not for nginx ? It would make sense to package the an omv plugin with jails for nginx.
    - It would be nice to have a list of banned IPs in the WebUI, but I don't know if that's possible.

  • - Why doesn't this use a monochrome icon like everything else in omv? The color icon sticks out like a sore thumb!
    I'm a dev, not a graphist, no time yet to change -> TODOLIST


    - Why does it have default jails for apache and not for nginx ? It would make sense to package the an omv plugin with jails for nginx.
    But i prefer Apache lol, i'm agree with you to put nginx for default -> TODOLIST


    - It would be nice to have a list of banned IPs in the WebUI, but I don't know if that's possible.
    You can already see list of banned IPs In diagnoctics -> Services -> Fail2ban : (like smb, FTP, SSH)


    Example :

  • @WastlJ

    Quote

    pr_bond - that would be good to have in the logs like autoshutdown.


    You can already see logs of fail2ban In diagnostics -> Journal -> Fail2ban - Log : (like Auth, message, syslog)

  • It's been bugging my OCD so bad that I decided to make you an .svg icon for the plugin. I'm not a graphist either, but I think this should be better than the tiny color icon that you've been using...


    Cheers!

    Files

    • icon.zip

      (7.01 kB, downloaded 297 times, last: )
  • It's been bugging my OCD so bad that I decided to make you an .svg icon for the plugin. I'm not a graphist either, but I think this should be better than the tiny color icon that you've been using...


    Cheers!


    Thank you so much. Now i can install it.


    Another question: Does "port: ftp" works, if i changed the port from default?

    HP ProLiant N54L | 16 GB RAM | 4x4TB WD Red RAID 5 | ESXi 5.5 | OMV 2.1.x 64 bit

  • I've made some custon icons (plex, openvpn as a few others) as well. If anyone has some special skills and want to help develop things in OMV let us know.


    One thing we really need is HowTo videos or people to work on documentation. Not fun stuff but it all helps.

  • Another question: Does "port: ftp" works, if i changed the port from default?


    Yes it works because fail2ban looks at the logs for failed logins and then puts the ip in iptables with a drop on all ports.


    i have been testing and found a good and reliable way to get fail2ban banning omv failed logins and own cloud logins.


    i will put it here in a little while.

  • Hm, it seems that the settings of the plugin, and the jail.conf-file are not in sync.


    If I change the action/email in OMV, it looks like it's saved OK, but when I check /etc/fail2ban/jail.conf the old values are still there.


    Now, I've changed the values directly in jail.conf, and now they're honored by fail2ban, but the settings-view on OMV still shows the wrong values.


    Is this a known bug?

    Atom 330 @ 1.6GHz, 4GB RAM
    2x3TB Data, 1x3TB Parity, SnapRAID + AUFS pool
    Latest OMV running on custom Debain Wheezy, 3.14 Backports kernel

  • I am getting the following error:


    Error #4000:
    exception 'OMVException' with message 'Failed to execute command 'fail2ban-client status 2>&1': ERROR Unable to contact server. Is it running?' in /usr/share/openmediavault/engined/rpc/fail2ban.inc:368
    Stack trace:
    #0 [internal function]: OMVRpcServiceFail2ban->getStats(NULL, Array)
    #1 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
    #2 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('getStats', NULL, Array)
    #3 /usr/sbin/omv-engined(500): OMVRpc::exec('Fail2Ban', 'getStats', NULL, Array, 1)
    #4 {main}



    Code
    root@Krisol:~# dpkg -l | grep openmediavault-fail2ban
    ii openmediavault-fail2ban 1.1.1 all OpenMediaVault Fail2ban plugin


    Code
    root@Krisol:~# ps -ef | grep fail2ban or service fail2ban status
    grep: or: No such file or directory
    grep: service: No such file or directory
    grep: fail2ban: No such file or directory
    grep: status: No such file or directory


    tried re installing but same error. appreciate if yu can help

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!