蓝色动力网络

 找回密码
 立即注册

扫一扫,访问微社区

QQ登录

只需一步,快速开始

查看: 2916|回复: 0

Ros强开类似电信错误页面的功能

[复制链接]
发表于 2010-12-25 15:40:51 | 显示全部楼层 |阅读模式
  1. ######程序开始######################################################################
  2. # 程序名称:ROS强开首页(类似电信ADSL强开指定首页)
  3. # 程序版本:测试
  4. #  Ros版本:Ros2.9.27
  5. # 安装说明:
  6. #     1.本程序只在Ros2.9.27上调试通过,其它版本尚未测试;
  7. #     2.安装前请做好备份,一切后果与本站无关;
  8. #     2.Winbox->System->Scripts->按+,贴入程序内容,按OK,再按Run Script.
  9. ####################################################################################
  10. #定义变量
  11. #首页所在服务器IP
  12. :local StrToAddress
  13. :set StrToAddress 192.168.0.1
  14. #首页所在服务器端口
  15. :local StrToPort
  16. :set StrToPort 80
  17. #时限1,指定时限内跳到指定首页,设置1-5秒
  18. :local StrTimeOut1
  19. :set StrTimeOut1 2s
  20. #时限2,指定时限内不跳到指定首页,3小时为3h,(测试是否有效可调为1分钟1m)
  21. :local StrTimeOut2
  22. :set StrTimeOut2 3h
  23. ip firewall mangle add chain=prerouting protocol=tcp dst-port=80 src-address-list=!src2 \
  24.         action=add-src-to-address-list address-list=src1 address-list-timeout=$StrTimeOut1 comment=TimeOut1
  25. ip firewall mangle add chain=prerouting protocol=tcp dst-port=80 \
  26.         action=add-src-to-address-list address-list=src2 address-list-timeout=$StrTimeOut2 comment=TimeOut2
  27. ip firewall nat add chain=dstnat protocol=tcp dst-port=80 src-address-list=src1 \
  28.         action=dst-nat to-addresses=$StrToAddress to-ports=$StrToPort comment=ToAddress
  29. ################################################################################
  30. OK。。。。
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

蓝色动力网络微信平台
网站管理,业务合作联系邮箱: admin#lansedongli.com    QQ:13412492 限网站业务问题.
网站帐号、密码、密保找回请使用注册邮箱,发送邮件至 password#lansedongli.com ,否则不予受理.
免责声明:本论坛所有文字和图片仅代表其个人观点.
本站某些资料或文章来自于互联网,不代表本站观点,如果侵犯了您的权益,请来信告知,我们会在三天内删除.
为了给大家一个更好的交流场所,请勿在本论坛发表与中华人民共和国法律相抵触的言论,请合作,谢谢!
Copyright © 2007-2019 Corporation Powered by网吧系统 版权所有    转载请注明!
浙ICP备11043737号-1 程序:Discuz! x3.4

湘公网安备 43018102000145号

手机版|Archiver|蓝色动力网络   

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