找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 6568|回复: 3

[脚本] 原创:定时限制内网某些ip上网控制脚本---脚本的风采

[复制链接]
发表于 2005-8-10 11:36:35 | 显示全部楼层 |阅读模式

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

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

×
先是script脚本:
/ system script
add name="drop467121444209" source="{
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.4/32\] disabled=no
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.6/32\] disabled=no
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.7/32\] disabled=no
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.12/32\] disabled=no
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.14/32\] disabled=no
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.44/32\] disabled=no
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.209/32\] disabled=no
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.15/32\] disabled=no
\n}" policy=ftp,reboot,read,write,policy,test
add name="accept4671214209" source="{
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.4/32\] disabled=yes
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.6/32\] disabled=yes
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.7/32\] disabled=yes
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.12/32\] disabled=yes
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.14/32\] disabled=yes
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.44/32\] disabled=yes
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.209/32\] disabled=yes
\n/ ip firewall rule lanIP set \[ip firewall rule lanIP find \
    src-address=192.168.0.15/32\] disabled=yes
\n}" policy=ftp,reboot,read,write,policy,test
然后是scheduler脚本:
/ system scheduler
add name="stat-link" on-event=accept4671214209 start-date=jan/01/1970 start-time=09:00:00 interval=1d comment="Control \
    Engineering department  up4-6-7-12-14-209" disabled=no
add name="stop-link" on-event=drop467121444209 start-date=jan/01/1970 start-time=22:00:00 interval=1d comment="" \
    disabled=no

[ 本帖最后由 cracks 于 2007-11-4 13:30 编辑 ]
routeros
发表于 2005-8-10 11:44:48 | 显示全部楼层
实用!!
routeros
回复

使用道具 举报

发表于 2005-8-10 18:24:58 | 显示全部楼层
支持原创,,,实用
routeros
回复

使用道具 举报

发表于 2007-11-4 13:30:13 | 显示全部楼层
学习方法
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-12-22 13:21 , Processed in 0.042311 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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