This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
networking:router:mikrotik_under_attack [2014/06/03 15:24] gcooper |
networking:router:mikrotik_under_attack [2014/06/03 16:08] (current) gcooper |
||
---|---|---|---|
Line 10: | Line 10: | ||
:!: Consider disabling or deleting these rules after the attacks have subsided to keep from polluting your firewall rule set. | :!: Consider disabling or deleting these rules after the attacks have subsided to keep from polluting your firewall rule set. | ||
+ | |||
+ | ===== Port-Based Solution (may not be ideal) ===== | ||
==== Botnet - UDP Port 30837 ==== | ==== Botnet - UDP Port 30837 ==== | ||
Line 48: | Line 50: | ||
</ | </ | ||
- | ===== Sample Mikrotik DDoS Rules ===== | + | ===== Detection Based Solution |
http:// | http:// | ||
http:// | http:// | ||
+ | |||
+ | :!: This sample rule set is on the '' | ||
:!: This rule set uses '' | :!: This rule set uses '' | ||
+ | |||
+ | :!: You can also easily exclude (whitelist) certain hosts. | ||
This example dynamically creates two address lists: attackers ('' | This example dynamically creates two address lists: attackers ('' | ||
Line 60: | Line 66: | ||
< | < | ||
/ip firewall filter | /ip firewall filter | ||
- | add chain=forward connection-state=new action=jump jump-target=block-ddos | ||
- | add chain=forward connection-state=new src-address-list=ddoser dst-address-list=ddosed action=drop | ||
- | add chain=block-ddos dst-limit=50, | ||
- | add chain=block-ddos action=add-dst-to-address-list address-list=ddosed address-list-timeout=10m | ||
- | add chain=block-ddos action=add-src-to-address-list address-list=ddoser address-list-timeout=10m | ||
- | </ | ||
- | < | + | |
- | /ip firewall filter | + | comment=" |
- | + | ||
- | | + | |
- | disabled=no | + | |
- | | + | |
- | | + | |
- | dst-limit=32, | + | |
| | ||
- | add action=add-dst-to-address-list address-list=ddos-target address-list-timeout=\ | + | add chain=detect-ddos action=return dst-limit=50, |
- | 1w chain=detect-ddos | + | comment=" |
+ | |||
+ | add chain=detect-ddos | ||
+ | comment=" | ||
| | ||
- | add action=add-src-to-address-list address-list=ddos-source address-list-timeout=\ | + | add chain=detect-ddos |
- | 1w chain=detect-ddos | + | comment=" |
| | ||
- | add action=drop | + | add chain=forward |
- | disabled=no | + | |
</ | </ | ||