2017年3月24日 星期五

MikroTik RouterOS block attack

以下的 Policy 是引用網路上網友的設定,微調符合自己的需求。
Policy 順序依 comment 欄位的說明。

/ip firewall filter
add chain=forward action=drop protocol=tcp src-address-list=login_blacklist dst-port=80 comment="drop login forcers 1"
add chain=input action=drop protocol=tcp src-address-list=login_blacklist dst-port=22 comment="drop login forcers 1"

add chain=forward action=jump jump-target=login_check connection-state=new protocol=tcp src-address-list=!Local_LAN dst-port=80 comment="drop login forcers 2"
add chain=input action=jump jump-target=login_check connection-state=new protocol=tcp src-address-list=!Local_LAN dst-port=22 comment="drop login forcers 2"

add chain=login_check action=add-src-to-address-list connection-state=new protocol=tcp src-address-list=login_stage3 address-list=login_blacklist address-list-timeout=1d dst-port=80,22 comment="drop login forcers 3"

add chain=login_check action=add-src-to-address-list connection-state=new protocol=tcp src-address-list=login_stage2 address-list=login_stage3 address-list-timeout=1m dst-port=80,22 comment="drop login forcers 4"

add chain=login_check action=add-src-to-address-list connection-state=new protocol=tcp src-address-list=login_stage1 address-list=login_stage2 address-list-timeout=1m dst-port=80,22 comment="drop login forcers 5"

add chain=login_check action=add-src-to-address-list connection-state=new protocol=tcp address-list=login_stage1 address-list-timeout=1m dst-port=80,22 comment="drop login forcers 6"

它的作法是限制來源 IP 在短時間建立多條連線。



沒有留言:

張貼留言

Nutanix平台虛擬機(UBUNTU),利用Veeam備份移轉至VMware平台,安裝套件、系統更新出現錯誤

 mount: /var/lib/grub/esp: special device /dev/disk/by-id/scsi-SNUTANIX_VDISK_NFS_4_0_7672_2d41cbaa_025e_4fac_849c_9e620eff5bff-part1 does n...