# Does anyone have an example of a Mikrotik router

**URL:** <https://discourse.nodered.org/t/does-anyone-have-an-example-of-a-mikrotik-router/12683>\
**Category:** General\
**Created:** [28 June 2019 10:13 UTC](https://discourse.nodered.org/t/does-anyone-have-an-example-of-a-mikrotik-router/12683 "2019-06-28T10:13:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tashbee](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tashbee](https://discourse.nodered.org/u/tashbee)\
**Post date:** [28 June 2019 10:13 UTC](https://discourse.nodered.org/t/does-anyone-have-an-example-of-a-mikrotik-router/12683/1 "2019-06-28T10:13:58Z")

</div>

Hi,  
I wonder if anyone out there can give me a syntax example of how to use the raw input to the node-red-contrib-mikrotik

For example how would I do the equivalent of  
/ip firewall filter enable numbers=1

Have looked everywhere and found nothing so any help would be appreciated.

Thanks

Tom

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [28 June 2019 12:31 UTC](https://discourse.nodered.org/t/does-anyone-have-an-example-of-a-mikrotik-router/12683/2 "2019-06-28T12:31:37Z")

</div>

Looking at the github page:

`This is an alfa verion. Available actions: log, resources, wifi, connections, reboot, raw.`

---

<div class="post-metadata">

**Author:** ![tashbee](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tashbee](https://discourse.nodered.org/u/tashbee)\
**Post date:** [28 June 2019 14:02 UTC](https://discourse.nodered.org/t/does-anyone-have-an-example-of-a-mikrotik-router/12683/3 "2019-06-28T14:02:35Z")

</div>

Hi,

In the documentation it seems to suggest that "Raw" will do it for me.... Am I missing something ?

- **Raw:** uses `msg.payload` as command. To pass command with parametrs use JSON object with _"command"_ property as `msg.payload` . For example: _{"command":["/system/script/run","=.id=myscript"]}_ . This example runs script _myscript_

So I thought something like this wold work, but I can't get it to do so.

msg.payload='{"command":["/ip/firewall/filter/disable","numbers=1"]}.';

Regards

Tom

---

<div class="post-metadata">

**Author:** ![tashbee](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tashbee](https://discourse.nodered.org/u/tashbee)\
**Post date:** [28 June 2019 15:58 UTC](https://discourse.nodered.org/t/does-anyone-have-an-example-of-a-mikrotik-router/12683/4 "2019-06-28T15:58:05Z")

</div>

For anyone's future reference it's the following using the raw input

msg.payload=['/ip/firewall/filter/disable','=numbers=\*1'];

---

<div class="post-metadata">

**Author:** ![gmaguire](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gmaguire](https://discourse.nodered.org/u/gmaguire)\
**Post date:** [15 October 2019 12:34 UTC](https://discourse.nodered.org/t/does-anyone-have-an-example-of-a-mikrotik-router/12683/5 "2019-10-15T12:34:49Z")

</div>

Hi, Would you mind posting a fully flow of how you have implemented this please as I have been trying unsuccessfully to implement this and I cannot seem to get the format correct ?

Thanks.

---

<div class="post-metadata">

**Author:** ![gmaguire](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gmaguire](https://discourse.nodered.org/u/gmaguire)\
**Post date:** [15 October 2019 20:02 UTC](https://discourse.nodered.org/t/does-anyone-have-an-example-of-a-mikrotik-router/12683/6 "2019-10-15T20:02:36Z")

</div>

I managed to figure it out, for those searching for help like me, I put the details that tashbee provided into a Node Red Function block as follows.

msg.payload=['/ip/firewall/filter/disable','=.id=\*Test'];  
return msg;

Thanks tashbee

---

<div class="post-metadata">

**Author:** ![ckishappy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ckishappy/32/25685_2.png) [@ckishappy](https://discourse.nodered.org/u/ckishappy)\
**Post date:** [30 January 2021 22:38 UTC](https://discourse.nodered.org/t/does-anyone-have-an-example-of-a-mikrotik-router/12683/7 "2021-01-30T22:38:26Z")

</div>

Hi, I put it in a change node (json) like this and this works well:

```auto
[
    "/ip/firewall/address-list/disable",
    "=numbers=*22"
]

```

Note this is for disabling list number 22 here in my case. Question I would have is how do you put multiple numbers into the same function, i.e. how could I disable let's say list 1 and 22?

---

<div class="post-metadata">

**Author:** ![omalisson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/omalisson/32/32797_2.png) [@omalisson](https://discourse.nodered.org/u/omalisson)\
**Post date:** [18 June 2021 10:42 UTC](https://discourse.nodered.org/t/does-anyone-have-an-example-of-a-mikrotik-router/12683/8 "2021-06-18T10:42:46Z")

</div>

Thank you for your contribution Friend!! Very enlightening!  
Now in a similar scenario I need to disable the route based on the comment as I do via the command line (/ip route disable numbers=[find comment="WAN1"]) but I'm not getting it using the same logic (msg.payload=['/ip/route/disable','=numbers=[find comment="TST"]']😉  
How can I fix this?;
