hzkane 发表于 2005-8-10 11:36:35

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

先是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 departmentup4-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 编辑 ]

zhanghui 发表于 2005-8-10 11:44:48

实用!!

lovellh 发表于 2005-8-10 18:24:58

支持原创,,,实用

cracks 发表于 2007-11-4 13:30:13

学习方法
页: [1]
查看完整版本: 原创:定时限制内网某些ip上网控制脚本---脚本的风采