Community discussions

MikroTik App
 
User avatar
Bitnik
just joined
Topic Author
Posts: 12
Joined: Sun Jan 21, 2007 12:48 pm

Need some cool, and true working script !

Mon Feb 19, 2007 2:18 pm

:) Hello people...

I'm searching for a script that will every day at time 11:30 will disable ONE or more users from UserList and then at 8:00 am will enable it again !!!

:roll:
PLZ - Write a full example of script, and how to run it, cose I'm noobie in scripting on MikroTik.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26954
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Mon Feb 19, 2007 2:41 pm

just make an ip address list of the users that you want to disable, and then a firewall rule that does `action=drop` on this list.

you will then have to make a very simple script - one that disables or enabled this firewall rule at a certain time.

Make address list:
/ip firewall address-list add list=drop_traffic address=192.0.34.166/32
Make drop rule:
/ip firewall filter add action=drop chain=forward src-address-list=drop_traffic comment=DROPME
Make script:
system script> add name=drop_users source=/ip firewall filter enable DROPME
Make scheduler rule:
system scheduler> add interval=24h name="drop_users" \
\... start-time=9:00:00 on-event=drop_users
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26954
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Mon Feb 19, 2007 2:45 pm

not tested, just a loose example !
 
User avatar
Bitnik
just joined
Topic Author
Posts: 12
Joined: Sun Jan 21, 2007 12:48 pm

Wed Feb 21, 2007 3:28 pm

:) Wow - thx IT REALY WORKS !!!!!!!

Here is another small question - is it possible to somehow control users conected to my server With MikroTik trough FTP?

I mean - can I create user that will only be able to connect to FTP and JUST read files from it, not delete or change them ?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26954
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Wed Feb 21, 2007 3:35 pm

you mean connect to mikrotik's ftp? sure, make user with the group that has privileges of only `ftp, read`. i guess it should work
 
User avatar
Bitnik
just joined
Topic Author
Posts: 12
Joined: Sun Jan 21, 2007 12:48 pm

HELP !

Wed Feb 21, 2007 11:08 pm

:cry: shuld work but - doesnt!

I got MikroTik 2.9.2 and many times tryed to do like you sayd but it really don't work - I still can delete files from that FTP ... Help...

And MOST IMPORTANT QUESTION - CAN I RUN PERL SCRIPTS ON MY MIKROTIK ??? if yes, then HOW and WHERE ? :roll:
 
User avatar
maximan
Trainer
Trainer
Posts: 543
Joined: Sat May 29, 2004 12:10 am
Location: Rio Cuarto, Argentina
Contact:

Fri Feb 23, 2007 1:13 am

Mikrotik it is a router. You can not run perl script. Only built script language is support..
Update to the last version.

Maximiliano Dobladez
MCC
 
leodand
just joined
Posts: 2
Joined: Fri Feb 16, 2007 2:33 pm

hola maxi

Fri Feb 23, 2007 10:45 pm

Mikrotik it is a router. You can not run perl script. Only built script language is support..
Update to the last version.

Maximiliano Dobladez
MCC
maxi como puedo contactar contigo, para hacerte alguna pregunta en especial del mkt?
 
User avatar
maximan
Trainer
Trainer
Posts: 543
Joined: Sat May 29, 2004 12:10 am
Location: Rio Cuarto, Argentina
Contact:

Fri Feb 23, 2007 10:56 pm

my mail is: elmaxi [at] gmail.com

Maxi