Базовая защищаем MikroTik от внешних атак
1. Ограничиваем количество ICMP-запросов (делаем защиту от флуд-пинг).
/ip firewall filter add chain=input comment=Allow_limited_pings in-interface=ether1 limit=50/5s,2:packet protocol=icmp add action=drop chain=input comment=Ping_Drop in-interface=ether1 protocol=icmp
2. Организовываем ловушку от перебора портов на доступ к устройству.
/ip firewall filter add action=add-src-to-address-list address-list=perebor_portov_drop chain=input comment=Perebor_portov_add_list dst-port=98 in-interface=ether1 log=yes log-prefix=Attack protocol=tcp add action=drop chain=input comment=Perebor_portov_list_drop in-interface=ether1 protocol=tcp src-address-list=perebor_portov_drop
3. Блокируем BOGON-сети.
/ip firewall address-list add address=0.0.0.0/8 disabled=no list=BOGON add address=10.0.0.0/8 disabled=no list=BOGON add address=100.64.0.0/10 disabled=no list=BOGON add address=127.0.0.0/8 disabled=no list=BOGON add address=169.254.0.0/16 disabled=no list=BOGON add address=172.16.0.0/12 disabled=no list=BOGON add address=192.0.0.0/24 disabled=no list=BOGON add address=192.0.2.0/24 disabled=no list=BOGON add address=192.168.0.0/16 disabled=no list=BOGON add address=198.18.0.0/15 disabled=no list=BOGON add address=198.51.100.0/24 disabled=no list=BOGON add address=203.0.113.0/24 disabled=no list=BOGON add address=224.0.0.0/4 disabled=no list=BOGON add address=240.0.0.0/4 disabled=no list=BOGON /ip firewall filter add action=drop chain=input comment=Bogon_Wan_Drop in-interface=ether1 src-address-list=BOGON
4. Блокируем атаки на порт 53 (DNS)
/ip firewall filter add action=drop chain=input comment=drop_ddos_dns_port in-interface=ether1 protocol=udp dst-port=53
5. Разрешаем все зависимые подключения
/ip firewall filter add chain=input comment=Related_Wan_Accept connection-state=related
6. Блокируем все входящие соединения с WAN
/ip firewall filter add action=drop chain=input comment=Drop_all_WAN in-interface=ether1