Mikrotik Blocking Social Media (FB, Twitter, Youtube Dsb) 1. Create Firewall filter ===============================================...
Mikrotik Blocking Social Media (FB, Twitter, Youtube Dsb)
1. Create Firewall filter
1. Create Firewall filter
====================================================
/ip firewall filter
add action=drop chain=forward comment="Blokir Akses Facebook" content=\
facebook disabled=no dst-port=80 protocol=tcp src-address=0.0.0.0/0 \
src-address-list="!Allow FB TW DLL"
add action=drop chain=forward comment="Blokir Akses Twitter" content=twitter \
disabled=no dst-port=80 protocol=tcp src-address=0.0.0.0/0 \
src-address-list="!Allow FB TW DLL"
add action=drop chain=forward comment="Blokir Akses Youtube" content=youtube \
disabled=no dst-port=80 protocol=tcp src-address=0.0.0.0/0 \
src-address-list="!Allow Youtube"
add action=drop chain=forward comment="Blokir Akses Streaming" disabled=yes \
dst-port=1935 protocol=tcp src-address=0.0.0.0/0 src-address-list=\
"!Allow Youtube"
====================================================
2. Input Ip that you want bypass firewall
====================================================3. Create Scripting for call scheduller
/ip firewall address-list
add address=192.168.0.50 disabled=no list="Allow FB TW DLL"
add address=192.168.0.78 disabled=no list="Allow Youtube"
====================================================
====================================================4. Create System Scheduller
/system script
add name=fb-allow policy=read,write,policy,test,sniff source="/ip firewall fil\
ter set [/ip firewall filter find content=\"facebook\"] disabled=yes"
add name=fb-deny policy=read,write,policy,test,sniff source="/ip firewall filt\
er set [/ip firewall filter find content=\"facebook\"] disabled=no"
add name=fb-holiday policy=read,write,policy,test,sniff source=":if ([/system \
scheduler get [/system scheduler find on-event=\"fb-deny\"] disabled] = tr\
ue) do [/system scheduler set [/system scheduler find on-event=\"fb-deny\"\
] disabled=no] else [/system scheduler set [/system scheduler find on-even\
t=\"fb-deny\"] disabled=yes]"
add name=tw-allow policy=read,write,policy,test,sniff source="/ip firewall fil\
ter set [/ip firewall filter find content=\"twitter\"] disabled=yes"
add name=tw-deny policy=read,write,policy,test,sniff source="/ip firewall filt\
er set [/ip firewall filter find content=\"twitter\"] disabled=no"
add name=tw-holiday policy=read,write,policy,test,sniff source=":if ([/system \
scheduler get [/system scheduler find on-event=\"tw-deny\"] disabled] = tr\
ue) do [/system scheduler set [/system scheduler find on-event=\"tw-deny\"\
] disabled=no] else [/system scheduler set [/system scheduler find on-even\
t=\"tw-deny\"] disabled=yes]"
add name=you-allow policy=read,write,policy,test,sniff source="/ip firewall fi\
lter set [/ip firewall filter find content=\"youtube\"] disabled=yes"
add name=you-deny policy=read,write,policy,test,sniff source="/ip firewall fil\
ter set [/ip firewall filter find content=\"youtube\"] disabled=no"
====================================================
====================================================
/system scheduler
add disabled=no interval=0s name=NICE on-event=":if ([:len [/file find name=ni\
ce.rsc]] > 0) do={/file remove nice.rsc }; /tool fetch url=http://ixp.mikr\
otik.co.id/download/nice.rsc; /import nice.rsc" policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=aug/24/2012 start-time=05:44:25
add disabled=no interval=1d name=fb-09:00 on-event=fb-deny policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/01/1970 start-time=09:00:00
add disabled=no interval=1d name=fb-12:00 on-event=fb-allow policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/01/1970 start-time=12:00:00
add disabled=no interval=1d name=fb-13:00 on-event=fb-deny policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/01/1970 start-time=13:00:00
add disabled=no interval=1d name=fb-18:00 on-event=fb-allow policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/01/1970 start-time=18:00:00
add disabled=no interval=1w name=fb-sabtu-minggu on-event=fb-holiday policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=aug/01/2009 start-time=00:00:00
add disabled=no interval=1w name=fb-senin on-event=fb-holiday policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=aug/03/2009 start-time=00:00:00
add disabled=no interval=1d name=tw-09:00 on-event=tw-deny policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/01/1970 start-time=09:00:00
add disabled=no interval=1d name=tw-12:00 on-event=tw-allow policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/01/1970 start-time=12:00:00
add disabled=no interval=1d name=tw-1300 on-event=tw-deny policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/01/1970 start-time=13:00:00
add disabled=no interval=1d name=tw-18:00 on-event=tw-allow policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/01/1970 start-time=18:00:00
add disabled=no interval=1w name=tw-sabtu-minggu on-event=tw-holiday policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=aug/01/2009 start-time=00:00:00
add disabled=no interval=1w name=tw-senin on-event=tw-holiday policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=aug/03/2009 start-time=00:00:00
add disabled=no interval=1d name=you-18:00 on-event=you-allow policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/01/1970 start-time=18:00:00
add disabled=no interval=1d name=you-13:00 on-event=you-deny policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/01/1970 start-time=13:00:00
add disabled=no interval=1d name=you-12:00 on-event=you-allow policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/01/1970 start-time=12:00:00
add disabled=no interval=1d name=you-09:00 on-event=you-deny policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/01/1970 start-time=09:00:00
====================================================
mau tanya mas> scrip schedulernya untuk apa dan kenapa harus pakai scheduler
ReplyDeletehahahha... maaf itu seharusnya dibuat untuk mementukan kapan firewall mati dan hidup, untuk scriptnya ada yang kurang yaitu /system scheduler
Deletejadi system scriptnya digunakan untuk memanggil fungsi /system scheduler. bisa dilihat untuk updatenya
terima kasih untuk mengingatkan :D