apache

Mitigating BEAST on Debian Apache web servers

The BEAST attack touches encryption protocols that came before TLS v1.1.

Basically, the attack would permit an attacker to try and guess the part that precedes the real message, and thus guess the real message. Since the explanation is very technical, I'll let technical people speak on the issue:

edit: please do not apply what is written in this article. RC4 is not a viable solution. please do continue to support only strong cypher suite and force your users to upgrade to more recent browser versions if security is an issue.

Caching puppet responses for greater scalability

You have put your puppet master behind Passenger and that lasted for some time. But now that you're beginning to have quite a good number of hosts that checkin to your master regularly, performance has started to become an issue. What can be done about it?

There are multiple answers. The first and simplest would be to put more space between your puppet runs. Say you're currently running puppet every 30mins on each client, you could change that period to 45mins or 1h.

It's also possible to distribute runs via a central scheduler that would ensure to run every node before going back to square one. One such solutions is the "puppetcommander.rb" script that R.I. Pienaar wrote to use mcollective as the run scheduler.

Another method (that you can use in conjunction with the above) is to cache the responses that come from the puppet master.

Iterating through all IP addresses in a puppet ERB template

Sometimes, it's relevant to iterate through all ip adrresses on a host to emit configuration for each one. Facter has a useful bunch of facts for this:

  • interfaces => lo,eth0,eth0_0,eth1
  • ipaddress_lo => 127.0.0.1
  • ipaddress_eth0 => 192.168.0.200
  • ipaddress_...
  • ... and so on

This is nice, but how can you use this in an ERB template?

Count number of hits per IP on a web server

I've just had to fight a DDoS on a server, and I used a bash one-liner to have a very rough overview of the picture from the logs.

Once you know you've got a DDoS on your back, here's a quick reminder of how to count, in the last 1000 requests (number is arbitrary, but provides an interesting view when there are many requests), which IPs are doing the most requests

Subscribe to RSS - apache