RouterOS防火墙
/ ip firewall filter add chain=input connection-state=invalid action=drop comment="丢弃非法连接数据" disabled=no/ip firewall filter add chain=input protocol=icmp action=drop comment="禁止外网Ping" disabled=no in-interface=ADSLadd chain=input protocol=tcp psd=21,3s,3,1 action=drop comment="探测并丢弃端口扫描连接" disabled=no add chain=input protocol=tcp connection-limit=3,32 src-address-list=black_list action=tarpit comment="压制DoS攻击" disabled=no add ch
RouterOS优化
Web 80端口优先/ip firewall mangleadd chain=prerouting protocol=tcp dst-port=80 action=mark-packet new-packet-mark=web passthrough=yes comment="web" disabled=no/queue treeadd name="web" parent=ether1-WAN packet-mark="web" limit-at=0 queue=default priority=3 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no小包优先/ ip firewall mangle add chain=forward protocol=tcp tcp-flags=syn action=change-mss new-mss=1440 comment="" disabled=no
RouterOS 限速脚本和限线程脚本
限线程脚本: :for aaa from 2 to 254 do={/ ip firewall filter add chain=forward src-address=("192.168.1." . $aaa) protocol=tcp connection-limit=120,32 action=drop comment="Connection limit"} 限速脚本: :for aaa from 2 to 254 do={/ queue simple add name=("queue" . $aaa) target-address=("192.168.1." . $aaa) limit-at=0/0 max-limit=400000/3000000 burst-limit=600000/10000000 burst-threshold=400000/3000000 burst-time=30/30 comment="Speed limit"} 说明: