找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3546|回复: 2

[脚本] ROS 3.3强开指定首页不成功

[复制链接]
发表于 2011-5-3 19:58:09 | 显示全部楼层 |阅读模式

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

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

×
1.本程序只在ros2.9.27上调试通过,其它版本尚未测试;
#     2.安装前请做好备份,一切后果与kuwin无关;
#     2.Winbox->System->Scripts->按+,贴入程序内容,按OK,再按Run Script.
####################################################################################
#定义变量
#首页所在服务器IP
:local StrToAddress
:set StrToAddress 192.168.0.1

#首页所在服务器端口
:local StrToPort
:set StrToPort 80

#时限1,指定时限内跳到指定首页,设置1-5秒
:local StrTimeOut1
:set StrTimeOut1 2s

#时限2,指定时限内不跳到指定首页,3小时为3h,(测试是否有效可调为1分钟1m)
:local StrTimeOut2
:set StrTimeOut2 3h

ip firewall mangle add chain=prerouting protocol=tcp dst-port=80 src-address-list=!src2 \
        action=add-src-to-address-list address-list=src1 address-list-timeout=$StrTimeOut1 comment=TimeOut1

ip firewall mangle add chain=prerouting protocol=tcp dst-port=80 \
        action=add-src-to-address-list address-list=src2 address-list-timeout=$StrTimeOut2 comment=TimeOut2

ip firewall nat add chain=dstnat protocol=tcp dst-port=80 src-address-list=src1 \
        action=dst-nat to-addresses=$StrToAddress to-ports=$StrToPort comment=ToAddress


以上是2。927的脚本,但是现在都用3。3了,3.3的强开要如何设置呢?
routeros
发表于 2011-5-4 01:04:56 | 显示全部楼层
你在2.X可以实现吗?
routeros
回复

使用道具 举报

 楼主| 发表于 2011-5-4 16:56:06 | 显示全部楼层
可以实现呢,3.3的我已经搞好了,现在可以实现跳转,强开指定首页了
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-7 02:58 , Processed in 0.046289 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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