Our (xwings and I) poor, _soon_to_be_removed_ webserver box at Brickfields netmyne datacentre was under DDOS attacked this morning around 11:30am MYT. The box with 512MB of RAM running FreeBSD survived the attack. However, system resources were running extremely low. More than 100 instances of httpd were running! The system was extremely busy and lag. It barely responded to my ssh connection request.
My pf rule’s stateful tracking limit seemed to be too lenient and not suitable for the box with low system resource.
pass in quick on $netif inet proto tcp from any to ($netif) port {80, 443}
\ keep state(source-track, max-src-states 100, max-src-nodes 999}
I have decided to head on to more aggressive approach, with use of pf max-src-conn-rate, table and filtering.
table persist
block in quick on $netif from
pass in quick on $netif inet proto tcp from any to ($netif) port {80, 443}
\ keep state(max-src-conn 100, max-src-rate 15/5, overload flush}
After stopping all httpd instances, I loaded new pf rule. pfctl -f /etc/pf.conf. It worked nicely. table was full of sons/daughters of bitch’s IP addresses.
pfctl -t dos -T show
221.194.136.38
220.181.19.176
72.232.190.82
61.135.162.18
202.190.250.2
64.26.63.19
Happy and back to sleep again. Grow up, kids! Shame on you. You couldn’t even kill a poor little box with 512MB of RAM! But thanks anyway for helping me to test area where I overlooked.
White Papers for Success
Decisions related to web hosting should be taken after going through the current web hosting review. Having an old record of past webhosting review magazines might help a bit. For services like ix web hosting and powweb however, one does not need to go through reviews.