Update: This article is not meant to be a permanent solution. It’s a way to stop the tidal wave of traffic you could be getting. Many times it’s important to just get the customers up to some degree while you figure out the best course of action.
Many of the Denial of Service (DDoS) attacks many folks see these days involve attacks coming from APNIC (Asia Pacific) IP addresses. A trend is to open as many connections as possible and overwhelm the number of entries in the connection table. You are limited to 65,535 ports to be open. Ports below 10000 are reserved ports, but anything above that can be used for client type connections.
Now, Imagine you have a botnet with 10,000 computers all bearing their weight on your network. Say you have a web-site someone doesn’t like. If these 10,000 machines all send just 7 legitimate GET requests to your web-server you can bring, even a big router to a grinding halt. Firewalls, due to the extra CPU they are exerting, are even more prone to these types of attacks.
So, how do you begin to mitigate this attack? By the time you are under attack you are in defensive mode. Someone, or alot of someone’s, are at your door trying to huff and puff and blow your house down. You need to slow the tide. One of the first things you can do is start refusing the traffic. A simple torch normally shows many of the attacking IPs, are from APNIC. If this is the case, we enable a firewall rule that says if the IP is not sourced from the below “ARIN” address list go ahead and drop it.
add chain=forward comment="WebServer ACL" dst-address=188.8.131.52 src-address-list=!ARIN action=drop
The above rule says if our attacked host is being contacted by anything not on the “ARIN” list go ahead and drop it.
Make sure to paste this into /ip firewall address-list . These were copied off the ARIN web-site as of this writing. APNIC and other registries all have similar lists. Keep in mind, this won’t stop the traffic from coming to you, but will shield you some in order to have a somewhat functional network while you track down the issues.
Some people will say to blackhole the IP via a BGP blackhole server, but if you have production machines on the attacked host taking them offline for the entire world could be a problem. This way, you are at least limiting who can talk to them.
add address=184.108.40.206/8 list=ARIN
add address=220.127.116.11/8 list=ARIN
add address=18.104.22.168/12 list=ARIN
add address=22.214.171.124/11 list=ARIN
add address=126.96.36.199/13 list=ARIN
add address=188.8.131.52/8 list=ARIN
add address=184.108.40.206/8 list=ARIN
add address=220.127.116.11/8 list=ARIN
add address=18.104.22.168/8 list=ARIN
add address=22.214.171.124/8 list=ARIN
add address=126.96.36.199/8 list=ARIN
add address=188.8.131.52/8 list=ARIN
add address=184.108.40.206/8 list=ARIN
add address=220.127.116.11/8 list=ARIN
add address=18.104.22.168/8 list=ARIN
add address=22.214.171.124/8 list=ARIN
add address=126.96.36.199/8 list=ARIN
add address=188.8.131.52/8 list=ARIN
add address=184.108.40.206/8 list=ARIN
add address=220.127.116.11/8 list=ARIN
add address=18.104.22.168/8 list=ARIN
add address=22.214.171.124/8 list=ARIN
add address=126.96.36.199/8 list=ARIN
add address=188.8.131.52/8 list=ARIN
add address=184.108.40.206/8 list=ARIN
add address=220.127.116.11/8 list=ARIN
add address=18.104.22.168/8 list=ARIN
add address=22.214.171.124/8 list=ARIN
add address=126.96.36.199/8 list=ARIN
add address=188.8.131.52/8 list=ARIN
add address=184.108.40.206/8 list=ARIN
add address=220.127.116.11/8 list=ARIN
add address=18.104.22.168/8 list=ARIN
add address=22.214.171.124/8 list=ARIN
add address=126.96.36.199/8 list=ARIN
add address=188.8.131.52/8 list=ARIN
add address=184.108.40.206/8 list=ARIN
add address=220.127.116.11/8 list=ARIN
add address=192.0.0.0/8 list=ARIN
add address=18.104.22.168/8 list=ARIN
add address=22.214.171.124/8 list=ARIN
add address=126.96.36.199/8 list=ARIN
add address=188.8.131.52/8 list=ARIN
add address=184.108.40.206/8 list=ARIN
add address=220.127.116.11/8 list=ARIN
add address=18.104.22.168/8 list=ARIN
add address=22.214.171.124/8 list=ARIN
add address=126.96.36.199/8 list=ARIN