找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3711|回复: 1

[脚本] routeros的一些常用脚本--脚本的风采

[复制链接]
发表于 2006-4-13 08:26:38 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
Remove all connections

/ ip firewall connection {:foreach r in=[find] do={remove $r}}

firewall rule disable script
:foreach i in=[/ip firewall filter find action=drop ] do=[/ip firewall filter disable $i]


减轻syn攻击
firewall-connection-tracking-syn sendtime 设置成本50 rectime 设置成30

# routeros 2.96
# 这是神仙试写的一个对192.168.0.0这个网段的
# 每个IP加一个simple queue的脚本
# 网关100就不限制了

# 注意:扩展名应改为.rsc


:foreach i in [/queue simple find] \
do {:put (deleting . ... . [/queue simple get $i name]);
     /queue simple remove $i;}

:for i from 1 to 254 \
do { \
    :if ($i!=100) \
     do {/queue simple add \
          name=(queue . $i) \
          limit-at=128000/128000 \
          burst-threshold=384000/192000 \
          max-limit=512000/256000 \
          burst-limit=2000000/512000 \
          burst-time=16s/8s \
          dst-address=(192.168.0. . $i); \
        :put (192.168.0. . $i .   ...  . added)} \
    }



reboot script

/system scheduler add name=reboot interval=24h start-time=11:59:00 on-event={/system reboot} disabled=no


How to change default gateway?
/ip route set [/ip route find dst-address=0.0.0.0/0] gateway=xxx.xxx.xxx.xxx


Simple Queues with a script
:for i from=1 to=75 do={/queue simple add target-address=(192.168.1. . $i . "/32") max-limit=56000}

remove all this:
/queue simple remove [find]


"How to" for converting dynamic ARP entries to static.
:foreach i in=[/ip arp find dynamic=yes ] do={/ip arp add copy-from=$i}

[ 本帖最后由 cracks 于 2007-11-4 13:14 编辑 ]
routeros
发表于 2007-11-4 13:13:40 | 显示全部楼层
我来支持。。。。这久了没人回你。
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-5-19 13:10 , Processed in 0.058137 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表