Author Archives: Sawant Shah

Munin Mysql Plugin on CentOS and Redhat

The MySQL plugin for Munin was giving me a lot of issues on RHEL 6. It wasn’t working regardless of what I did, and I didn’t come across any good-enough documentation that could have helped in this situation. Putting my search skills to use, it took parts of three different solutions to get the Mysql plugin up and running in Munin.

A combination of steps from the following three posts helped me:

So, if you are having any issues with Munin’s MySQL plugin in CentOS or Redhat, then one of these three solutions will definitely help you resolve it.

Automatic Deployment with Git

Here is a tutorial on utilizing Git for automatic deployments using its built-in hooks functionality.

This article will teach you how to use Git when you want to deploy your application. While there are many ways to use Git to deploy our application, this tutorial will focus on the one that is most straightforward.

Git repositories have a folder called ‘hooks’. This folder contains some sample files for possible actions that you can hook and perform custom actions set by you.

Read More

Apache mod_qos: How To Defend Against slowloris DDoS

mod_qos is a quality of service module for the Apache web server implementing control mechanisms that can provide different levels of priority to different HTTP requests. Here’s what the official documentation says:

But why do you need quality of service for a web application? Well, web servers require threads and processes to serve HTTP requests. Each TCP connection to the web server occupies one of these threads respectively processes. Sometimes a server gets too busy to serve every request due to the lack of free processes or threads. Another parameter requiring control by mod_qos is the available bandwidth: all clients communicate to the server over a network link with limited bandwidth. Overfilling the link results in network congestion and poor performance.

Example situations where web applications require QoS:

  • More resources are consumed if request processing by an application takes a long time, e.g. when request processing includes time consuming database queries.
  • Oversubscription of link capabilities due to many concurrent clients uploading or downloading data.
  • Penetration of the web server by attackers (DDoS).

mod_qos may be used to determine which requests should be served and which shouldn’t in order to avoid resource oversubscription. The module collects different attributes such as the request URL, HTTP request and response headers, the IP source address, the HTTP response code, history data (based on user session and source IP address), the number of concurrent requests to the server (total or requests having similar attributes), the number of concurrent TCP connections (total or from a single source IP), and so forth.

Here’s a guide on installing mod_qos on Cent OS 5: Continue reading

Evasive Action in the Event of HTTP DoS attack Using mod_evasive on Apache

One of the guides to follow, to enable and protect against HTTP DoS attacks in Apache, using mod_evasive:

mod_evasive is an evasive maneuvers module for Apache that provides evasive action in the event of an HTTP DoS attack or brute force attack. It is also designed to be a detection and network management tool, and can be easily configured to talk to ipchains, firewalls, routers, and more.

Read more…

Secure Apache Server from DDoS, Slowloris and DNS Injection attacks

Apache is the most widely used web server on the planet, and it’s also one of the most widely attacked. To that end, it’s always smart to lock down your Apache server as best as possible. This goes well beyond just locking down your network — you need to give that Apache server as much attention as it might get from outside sources.

Read more…

Why You Should Hire a Polyglot Programmer

It’s common for people to be sceptical of software developers with varied coding experience. We’re used to seeing, “5 years C# experience” on the CV in front of us, so when we see a CV that says: “2 years of Ruby, 1 year of Python and 2 years of Java”, we might be concerned that the person doesn’t have the depth of experience we need. Although this reaction is natural, it’s misguided.

”If it doesn’t matter whether the programmer you’re considering has deep knowledge of the language your application uses, what does?“

The person with the second CV could be a better developer on a C# project than your language expert, despite having little or no C# experience. Let’s not confuse them with a developer who happens to know a few languages. I’m talking about a particular kind of developer with varied experience and a good grasp of engineering fundamentals. The polyglot programmer.

Read more…

Core Data Overview

A good intro to Core Data in iOS:

Core Data is probably one of the most misunderstood Frameworks on OS X and iOS. To help with that, we’ll quickly go through Core Data to give you an overview of what it is all about, as understanding Core Data concepts is essential to using Core Data the right way. Just about all frustrations with Core Data originate in misunderstanding what it does and how it works. Let’s dive in…

Read more…

Resolution of Ansible Issues on OS X Mavericks

Getting started with Ansible on OS X Mavericks. While following the installation instructions, it broke down on the final step, twice.

It first broke down with the following message (upon entering an empty password):

Then tried entering the password for my logged-in user, which resulted in the following error:

Solution 1: This was resolved with the solution found here.

After this, things were still breaking down, so I turned the -vvvv flag on. Here’s the output with -vvvv flag:

Solution 2: Go to System Preferences > Sharing, and enable Remote Login option:

OS X - Sharing - Remote Login

You will finally get the following output:

That’s all folks.