Các Firewall Filter Rules giúp tăng cường bảo mật cho Mikrotik
MỤC LỤC BÀI VIẾT (Nhấn để xem)
Như các bạn sử dụng Mikrotik đã biết thì vấn đề bảo mật trên Mikrotik cũng khá là nhức nhối, chủ yếu đến từ lỗi của người dùng như không thay đổi admin password, đặt password kém an toàn, reset về mặc định và không tắt các dịch vụ như SSH, Telnet … tạo điều kiện cho Hacker xâm nhập và chiếm đoạt quyền điều khiển hoặc lợi dụng vào mục đích xấu.
Dưới đây là các Filter Rules mình tổng hợp được từ trên internet giúp tăng cường thêm mức độ bảo mật cho Router của các bạn. (cũng không nhớ nguồn ở đâu, bác nào là tác giả xin hãy liên hệ mình đặt credit nha)
Copy từng dòng lệnh và dán vào Terminal trên Winbox
Ngoài các Firewall rules ở trên các bạn hãy nhớ tắt hết các dịch vụ không cần thiết ở menu IP > Service.
Nếu các bạn có các firewall rule hay, hãy chia sẽ bên dưới bình luận nha, mình sẽ bổ sung vào bài viết giúp mọi người an toàn hơn trước các cuộc tấn công của tin tặc.
/ip firewall filter
add chain=forward dst-port=11211 protocol=udp action=drop comment="Memcrashed - Amplification Attacks UDP 11211"
/ip firewall filter
add chain=forward connection-state=new action=jump jump-target=block-ddos comment="Anti DDoS Attacks"
add chain=forward connection-state=new src-address-list=ddoser dst-address-list=ddosed action=drop
add chain=block-ddos dst-limit=50,50,src-and-dst-addresses/10s action=return
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
add chain=input protocol=tcp psd=21,3s,3,1 action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="Mark Source ip port scanner to Address list " disabled=no
add chain=input protocol=tcp tcp-flags=fin,!syn,!rst,!psh,!ack,!urg action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="NMAP FIN Stealth scan"
add chain=input protocol=tcp tcp-flags=fin,syn action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="SYN/FIN scan"
add chain=input protocol=tcp tcp-flags=syn,rst action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="SYN/RST scan"
add chain=input protocol=tcp tcp-flags=fin,psh,urg,!syn,!rst,!ack action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="FIN/PSH/URG scan"
add chain=input protocol=tcp tcp-flags=fin,syn,rst,psh,ack,urg action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="ALL/ALL scan"
add chain=input protocol=tcp tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="NMAP NULL scan"
add chain=input src-address-list="port scanners" action=drop comment="Drop port scanners" disabled=no
/ip firewall filter
add action=drop chain=input comment="drop ftp BRUTE FORCErs" dst-port=21 protocol=tcp src-address-list=ftp_blacklist
add action=accept chain=output content="530 Login incorrect" dst-limit=1/1m,9,dst-address/1m protocol=tcp
add action=add-dst-to-address-list address-list=ftp_blacklist address-list-timeout=3h chain=output content="530 Login incorrect" protocol=tcp
add action=drop chain=input comment="drop ssh BRUTE FORCErs" dst-port=22-23 protocol=tcp src-address-list=ssh_blacklist
add action=add-src-to-address-list address-list=ssh_blacklist address-list-timeout=1w3d chain=input connection-state=new dst-port=22-23 protocol=tcp src-address-list=ssh_stage3
add action=add-src-to-address-list address-list=ssh_stage3 address-list-timeout=1m chain=input connection-state=new dst-port=22-23 protocol=tcp src-address-list=ssh_stage2
add action=add-src-to-address-list address-list=ssh_stage2 address-list-timeout=1m chain=input connection-state=new dst-port=22-23 protocol=tcp src-address-list=ssh_stage1
add action=add-src-to-address-list address-list=ssh_stage1 address-list-timeout=1m chain=input connection-state=new dst-port=22-23 protocol=tcp
add action=drop chain=forward comment="drop ssh brute downstream" dst-port=22-23 protocol=tcp src-address-list=ssh_blacklist
Mikrotik
- RouterOS v7: định tuyến client qua nhiều WAN bằng Routing Rules
- Các Firewall Filter Rules giúp tăng cường bảo mật cho Mikrotik Đang đọc
- Hướng dẫn cài đặt thủ công AdguardHome lên router Mikrotik. (C2)
- Mẹo tối ưu Ping, Bufferbload trên Mikrotik
- Hướng dẫn cài AdguardHome trực tiếp lên router Mikrotik
Bình luận & Thảo luận 0
Chia sẻ thắc mắc, phản hồi hoặc kinh nghiệm thực chiến của bạn