I am getting hammered on ports 25 and 80. The attacker is most probably spoofing the IP address, and so far I count about 70,000 different IP addresses. Blocking by IP address is not going to work.
The port 80 attack hits
http://hgriggs.com with a POST and the POST data is full of crap. I have captured samples with tcpdump and it looks like this:
POST / HTTP/1.1
Accept: */*
Accept-Language: en-us
Content-Type: application/octet-stream
Content-Length: 129
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: hgriggs.com
Connection: Keep-Alive
Cache-Control: no-cache
..].[.\.>UDp.^M..I..-v......].0...........Y.!O...`....;\.)N}....~...J...8.....Y1.....0.%V.....O..G...02.'.&..q.=2A_.... .D..^...8.
I used to have a Wordpress blog on
http://hgriggs.com, but I have removed it, so every call gets a 404 or 503 now. At first, it brought the Linode to its knees and I had to reboot. Now that the blog is gone and the 404 or 503 is going back, Apache is handling the constant load adequately.
On port 25, they are probably targeting hgriggs.com. They connect and immediately blast crap at me. I increased sendmail's greet_pause to 15 seconds, so these connections are immediately dropped. However, sendmail occasionally gets overwhelmed and stops accepting connections for a brief while, then starts again. I am not losing legitimate email, but some is being delayed. The data being blasted through contains unfinished snippets of XML, control characters, NULLs, all sorts of crap. Again, the IP addresses are probably spoofed, and there are about 70,000 of them.
At peak times, I see about 40 hits per second, at slow times I see about 5 hits per second, and I don't see any times where there is 0. It's been going on for about 30 hours now, non-stop. I have reduced my logging levels to stop the rapid growth of log files. I have Apache and sendmail handling the load okay for the time being. The Linode is functioning fine, but my traffic is constantly being eroded. I probably won't ever hit my monthly allocation even if they never stop, but it's really irritating and I would like to block it somehow.
I am using iptables to block unwanted traffic. I have a small but simple iptables config that has worked well. However, this new burst of traffic is being ignored because it is coming in from so many IP addresses, that it all looks like legitimate traffic. Is there anything I can do with iptables to block this stuff? I can't see how to block it without blocking the legitmate traffic.
Any suggestions?