Edit values with a script

It’s easy to change a variable via terminal, since it opens a text-editor.
What I want to do is write down script, so I can schedule it.

Script:
e.g.

admin@MikroTik] /ip firewall filter> edit number=6 value-name=action

I need to change action value-name from (default)

action=drop

to

action=accept

Is it possible?How to write this?
Sorry for my ignorance, I’m a newbie!

Easy.. I’m on my phone now though. I can post tonight. But explain exactly what your want to do…


Sent from my SCH-I545 using Tapatalk

You can set (edit) a firewall rule like this:

/ip firewall filter set action=accept number=6

The same way for drop

/ip firewall filter set action=drop number=6

I prefer to use find option for set a firewall rule because maybe the orden of the rules is changed so you set another rule. For this is:

/ip firewall filter set action=drop [find comment=“rule to change”]

sent from my mobile phone with tapatalk

Thank you c0d3rs
You understand what I mean, it works!

I edit the post for more info. Check again

sent from my mobile phone with tapatalk