Memberikan Batasan Akses Lewat Scheduller yang menjalankan script sesuai waktu yang ditentukan
Test case : facebook limiter
Membatasi pengaksesan facebook pada jam tertentu
Memberikan setting waktu yang tepat sesuai dengan daerah, setting NTP (Network Time Protocol) supaya script dijalankan tepat sesuai dengan waktu yang telah ditentukan :
/system ntp client set primary-ntp=203.160.128.6 secondary-ntp=202.169.224.16 \ mode=unicast enabled=yes;
Memberikan aturan blokir facebook
/ip firewall filter add chain=forward src-address=0.0.0.0/0 protocol=tcp \ dst-port=80 content="facebook" action=drop comment="Blokir Akses Facebook";
Buat script dengan aturan, cari content yang berisi “facebook” dan rubah aturan disable dari aturan itu
/system script add name="fb-allow" policy=write,read,policy,test,sniff source={/ip firewall filter set [/ip firewall filter find content="facebook"] disabled=yes}
/system script add name="fb-deny" policy=write,read,policy,test,sniff source={/ip firewall filter set [/ip firewall filter find content="facebook"] disabled=no}
/system script add name="fb-holiday" policy=write,read,policy,test,sniff source={:if ([/system scheduler get [/system scheduler find on-event="fb-deny"] disabled] = true) do [/system scheduler set [/system scheduler find on-event="fb-deny"] disabled=no] else [/system scheduler set [/system scheduler find on-event="fb-deny"] disabled=yes]}
Buat scheduler
/system scheduler add name="fb-08:00" start-date=jan/01/1970 start-time=08:00:00 interval=1d on-event="fb-deny"
/system scheduler add name="fb-12:00" start-date=jan/01/1970 start-time=12:00:00 interval=1d on-event="fb-allow”
/system scheduler add name="fb-13:00" start-date=jan/01/1970 start-time=13:00:00 interval=1d on-event="fb-deny"
/system scheduler add name="fb-14:00" start-date=jan/01/1970 start-time=14:00:00 interval=1d on-event="fb-allow"
/system scheduler add name="fb-minggu" start-date=oct/25/2009 start-time=00:00:00 interval=7d on-event="fb-holiday"
/system scheduler add name="fb-senin" start-date=oct/26/2009 start-time=00:00:00 interval=7d on-event="fb-holiday"
EmoticonEmoticon