use CLI to change /ip service

Hallo :slight_smile:
Can you help me advice how to do?
Situation:
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh address=10.100.0.0/24,10.60.0.0/24
set api disabled=yes
set winbox address=192.168.80.11,192.168.80.14, 10.0.0.1/30
set api-ssl disabled=yes

What command should I use to change by CLI what is above to what is below?
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set winbox disabled=no
set api-ssl disabled=yes

Thank you a lot. :slight_smile:

One tip, you can use at the command line to help figure out commands at the terminal. And the key will show help on the attributes (sometimes).

But clear the winbox allowed addresses, that is just

/ip service set winbox address="" disabled=no

And you could repeat that pattern for the other services to disable e.g.

/ip service set ssh disabled=yes
/ip service set telnet disabled=yes
/ip service set ftp disabled=yes

(and continue with rest)

A more sophisticated approach can use “find” operation to disable everything EXCEPT winbox in one command:

/ip service set [find name!="winbox] disabled=yes

You have already below the list of the commands…
Simply paste the below on terminal…

and also this:

/ip service
set ssh address=""
set winbox address=""

Thank you for help.

/ip service set [find name!=“winbox”] disabled=yes

Thank you a lot. :slight_smile: