Dear Sir’s
I am new here and I need some Help. I have two questions:
First:
I want to make a script for block mp3 files download
During two hours in the morrining from 8:00 to 10:00.
I use this web-proxy code to block download:
[admin@MikroTik] ip web-proxy access> add url=“*.mp3” action=deny
any time except these two hours the mp3 files download
should be enables.
Second:
How to do the same code for a range of ip’s
Thanks in advance
Eng. Amgad
Dont get me wrong, i am a novice too, just a shot in the dark… create an address list?
normis
April 7, 2009, 9:00am
3
tashielb:
Dont get me wrong, i am a novice too, just a shot in the dark… create a transparent proxy, ie catch all out going traffic and nat to 8080 and schedule a script to enable?
yes, like that.
if you want these limitations to apply only to a certain number of addresses, make the NAT rule forward only those addresses to the transparent proxy
Dear Sir’s
As I am new on microtik, Can you please give me codes for this
“create a transparent proxy, ie catch all out going traffic and nat to 8080 and schedule a script to enable”
“make the NAT rule forward only those addresses ( say 172.30.4.30-172.30.4.80) to the transparent proxy”
I do not know how to write this codes
Sorry for asking again
Thanks
Eng. Amgad
normis
April 7, 2009, 10:22am
5
First of all thanks for your quick respond
I use this web-proxy code to block download:
[admin@MikroTik] ip web-proxy access> add url=“*.mp3” action=deny
And this work for me very well
Can we start from this code and made a schedule for it.
Thanks
Amgad
normis
April 7, 2009, 11:23am
7
I see you use 2.9, you need to upgrade to v3 to be able to use my examples
yes sir you are right I use ver 2.9 and I will Upgrade.
But I have one question
If I upgrade could I keep My setting keep my setting or not.
I have mikrotik ver 3.2 and I install it to VMware for test after
test I will install to real machine.
thanks
Eng. Amgad
Mr Normis
I have finished install mikrotik ver 3.2, I make basic setting.
the internet now is working on one client PC.
I notice that There is no proxy menu under ip, but there are WEB PROXY.
in old version there was a proxy and web proxy menus under ip.
Now I want start with
a script for block mp3 files download
During two hours in the morrining from 8:00 to 10:00.
Eng. Amgad
normis
April 8, 2009, 9:32am
10
follow this guide to set up access lists:
http://wiki.mikrotik.com/wiki/How_to_Block_Websites_%26_Stop_Downloading_Using_Proxy
Once it’s working, you can create a scheduler rule that will disable these rules at certain times of day;
http://www.mikrotik.com/testdocs/ros/2.9/system/scheduler.php
mrz
April 8, 2009, 10:51am
11
Lets say you have proxy access rule that blocks mp3. Add coment to this rule for example “mp3”. Now you can write a script
# add scripts
/system script
add name=disable_rule source={ /ip proxy access disable [find comment="mp3"] }
add name=enable_rule source={ /ip proxy access enable [find comment="mp3"] }
#add scheduler
/system scheduler
add name="block-mp3" on-event="enable_rule" start-time=8:00:00 interval=24h
add name="allow-mp3" on-event="disable_rule" start-time=10:00:00 interval=24h
Dir Mr Mrz
your codes is very good it works with me very good even
on my mikrotik ver 2.9.
now the schdule is working fine.
Still I need only one thing :
How to make web-proxy rule for address range (172.30.4.30-172.30.4.54)
I try the links that Mr. normis give to me but I think they are about
another issue.
Thanks
Eng. Amgad