热搜词
发表于 2009-8-4 21:07:25 | 显示全部楼层 |阅读模式
本帖最后由 灰儿 于 2009-8-5 17:58 编辑

以下脚本使用说明:
用winbox.exe 登陆 找到 System -- Script - 点击+ 将对应脚本复制其中后,点击 Run Script即脚本安装成功!记得把注释去掉,以下脚本全测试过,我所使用的版本为RouterOS Version:2.9.27
/ system script
-----------------------------------------------------------------------------
;限制上传下载速度脚本
:for aaa from 21 to 254 do={/queue simple add name=(A . $aaa) dst-address=(192.168.0. . $aaa) interface=all limit-at=256000/256000 max-limit=512000/512000 burst-limit=512000/256000 burst-threshold=512000/256000 burst-time=50s/50s }
-----------------------------------------------------------------------------
;限制连接数脚本
:for aaa from 21 to 254 do={/ip firewall filter add chain=forward src-address=(192.168.0. . $aaa) protocol=tcp connection-limit=50,32 action=drop}
-----------------------------------------------------------------------------
;禁P2P脚本
:for aaa from 21 to 254 do={/ip firewall filter add chain=forward src-address=(192.168.0. . $aaa) p2p=all-p2p action=drop}
-----------------------------------------------------------------------------
;限制连接数与P2P脚本
:for aaa from 21 to 254 do={/ip firewall filter add chain=forward src-address=(192.168.0. . $aaa) protocol=tcp connection-limit=50,32 p2p=all-p2p action=drop}
-----------------------------------------------------------------------------
;防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
-----------------------------------------------------------------------------
脚本说明:
脚本为一行不是两行
aaa是变量
21 to 254是21~254
192.168.0. . $aaa是IP
上两句加起来是192.168.0.21~192.168.0.254的意思
connection-limit=50是线程数这里为50
max-limit=512000/512000 是最大上行512k/最大下行512k
全部评论0
回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|管理员之家 ( 苏ICP备2023053177号-2 )

GMT+8, 2024-12-23 23:02 , Processed in 0.150226 second(s), 22 queries .

Powered by Discuz! X3.5

Cpoyright © 2001-2024 Discuz! Team