• MikroTik.com
  • RouterBOARD
  • User Meeting
  • Training
  • User Manual
  • Support
  • Downloads
  • Videos
Register |   * Login | HOME

View unanswered posts | View active topics

Effectiveness of a script policy? Scheduler policy?  Page 1 of 1
 [ 5 posts ]  Post new topic Reply to topic
  Print view Previous topic | Next topic 
Author Message
elgo
 Post subject: Effectiveness of a script policy? Scheduler policy?
PostPosted: Tue Mar 20, 2012 2:08 pm 
Offline
Member Candidate
Member Candidate
User avatar

Joined: Sat Apr 02, 2011 1:34 am
Posts: 151
Karma: 4

Location: France
Hi,

I just wrote a short script to refresh the SMTP server IP address from its FQDN (since routerOS won't access anything except an @IP...), and see something strange: script policy is "read,test", but it still can change email server setup when run directly from CLI...
Code:
name="script-SMTPrefresh" owner="elgo" policy=read,test last-started=mar/20/2012 12:56:12 run-count=4
     source=
       # refresh SMTP server address used for email notifications
       # because email parameter can't be a FQDN but only an IP address
       :local smtp [:resolve ("smtp.gmail.com")]
       /tool e-mail set address=$smtp
       :log info ("SMTP server updated: ".$smtp)


Why is this script behaving like it has "write" policy applied? Are script policies even effective?

Now, another question: what does a scheduler policy mean? Why would it be different from the script it runs?

_________________
RB450G - OpenWrt (so much more stable than with routerOS)
-> now: UBNT EdgeRouter Lite

(very unlikely to be MT customer again in the future)


Top
 Profile  
 
leonset
 Post subject: Re: Effectiveness of a script policy? Scheduler policy?
PostPosted: Thu Mar 22, 2012 1:10 pm 
Offline
Member Candidate
Member Candidate

Joined: Wed Apr 01, 2009 8:09 pm
Posts: 117
Karma: 3
Maybe it's because it needs to "write" a value into the smtp variable.

The only policies that I really use are "reboot" and "sensitive", the later to hide it from exports if the contain any kind of sensitive data like passwords, local IP's or whatever.


Top
 Profile  
 
elgo
 Post subject: Re: Effectiveness of a script policy? Scheduler policy?
PostPosted: Thu Mar 22, 2012 3:59 pm 
Offline
Member Candidate
Member Candidate
User avatar

Joined: Sat Apr 02, 2011 1:34 am
Posts: 151
Karma: 4

Location: France
leonset wrote:
Maybe it's because it needs to "write" a value into the smtp variable.

I may have not been really clear: my script should need the "write" policy (it changes a parameter value), but it hasn't, and still behave like it has it (since the value is finally changed).

_________________
RB450G - OpenWrt (so much more stable than with routerOS)
-> now: UBNT EdgeRouter Lite

(very unlikely to be MT customer again in the future)


Top
 Profile  
 
elgo
 Post subject: Re: Effectiveness of a script policy? Scheduler policy?
PostPosted: Thu Mar 29, 2012 10:51 am 
Offline
Member Candidate
Member Candidate
User avatar

Joined: Sat Apr 02, 2011 1:34 am
Posts: 151
Karma: 4

Location: France
OK, so as far as I can see, nobody uses "scheduler policy" or "script policy" features, because, let's try to guess, it's not working the way it's supposed to be? Because as it's not a widely used feature, so as it usually happens in MT world, regressions aren't detected before long and nobody cares fixing them before even longer?
I know it's "only" supposed to be a security feature, but still, I don't get it.

Somehow it reminds me of the "VLAN-MODE" switch chip feature that you "should" set to "fallback" and not "secure" or... you'll get serious issues.

_________________
RB450G - OpenWrt (so much more stable than with routerOS)
-> now: UBNT EdgeRouter Lite

(very unlikely to be MT customer again in the future)


Top
 Profile  
 
ManyX
 Post subject: Re: Effectiveness of a script policy? Scheduler policy?
PostPosted: Sun Jul 01, 2012 10:47 am 
Offline
Frequent Visitor
Frequent Visitor

Joined: Sat Jan 07, 2006 12:48 pm
Posts: 97
Karma: 2

Location: PolanD
I wants to add the policy to my client devices schedulers by automat

When I import by hand file with policy is work

Code:
import file-name=file.rsc


but
when I write script to upload script from ftp server to change policy
it DON'T WORK!!!

Code:
/tool fetch upload=no mode=ftp ascii=no address=1.1.1.1 user=ftp password=ftp src-path=file.rsc dst-path=file.rsc;
import file-name=file.rsc;


file.rsc
Code:
/system scheduler set scheduler1 policy=sniff,telnet;


I am increasingly convinced that the ROS is like Swiss cheese full of holes


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  Page 1 of 1
 [ 5 posts ] 

Board index » RouterOS » General

All times are UTC + 2 hours


Who is online

Users browsing this forum: Google [Bot] and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Karma functions powered by Karma MOD © 2007, 2009 m157y