เป็น Script ปิดการโจมตี Brute force login SSH
การทำงาน Brute force attack จะโจมตีได้ก็ต่อเมื่อได้ username ผ่านคนที่ใช้ U:admin หรือ root ก็จะโดน Brute force attack โจมตีเป็นลำดับต่อไป
ถ้าใช้ ตัวเลข 4 ตัว เช่น 1234 ก็ใช้เวลาในการเดา 11.11 วินาที
ถ้าใช้ เช่น 123456 ก็ใช้เวลาในการเดา 18.52 นาที
ถ้าใช้ วันเดือนปีเกิด เช่น 12122527 ใช้เวลา 1 วัน
ถ้าใช้ เบอร์มือถือ เช่น 0891234567 ใช้เวลา 4 เดือน
########## Brute Force SSH ##########
/ip firewall filter add chain=input action=jump jump-target=Brute protocol=tcp dst-port=22 comment="Check Brute" disabled=no
/ip firewall filter add chain=Brute protocol=tcp dst-port=22 connection-state=new src-address-list=safe action=accept comment="Allow SSH safe hosts" disabled=no
/ip firewall filter add chain=Brute protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage3 action=add-src-to-address-list address-list=ssh_blacklist address-list-timeout=10d comment="SSH brute forcers blacklisting" disabled=no
/ip firewall filter add chain=Brute protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage2 action=add-src-to-address-list address-list=ssh_stage3 address-list-timeout=1m comment="SSH brute forcers the third stage" disabled=no
/ip firewall filter add chain=Brute protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage1 action=add-src-to-address-list address-list=ssh_stage2 address-list-timeout=1m comment="SSH brute forcers the second stage" disabled=no
/ip firewall filter add chain=Brute protocol=tcp dst-port=22 connection-state=new action=add-src-to-address-list address-list=ssh_stage1 address-list-timeout=1m comment="SSH brute forcers the first stage" disabled=no
/ip firewall filter add chain=Brute protocol=tcp dst-port=22 src-address-list=ssh_blacklist action=drop comment="Drop SSH brute forcers" disabled=no
########## END ##########