Version 2.9.27 限制脚本(速度、线程、防ARP)等常见脚本
New Terminal 打开输入以下程序就OK了。 记得把注释去掉, 自己慢慢测试吧。 。 一下脚本全测试过, 我所使用的版本为RouterOS Version:2.9.27
/ system script
;线程脚本
add name="a" source=":for aaa from 1 to 35 do={/ip firewall filter add \
chain=forward src-address=\(192.168.1. . \$aaa\) protocol=tcp \
connection-limit=50,32 action=drop}" \
policy=ftp,reboot,read,write,policy,test,winbox,password
------------------------------------------------------------------------------
;限速脚本
add name="A" source=":for aaa from 1 to 20 do={/queue simple add \
name=\(0_ . \$aaa\) dst-address=\(192.168.7. . \$aaa\) interface=ether1 \
limit-at=256000/64000 max-limit=512000/128000 burst-limit=1024000/256000 \
burst-threshold=512000/128000 burst-time=50s/50s }" \
policy=ftp,reboot,read,write,policy,test,winbox,password
------------------------------------------------------------------------------
;防ARP, 自动COPY
add name="IP" source=":foreach i in=\[/ip arp find dynamic=yes \] do={/ip arp \
add copy-from=\$i}\n\n" \
policy=ftp,reboot,read,write,policy,test,winbox,password
------------------------------------------------------------------------------
限制速度脚本
/system/script
:for aaa from 5 to 20 do={/queue simple add name=(A . $aaa) dst-address=(192.168.1. . $aaa) interface=all limit-at=1000000/64000 max-limit=1000000/128000 burst-limit=1024000/256000 burst-threshold=512000/128000
……