I like to remotely enable/disable a firewall rule in my Mikrotik RB1100, OS6.4 form a VB.net application
in normal script language I use this :" ip firewall filter enable 14" where “14” is the filter number
How do I do in API commands.. since I want to make a VB.net program to do this on a distance, ( par ex in a school, to disable students to go to internet )
Tnx Janisk, for tip, but I allready tried this for a week now…
I cant find the right syntax, I Always get the wrong answer
I must admit that I am very new to this API language
I think this must be a simple thing, since I just have to disable or enable this rule nr 14…
cant you give any tips… ?
Tnx
easiest way to understand RouterOS API would be to migrate to it from CLI with few exceptions:
item numbers in API are special ID field that is permanent for entry and never ever changes.
there is no scripting support as most of the computational tasks will run faster on general purpose CPU rather than CPU optimized for networking.
From this, to address specific firewall filter you have to somehow identify the entry, for example, by setting up unique comment. Then you do print and from the returned filter find entry with your comment, use .id field to address that rule (make changes to it/disable/remove)