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: Select all
Code: Select all
/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
Code: Select all
/ip/firewall/nat/remove [/ip/firewall/nat find to-ports=1001]
Code: Select all
/ip/firewall/nat/remove [/ip/firewall/nat find action=dst-nat]
Code: Select all
/ip/firewall/nat/remove [/ip/firewall/nat find comment=1001]