How to use /ip firewall nat find

Hello.

MT OS v.3.15. I try to write pearl script that will be change nat rule via ssh.
Question is: How can I find/delete specify rule?
For example:

[jaca@jaca] > /ip firewall nat print
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; blokada wisniewska
chain=dstnat action=dst-nat to-addresses=213.155.188.15 to-ports=82
protocol=tcp src-address=10.1.11.172 dst-port=0-65500

/ip firewall nat find src-address=10.1.11.172 - this command return empty result, why?

What i’m doing wrong? How to use find command to find and delete this rule?

Thank you.

[find]
usually used with another command like set

/ip firewall nat
set [find dst-address=1.2.3.4] disabled=yes

Thanks man, it works!

[jaca@jaca] /ip firewall nat> print
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; blokada wisniewska
chain=dstnat action=dst-nat to-addresses=213.155.188.10 to-ports=82
protocol=tcp src-address=10.1.11.172 dst-port=0-65500
[jaca@jaca] /ip firewall nat> remove [find src-address=“10.1.11.172”]
[jaca@jaca] /ip firewall nat> print
Flags: X - disabled, I - invalid, D - dynamic
[jaca@jaca] /ip firewall nat>


You’re great! :slight_smile: