Hi,
My Mikrotik version is 7.12
I want to delete all NAT rule that target to port n
for example I have 2 NAT rule like:I want to delete all rule that target to port 1001 like this:
error:I can remove all NAT rule like this:
ok:Seem like "to-ports" parameter in find function is useless
My Mikrotik version is 7.12
I want to delete all NAT rule that target to port n
for example I have 2 NAT rule like:
Code:
/ip/firewall/nat/add action=dst-nat chain=dstnat dst-port=2005 protocol=tcp in-interface=pppoe-mgr1 to-ports=1001/ip/firewall/nat/add action=dst-nat chain=dstnat dst-port=2006 protocol=tcp in-interface=pppoe-mgr1 to-ports=1001
error:
Code:
/foreach i in=[/ip/firewall/nat find to-ports=1001] do={/ip/firewall/nat/remove $i}
ok:
Code:
/foreach i in=[/ip/firewall/nat find action=dst-nat] do={/ip/firewall/nat/remove $i}
Statistics: Posted by anh7codon — Sat Dec 16, 2023 10:12 am