Custom button pad for executing CLI commands (fail2ban docker used as an example but can be used for other commands too)

  • I recently helped a buddy set up an OMV system using my nginx-proxy-manager/fail2ban setup I posted in the guides, with short medium and long jails as I alluded to. This worked great as usual but his sister very quickly got banned because she couldn't remember her password, and had enough attempts in a short period to result in a 1 week long ban. I remoted into his systems and removed the ban, but his unfamiliarity with the CLI, like many, made me realize that my fail2ban setup lacked easy administration capability for those that are less comfortable with the CLI, so I decided to break out an application that I run on my nextcloud VM, called OliveTin, but use a docker deployment for it to keep it more in the preferred way of doing things in OMV. After a little reading and trial and error, I came up with a simple docker container to allow checking, banning and unbanning of my fail2ban container.


    Below are the steps and information to create it, and links to the application documentation

  • KM0201

    Hat das Thema freigeschaltet.
  • First we will create and deploy the Olivetin docker container using your preferred docker management method (compose plugin, portainer, etc.)


  • Next we have to create a config.yaml file in the config directory you have mapped in the above compose file, and then edit the file, paste the following into it, then save the file.



    The configuration makes use of the ability of OliveTin to use custom icons, so I have included them here also. These should be downloaded and placed in the customIcons directory you have mapped in the above compose file. Once this is all done, restart the OliveTin container and connect to it using http://<IP of OMV>:1337. You now have a simple interface to manage your fail2ban docker IP bans.

  • OliveTin can be used for point and click issuance of just about any CLI commands. It allows for different types of button feedback, input fields, multiple "dashboards", and even cascading of buttons if required.


    The docker deployment above will allow for controlling docker containers, but for docker security reasons it may not control the HOST system as easily as if were installed natively, so If you wish to employ OliveTin to issue CLI commands on the host (in this case Debian that omv is running on), you may need to install OliveTin natively on the HOST OS. I have tested installing natively on an OMV7 virtual machine and it installs fine and does not seem to break OMV as it runs its own web server aside from the OMV UI, on a different port. I have also since moved my install and my buddy's to a native install and have not had any issues, as there was one command I was trying to set up for him that would not execute from the docker container.


    Below are links to the main web page where you can find the full documentation if you want to explore it more, as well as the github page.


    OliveTin - give safe and simple access to predefined shell commands from a web interface
    Useful for routine jobs like restarting services, starting backup scripts, or sending pings, when direct SSH access is difficult, not possible, or a just pain…
    www.olivetin.app

    GitHub - OliveTin/OliveTin: OliveTin gives safe and simple access to predefined shell commands from a web interface.
    OliveTin gives safe and simple access to predefined shell commands from a web interface. - GitHub - OliveTin/OliveTin: OliveTin gives safe and simple access…
    github.com

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!