Mergy Dot Org Notes and Hacks From Jonathan Mergy

CategoryLinux

Using fail2ban To Mitigate Excessive Apache 403, 404, 500, and 503 Attacks

I finally spent some time last weekend to address the botnets attacking my site and specifically looking for known exploits, bad WordPress plugins, and just general random stuff. I should disclaimer that messing around and systematically blocking hosts viewing your website generating 404s may or may not make sense for you. If you create a fail2ban filter, jail, and start picking off hosts that...

Fixing the fail2ban filter for Postfix unverified address / user unknown spam attacks

For whatever reason, the default distributed postfix filter I had on my fail2ban setup on ubuntu was not triggering on: 450 4.1.1 Receipient address rejected: unverified address: unknown user mail.log errors. The failregex line was in there for it, but it wasn’t hitting on the endless dictionary attack random attempts from spammer servers across the world. This was annoying because, in...

NUT ups.conf configuration for OMNIVS 1500XL USB

The Tripplite OmniVS 1500XL is a great home/SOHO USB UPS that is expandable with external battery packs. But, the NUT support on Debian-based linux distros is no bueno. They support Redhat-based with some software, but Debian users are stuck with NUT and tripplite_usb driver support. The unit doesn’t dish a few variables via the tripplite_usb driver so you kind of want to add a few...

Blocking garbage gTLDs with postfix header_checks

In looking at my Postfix mail.logs, I only see the new ICANN vanity gTLDs really generating garbage spam. Lots of press on the mess this all is causing. I got kind of sick of even dealing with that, so here is the header_checks lines I use to block them via postfix if you want to do that on your setup. There are a lot of articles on the internet for this, but I here is what works for me. YMMV...

Repairing a badly damaged package system in Ubuntu

Recently, I did something really stupid and damaged my whole dpkg system. It was pretty bad. I did an “apt-get purge” with a pattern and wildcard and thought it was only going to remove everything around a specific package. It didn’t. It did much much more. Not helping the whole situation was the interrupt I issued when I saw apt going through and yanking stuff that I...

Mergy Dot Org Notes and Hacks From Jonathan Mergy