Hi all; Long time Linode customer, but this is my first time posting here.
Quick background: I'm a self-taught sysadmin and have been managing my company's various servers for ~6 years now. I'm no expert, but am a capable learner and have been able to solve all the issues that have cropped up for us over that time. This particular issue has me at a loss though and I'd appreciate any advice from more experienced folks than I.
Starting ~3.5 days ago (Thursday @ 3:00AM PST) one of our linodes experienced a 37-fold increase in system utilization. That lasted for ~25 minutes, when usage dropped to ~4 times typical levels. During the first 25 minutes, CPU and memory were maxed or nearly so. PHP requests were failing with out-of memory errors and vanilla HTTP requests were also very slow or non-responsive. Once the initial spike subsided, the server has been handling responses without any significant issues.
After researching log files and monitoring services, I found two separate, but simultaneous causes:
1) The SMTP (postfix) server is being flooded with ~110 dropped connections from unique IP addresses every minute:
Code:
Oct 11 15:06:09 linode1 postfix/smtpd[31750]: connect from unknown[xxx.xxx.xxx.xxx]
...
Oct 11 15:06:15 linode1 postfix/smtpd[27562]: lost connection after UNKNOWN from unknown[xxx.xxx.xxx.xxx]
Oct 11 15:06:15 linode1 postfix/smtpd[27562]: disconnect from unknown[xxx.xxx.xxx.xxx]
2) A single apache vhost is seeing a flood of ~85 POST requests to the homepage each minute, again from unique IP addresses.
Code:
xxx.xxx.xxx.xxx - - [13/Oct/2013:03:35:23 -0400] "POST / HTTP/1.1" 200 15390 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
The number of requests was naturally significantly higher during the initial 25 minutes of the attack. In total, I've found ~70,000 unique IP addresses in both SMTP and HTTP logs.
So, it seems an attacker is spoofing IP addresses to flood SMTP and HTTP ports. To begin with they directed enough traffic to take down services, but without any action on my part, reduced the magnitude of their attack to a point that, though it persists, it is not having a significant impact on resources.
Two questions then: First, can anyone posit a good reason for why an attacker would intentionally persist with an ineffective DDOS attack against a webserver? The only semi-plausible answer I can think of is that this is a blackhat SEO technique to slow server response times enough to impact Google's QOS factor in Google's ranking algos, but I think I need to be wearing a tinfoil hat to seriously consider that possibility.
Second, and more importantly, is there anything I can do to negate their efforts locally? (Assuming I'm correct about the IP spoofing, all my reading on the topic suggests I don't have any options).
Many thanks for any insights!
Best,
David