I’ve been struggling to get this working in a way to log the requesting client IP and not the load-balancer IP when the server is behind an AWS load-balancer. In the end it was very simple: As /etc/apache2/mods-enabled/remoteip.conf RemoteIPHeader X-Forwarded-For …
Tag Archives: Ubuntu
Offline Mutt to replace Thunderbird on Ubuntu (3 of 4)
The previous post looked at setting up offlineimap for managing received emails, and this post will look at setting up msmtp for managing sending emails. The main reason I don’t like to use Mutt’s built-in SMTP to send directly to …
Offline Mutt to replace Thunderbird on Ubuntu (2 of 4)
It doesn’t make sense to look at the Mutt config first, even though that is at the heart of everything. So first of all I’ll cover offlineimap. This package will replicate the IMAP folders from your email provider (Google Apps …
Offline Mutt to replace Thunderbird on Ubuntu (1 of 4)
I’ve fallen out with Thunderbird recently and the geek in me has been interested in getting Mutt up and running for a while. But I needed certain functionality and it’s taken a little while to put all of the pieces …
DoS on Amazon EC2 instances running WordPress
I was got out of bed with an emergency call from a client at the weekend because his blog was down. This is the one that is getting a lot of traffic, but CPU was spiking up to 100% quite …
Fail2Ban behind an Amazon Load Balancer
When using F2B on servers that sit behind Amazon ELBs (and probably load balancers of other types), the client IP in the error log is usually that of the load balancer. Banning the load balancer from access is probably not …
Turn PHP Xdebug profiling on and off by BASH script
It was bugging me (debugging me?) that Xdebug profiling dragged my development server down so much. So here’s a simple script to place in /usr/local/bin to turn it off and on more easily. Remember to chmod +x it first. This …
Blocking advert sites using /etc/hosts
Using the hostsfile.mine.nu approach to blocking adverts is nothing new, but sometimes in the course of testing something, I do actually need to see if adverts and ad pop-ups are working correctly. So I do this… Download the hosts file …
Protecting WordPress from script fishing attacks with Fail2Ban
A better, but slightly more complex, solution has been posted here Because WordPress redirects all incoming requests and serves dedicated 404 pages, nothing ends up in the Apache error.log. and so, The standard Fail2Ban filter apache-noscript.conf won’t work. So here’s …
Fail2Ban with sendEmail Python MTA and SMTP
The servers I administer are on Amazon cloud, and there are often problems with outgoing emails and sendmail, so for a quick fix to add outgoing email support to scripts, I’m okay with using sendEmail, a small Python SMTP email …
Recent Comments