Hello ![]()
I need help with optimization of my firewall rules.. I have CCR 1036 with 14Gbit of band
When I get ddos atack on UDP everything is grate.. I observed attack near 8Gbit and Cpu of all cores was mayby 5%
The problem is when I get ddos attack on TCP..
on attacks near 500mbit the all cores using 100% cpu..
on 250mbit - about 50%
on 50mbit attack 10%
Can someone help me with this?
TCP syncookes are enabled in firewall connection tracking.
Thenk u
7 ;;; Blokada UDP Port 80
chain=forward action=drop protocol=udp port=808 chain=input action=accept src-address=80.72..
9 ;;; White Lista
chain=forward action=accept src-address-list=white_list dst-address-list=“”10 ;;; accept established connection packets
chain=input action=accept connection-state=established11 ;;; accept related connection packets
chain=input action=accept connection-state=related12 ;;; drop invalid packets
chain=input action=drop connection-state=invalid13 ;;; detect and drop port scan connections
chain=input action=drop protocol=tcp psd=21,3s,3,114 ;;; suppress DoS attack
chain=input action=tarpit protocol=tcp src-address-list=black_list connection-limit=3,3215 ;;; detect DoS attack
chain=input action=add-src-to-address-list protocol=tcp address-list=black_list address-list-timeout=1d connection-limit=100,3216 ;;; jump to chain ICMP
chain=input action=jump jump-target=ICMP protocol=icmp17 ;;; jump to chain services
chain=input action=jump jump-target=services18 ;;; Allow Broadcast Traffic
chain=input action=accept dst-address-type=broadcast19 chain=input action=log log-prefix=“Filter:”
20 ;;; 0:0 and limit for 5pac/s
chain=ICMP action=accept protocol=icmp icmp-options=0:0-255 limit=5,521 ;;; 3:3 and limit for 5pac/s
chain=ICMP action=accept protocol=icmp icmp-options=3:3 limit=5,522 ;;; 3:4 and limit for 5pac/s
chain=ICMP action=accept protocol=icmp icmp-options=3:4 limit=5,523 ;;; 8:0 and limit for 5pac/s
chain=ICMP action=accept protocol=icmp icmp-options=8:0-255 limit=5,524 ;;; 11:0 and limit for 5pac/s
chain=ICMP action=accept protocol=icmp icmp-options=11:0-255 limit=5,525 ;;; drop everything else
chain=input action=drop26 ;;; Drop everything else
chain=ICMP action=drop protocol=icmp27 ;;; accept localhost
chain=services action=accept dst-address=127.0.0.1 src-address-list=127.0.0.128 ;;; allow MACwinbox
chain=services action=accept protocol=udp dst-port=2056129 ;;; allow winbox
chain=services action=accept protocol=tcp dst-port=829130 ;;; MT API
chain=services action=accept protocol=tcp dst-port=872831 ;;; MT Discovery Protocol
chain=services action=accept protocol=udp dst-port=567832 ;;; allow SNMP
chain=services action=accept protocol=tcp dst-port=16133 ;;; allow DNS request
chain=services action=accept protocol=tcp dst-port=5334 ;;; Web
chain=services action=accept protocol=tcp dst-port=222235 ;;; Allow DNS request
chain=services action=accept protocol=udp dst-port=5336 chain=services action=return
37 ;;; ETOP DNS
chain=forward action=accept src-address-list=ETOP38 ;;; ETOP DNS
chain=forward action=accept dst-address-list=ETOP39 ;;; allow related connections
chain=forward action=accept connection-state=related40 ;;; Prawid owe pakiety
chain=forward action=accept connection-state=established41 ;;; drop invalid connections
chain=forward action=drop connection-state=invalid42 ;;; SYN Flood protect
chain=forward action=jump jump-target=SYN-Protect tcp-flags=syn connection-state=new protocol=tcp43 chain=SYN-Protect action=accept tcp-flags=syn connection-state=new protocol=tcp limit=1000,100 dst-limit=0,5,dst-address/1m40s
44 chain=SYN-Protect action=drop tcp-flags=syn connection-state=new protocol=tcp
45 chain=forward action=jump jump-target=detect-ddos connection-state=new
46 chain=forward action=log connection-state=new hotspot=“” log-prefix=“ddos_udp:”
47 chain=detect-ddos_TCP action=return dst-limit=30/1m,5,src-and-dst-addresses/10s
48 ;;; packet size 500-65000
chain=detect-ddos action=add-src-to-address-list address-list=ddoser address-list-timeout=1h packet-size=500-6500049 ;;; Rate limit UDP
chain=detect-ddos action=return dst-limit=30/1m,5,src-and-dst-addresses/10s50 chain=detect-ddos action=return src-address=80.72..
51 chain=detect-ddos action=return src-address=80.72..
52 chain=detect-ddos action=add-dst-to-address-list address-list=ddosed address-list-timeout=10h30m
53 chain=detect-ddos action=add-src-to-address-list address-list=ddoser address-list-timeout=10h
54 ;;; Drop from ddoser-list
chain=forward action=drop src-address-list=ddoser dst-address-list=ddosed55 chain=forward action=drop connection-state=new src-address-list=ddoser dst-address-list=ddosed