蓝色动力网络

 找回密码
 立即注册

扫一扫,访问微社区

QQ登录

只需一步,快速开始

查看: 2967|回复: 0

Routeros ROS 定时分时段封禁网站

[复制链接]
发表于 2013-6-17 09:50:49 | 显示全部楼层 |阅读模式
  1. # jun/11/2013 17:27:05 by RouterOS 5.20
  2. # time kill web

  3. /ip firewall filter
  4. add action=drop chain=forward comment="kill web" disabled=no packet-mark=\
  5.     "Kill Web mark packet"

  6. /ip firewall mangle
  7. add action=mark-connection chain=forward comment="web taobao.com" content=\
  8.     taobao.com disabled=no new-connection-mark="Kill Web Conn" passthrough=\
  9.     yes
  10. add action=mark-connection chain=forward comment="web a.tbcdn.cn" content=\
  11.     tbcdn.cn disabled=no new-connection-mark="Kill Web Conn" passthrough=yes
  12. add action=mark-connection chain=forward comment="web jd.com" content=jd.com \
  13.     disabled=no new-connection-mark="Kill Web Conn" passthrough=yes
  14. add action=mark-packet chain=forward comment="Kill Web mark packet" \
  15.     connection-mark="Kill Web Conn" disabled=no new-packet-mark=\
  16.     "Kill Web mark packet" passthrough=no

  17. /system scheduler
  18. add disabled=no interval=3m30s name="kill web" on-event=":global nowtime  [:pi\
  19.     ck [/system clock get time] 0 2]\r\
  20.     \n:if (\$nowtime >= 08 && \$nowtime <= 12) do={\r\
  21.     \n:log info [/ip firewall filter enable [/ip firewall filter find comment=\
  22.     "kill web"]]\r\
  23.     \n:log info ("\A1\BC\BD\FB\D6\B9\CD\F8\D5\BE\D6\D0 8:00 -- 12:00\A1\BD\A3\
  24.     \AC\CF\D6\D4\DA\CA\B1\BC\E4\A3\BA".\$nowtime."\B5\E3")}\r\
  25.     \n:if (\$nowtime >= 12 && \$nowtime < 13) do={\r\
  26.     \n:log info [/ip firewall filter disable [/ip firewall filter find comment\
  27.     ="kill web"]]\r\
  28.     \n:log info ("\A1\BC\CD\F8\D5\BE\B7\C5\D0\D0\D6\D0 12:00 -- 13:00\A1\BD\
  29.     \A3\AC\CF\D6\D4\DA\CA\B1\BC\E4\A3\BA".\$nowtime."\B5\E3")}\r\
  30.     \n:if (\$nowtime >= 13 && \$nowtime < 17) do={\r\
  31.     \n:log info [/ip firewall filter enable [/ip firewall filter find comment=\
  32.     "kill web"]]\r\
  33.     \n:log info ("\A1\BC\BD\FB\D6\B9\CD\F8\D5\BE\D6\D0 13:00 -- 17:00\A1\BD\
  34.     \A3\AC\CF\D6\D4\DA\CA\B1\BC\E4\A3\BA".\$nowtime."\B5\E3")}\r\
  35.     \n:if (\$nowtime >=17  || \$nowtime < 08) do={\r\
  36.     \n:log info [/ip firewall filter disable [/ip firewall filter find comment\
  37.     ="kill web"]]\r\
  38.     \n:log info ("\A1\BC\CD\F8\D5\BE\B7\C5\D0\D0\D6\D0 17:00 -- 08:00\A1\BD\
  39.     \A3\AC\CF\D6\D4\DA\CA\B1\BC\E4\A3\BA".\$nowtime."\B5\E3")}\r\
  40.     \n\r\
  41.     \n:log info ("\A1\BC\CD\F8\D5\BE\B7\C3\CE\CA\BF\D8\D6\C6\BD\C5\B1\BE\D6\
  42.     \B4\D0\D0\CD\EA\B1\CF\A1\BD\A3\AC\CF\D6\D4\DA\CA\B1\BC\E4\A3\BA".\$nowtim\
  43.     e."\B5\E3")\r\
  44.     \n" policy=\
  45.     ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
  46.     start-date=jun/11/2013 start-time=08:46:55
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

湘公网安备 43018102000145号

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

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