small question ؟؟؟

I found the Following script to disable downloading when the number of users in reg -table are 20 and above and enable it at less than.




/ip proxy access
add action=deny comment=1 disabled=no path=.exe
add action=deny comment=1 disabled=no path=
.rar
add action=deny comment=1 disabled=no path=.zip
add action=deny comment=1 disabled=no path=
.mp3
add action=deny comment=“” disabled=no path=*.wav
/system scheduler
add comment=“” disabled=no interval=5m name=“disable download” on-event=“:if ([
:len [/interface wireless reg find]] >=20) do={/ip proxy access enable [/ip
proxy access find comment=1]\r
\n}” start-time=startup
add comment=“” disabled=no interval=5m2s name=“enable download” on-event=“:if (
[:len [/interface wireless reg find]]<=19) do={/ip proxy access disable [/i
p proxy access find comment=1]\r
\n}” start-time=startup




But I want to use it in Lan network
can any body edit this script to used in lan network

this script is for web proxy - it can block http only

i tray to add this script

/ip proxy access
add action=deny comment=1 disabled=no path=.exe
add action=deny comment=1 disabled=no path=
.rar
add action=deny comment=1 disabled=no path=.zip
add action=deny comment=1 disabled=no path=
.mp3
add action=deny comment=“” disabled=no path=*.wav

its deny to download any file Consists of (.exe .rar .zip .wave .mp3)
but the http working normaly
but this script


/ip proxy access
add action=deny comment=1 disabled=no path=.exe
add action=deny comment=1 disabled=no path=
.rar
add action=deny comment=1 disabled=no path=.zip
add action=deny comment=1 disabled=no path=
.mp3
add action=deny comment=“” disabled=no path=*.wav
/system scheduler
add comment=“” disabled=no interval=5m name=“disable download” on-event=“:if ([
:len [/interface wireless reg find]] >=20) do={/ip proxy access enable [/ip
proxy access find comment=1]\r
\n}” start-time=startup
add comment=“” disabled=no interval=5m2s name=“enable download” on-event=“:if (
[:len [/interface wireless reg find]]<=19) do={/ip proxy access disable [/i
p proxy access find comment=1]\r
\n}” start-time=startup


is valid only with wirless network
plz can any body make this script work with lan network


iwant to use it plz help me ???

what do you mean ‘only in wireless’? O_o there’s no difference between wireless and wired concerning the Internet. didn’t you forgot to add redirect rule for transparent proxy? http://www.mikrotik.com/testdocs/ros/3.0/pnp/proxy_content.php#.12

i mean look at the red word


/ip proxy access
add action=deny comment=1 disabled=no path=.exe
add action=deny comment=1 disabled=no path=
.rar
add action=deny comment=1 disabled=no path=.zip
add action=deny comment=1 disabled=no path=
.mp3
add action=deny comment=“” disabled=no path=*.wav
/system scheduler
add comment=“” disabled=no interval=5m name=“disable download” on-event=“:if ([
:len [/interface wireless reg find]] >=20) do={/ip proxy access enable [/ip
proxy access find comment=1]\r
\n}” start-time=startup
add comment=“” disabled=no interval=5m2s name=“enable download” on-event=“:if (
[:len [/interface wireless reg find]]<=19) do={/ip proxy access disable [/i
p proxy access find comment=1]\r
\n}” start-time=startup


this script mean if the router find the client >=20 online client enable the rule.
deny any request to download any file Consists of (.exe .rar .zip .wave .mp3)
from the internet
but the http is working normal




and if the client <=19 disable the rule





the rule is

/ip proxy access
add action=deny comment=1 disabled=no path=.exe
add action=deny comment=1 disabled=no path=
.rar
add action=deny comment=1 disabled=no path=.zip
add action=deny comment=1 disabled=no path=
.mp3
add action=deny comment=“” disabled=no path=*.wav



if you dont understand me

i need script if the router find the client over 20 client enable the rule
its make deny to path exe rar zip mp3 wav

/ip proxy access
add action=deny comment=1 disabled=no path=.exe
add action=deny comment=1 disabled=no path=
.rar
add action=deny comment=1 disabled=no path=.zip
add action=deny comment=1 disabled=no path=
.mp3
add action=deny comment=“” disabled=no path=*.wav


and if the client lees than 19 online client disable the proxy rule




i work at 3.13 and i have Lan network
2 interface

number 1 the name of it Lan its for switch
number 2 the name of it Wan its for internet

in the end i hope you can help me !!!

and very very very very thanks! mr Chupaka

oh, I see. do you have some authorization to count clients? like PPPoE, PPTP, Hotspot… then just replace

:len [/interface wireless reg find]

with

:len [/ppp active find]

or

[/ppp active print count-only]

im sory

its still not working

i have hotspot on pc i install mikrotik v 3.13

i add thes script after you edit it to my

/ip proxy access
add action=deny comment=1 disabled=no path=.exe
add action=deny comment=1 disabled=no path=
.rar
add action=deny comment=1 disabled=no path=.zip
add action=deny comment=1 disabled=no path=
.mp3
add action=deny comment=“” disabled=no path=*.wav

/system scheduler
add comment=“” disabled=no interval=5m name=“disable download” on-event=“:if ([len [/ppp active find]] >=20) do={/ip proxy access enable [/ipproxy access find comment=1]
\n}” start-time=startup
add comment=“” disabled=no interval=5m2s name=“enable download” on-event=“:if ([:len [/ppp active find]]<=19) do={/ip proxy access disable [/ip proxy access find comment=1]
\n}” start-time=startup

but its still not working

and i change it to
/system scheduler
add comment=“” disabled=no interval=5m name=“disable download” on-event=“:if ([len ppp active print count-only]] >=20) do={/ip proxy access enable [/ipproxy access find comment=1]
\n}” start-time=startup
add comment=“” disabled=no interval=5m2s name=“enable download” on-event=“:if ([:len [/ppp active print count-only]]<=19) do={/ip proxy access disable [/ip proxy access find comment=1]
\n}” start-time=startup



and very very very very thanks! mr Chupaka :frowning: :frowning: :frowning: :frowning: :frowning: :frowning: :frowning: :frowning: :frowning: :frowning:

omg… /ppp is for PPP =) if you use Hotspot, then write something like “/ip hotspot active” instead of “/ppp active”

:open_mouth:

i tray

:if [/ip hotspot active find ]] >=10)
do ip proxy access enable [/ip proxy access find comment=1]

and

:if [/ip hotspot active user ]] >=10)
do ip proxy access enable [/ip proxy access find comment=1]

the answer is

conditional is not boolean


:frowning: :frowning: :frowning:

well, let’s see you first message…

and now let’s replace “/interface wireless reg” with “/ip hotspot active”:

/system scheduler
add comment=“” disabled=no interval=5m name=“disable download” on-event=“:if ([
:len > [/ip hotspot active find]] >=20) do={/ip proxy access enable [/ip
proxy access find comment=1]\r
\n}” start-time=startup
add comment=“” disabled=no interval=5m2s name=“enable download” on-event=“:if (
[> :len > [/ip hotspot active find]]<=19) do={/ip proxy access disable [/i
p proxy access find comment=1]\r
\n}” start-time=startup

should work =-)