Installing Fail2ban on Octoprint without basic http authentication

I don’t have http auth set for my Octoprint, and all guides I found required it for Fail2ban to work. I started looking around the Octoprint log files and found that the recent addition of Force Login plugin creates logs of failed logins to .octoprint/logs/octoprint.log file.

Installing and Setting up Fail2ban on Octoprint

Install fail2ban.

sudo apt-get install fail2ban

Create new jail file for octoprint in the jail.d folder.

sudo nano /etc/fail2ban/jail.d/octoprint.conf

Below is the jail.d config I have used for my setup. Bantime is 86400 seconds, meaning 24 hours. I’m only banning from http and https because I haven’t forwarded any other ports to my raspberry pi.

enabled = true
filter = octoprint
logpath = /home/pi/.octoprint/logs/octoprint.log
port = http,https
maxretry = 3
findtime = 10800
bantime = 86400
banaction = iptables-allports

Create new filter file for octoprint in the filter.d folder.

sudo nano /etc/fail2ban/filter.d/octoprint.conf

Below is the regex I have used for my setup.

# Fail2Ban filter for Octoprint login failures
before = common.conf
_daemon = app
failregex = - tornado.access - WARNING - 401 POST /api/login \(<HOST>\) .+$
ignoreregex =

The regex was made based on failed login in octoprint.log file, which looks like

2020-01-13 16:39:25,526 - tornado.access - WARNING - 401 POST /api/login (::ffff:XX.XXX.XX.XX) 17.58ms

Building an Ikea Lack enclosure for Creality Ender 3

I started with printing the parts from Threedee_Bus_Driver’s Thingiverse submission with Hobbyking’s red PLA.

Most of the finished parts.

I had already assembled one of the lack tables, so this time I just put correct corner pieces to right corners when attaching the legs to the table.

After that it was time to test fit the tables top of each other and mark the corners so I know where to screw the leg holders.

I drilled the holes bigger with a 3.5mm drill bit so the screws would fit better and they wouldn’t break the plastic. After this I just screwed the four corner pieces in place and did another test fitting to see if everything lines up. At this stage I also measured how large plexi glass windows I would need and ordered them.

Next I flipped the top table and installed Ikea Ledberg 24V led lights. I soldered wires between the leds, and ended up with a little too long wires but that doesn’t bother me personally. I just need to attach those wires to the table so it looks clean.

I used the original spool holder from the Ender 3, attached it with two screws to the printed spool holder base. Base has a lock that is attached with two screws to the table.

First test with the printer at the right place. I noticed that the Z rod hits the bottom of the upper table, so I need to print more parts that go between the leg and table.

Drilled a 10mm hole for the filament tube to go through the lack table. There is a short piece of bowden tube guiding the filament trough the printed part.

Since the Z rod hit the bottom of the the 2nd table, I needed to print more pieces to raise the table by 2cm.

I had to alter the original door parts to fit my round magnets, which I already had laying around. I also flipped the door side part so the magnet is between plexi glass and the plastic. My magnets are N52, so I felt they were too strong to have them sit side by side. I also used double sided tape to mount these to plexi glass and table.

It took a few days for the plexi glass to arrive, I ordered them cut to size from So it was just screwing the correct pieces to correct legs. I might have used short screws, but it seems to be fine.

Time to install the handle for the removable plexi glass, which is on the left side of the enclosure. Double sided tape, like mentioned before.

The front door panel was a bit too tall, my mistake on measuring it. So I have to cut very small pieces from the two corners to make it fit to the swings, then attach the handle and then it’s done.

Final result without the front door.