RouterOS 性能強悍但預設配置不安全。許所謂「被 DDoS 攻擊導致 ROS 掉線」,實為內網中毒主機向外發起攻擊,佔滿頻寬導致 ROS 過載。根治需「隱藏自身、清理內鬼、封鎖情報洩露」。
IP:5188。/ip firewall filter add chain=input protocol=tcp dst-port=5188 src-address-list=mgmt-allow action=accept/ip firewall filter add chain=input protocol=tcp dst-port=5188 action=dropmgmt-allow 列表。/ip firewall filter
add chain=input protocol=icmp in-interface=WAN1 action=drop comment="Block WAN Ping"
add chain=input protocol=icmp in-interface=WAN2 action=drop comment="Block WAN2 Ping (dual WAN)"
# 如需禁內網 Ping,再加一條 in-interface=LAN
驗證:外網 ping 不通,WinBox 登入正常。
常見查詢 IP 網站:ip138.com、whatismyip.com、ip.chinaz.com、checkip.dyndns.org、myip.cn 等。在 ROS 建立 Layer7 協議匹配或直接封鎖這些域名/IP:
/ip firewall layer7-protocol
add name=ip-query-site regexp="ip138\\.com|whatismyip\\.com|ip\\.chinaz\\.com|checkip\\.dyndns\\.org|myip\\.cn"
/ip firewall filter
add chain=forward layer7-protocol=ip-query-site action=drop comment="Block IP query sites"
/ip firewall filter add chain=forward protocol=tcp tcp-flags=syn connection-state=new limit=50,5:packet action=drop 限制 SYN Flood)。ROS 本身極少被直接攻擊癱瘓,**癱瘓多源於內網流量風暴**。隱藏 IP、禁 Ping、封鎖洩露渠道、清理內鬼、上游清洗,五管齊下才能安枕無憂。