找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4293|回复: 2

[脚本] 看看这个脚本。。。。

[复制链接]
发表于 2011-8-29 19:47:57 | 显示全部楼层 |阅读模式

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

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

×
{
:local dislist
:for xxe from=200 to=205 do={
:set dislist [/ip firewall address-list get [/ip firewall address-list find list=("Accept" . $xxe)] disable ]
:if ($dislist=false ) do={ /ip firewall address-list disable [/ip firewall address-list find list=("Reject" . $xxe)] }
:if ($dislist=true ) do={ /ip firewall address-list enable [/ip firewall address-list find list=("Reject" . $xxe)] }
}
}

帮忙看看这段脚本看问题出在哪里不谢谢。。我把LIST变成变量就不行。变成定值就可以。
routeros
发表于 2011-8-30 00:09:12 | 显示全部楼层
已经解决了吧。。。
routeros
回复

使用道具 举报

发表于 2011-8-30 15:38:24 | 显示全部楼层
本帖最后由 mxso 于 2011-8-30 15:53 编辑

这里精简了下代码,但我不知道你要做什么,什么问题?
  1. /ip firewall address-list{
  2. :for xxe from=200 to=205 do={
  3. :if ([get [find list=("Accept" . $xxe)] disable]) do={enable [find list=("Reject" . $xxe)]} else={disable [find list=("Reject" . $xxe)]}}}
复制代码
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-1 03:27 , Processed in 0.044500 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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