routeros的一些常用脚本--脚本的风采
Remove all connections/ ip firewall connection {:foreach r in= do={remove $r}}
firewall rule disable script
:foreach i in= do=
减轻syn攻击
firewall-connection-tracking-syn sendtime 设置成本50 rectime 设置成30
# RouterOS 2.96
# 这是神仙试写的一个对192.168.0.0这个网段的
# 每个IP加一个simple queue的脚本
# 网关100就不限制了
# 注意:扩展名应改为.rsc
:foreach i in \
do {:put (deleting . ... . );
/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 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
"How to" for converting dynamic ARP entries to static.
:foreach i in= do={/ip arp add copy-from=$i}
[ 本帖最后由 cracks 于 2007-11-4 13:14 编辑 ] 我来支持。。。。这久了没人回你。
页:
[1]