史萊姆論壇

史萊姆論壇 (http://forum.slime.com.tw/)
-   網路軟硬體架設技術文件 (http://forum.slime.com.tw/f133.html)
-   -   分時段控制局內網的指令碼 (http://forum.slime.com.tw/thread123584.html)

psac 2004-09-05 12:54 AM

分時段控制局內網的指令碼
 
限定某個IP段/單個IP的上網時間,比如:星期一到星期五,8:00-15:30可以上網,其它時間禁止的指令碼如下:


/ ip firewall src-nat add src-address=192.168.0.100/32 out-interface=INTERNET action=masquerade comment="by-100" disabled=no

/system script add name=start-100 source={
/ ip firewall src-nat set [ip firewall src-nat find src-address=192.168.0.100/32] disabled=no
}
/system script add name=stop-100 source={
/ip firewall src-nat set [ip firewall src-nat find src-address=192.168.0.100/32] disabled=yes
}


/system scheduler add interval=24h name="8:00" start-time=8:00:00 on-event=start-100
/system scheduler add interval=24h name="15:00" start-time=15:00:00 on-event=stop-100


所有時間均為台北時間。現在的時間是 12:30 PM

Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2024, Jelsoft Enterprises Ltd.

『服務條款』

* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *


SEO by vBSEO 3.6.1