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:30] gcooper |
networking:router:mikrotik_under_attack [2014/06/03 16:08] (current) gcooper |
||
---|---|---|---|
Line 55: | Line 55: | ||
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 62: | 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=" | comment=" | ||
| | ||
- | add action=return | + | add chain=detect-ddos |
- | comment=" | + | comment=" |
| | ||
- | add action=add-dst-to-address-list address-list=ddos-target address-list-timeout=1w | + | add chain=detect-ddos |
- | comment=" | + | comment=" |
| | ||
- | add action=add-src-to-address-list address-list=ddos-source address-list-timeout=1w | + | add chain=detect-ddos |
- | comment=" | + | comment=" |
| | ||
- | add action=drop | + | add chain=forward |
- | src-address-list=ddos-source comment=" | + | src-address-list=ddos-source comment=" |
</ | </ | ||