:global FirewallNatAction do={
:global actionValue;
:set actionValue $actionValue;
:put $actionValue
:execute "/ip firewall nat $actionValue [find comment~\"hack_dns\"]" as-string
}
$FirewallNatAction actionValue=enable
Code:
/ip firewall nat disable [find where comment~"hack_dns"]
Code:
:global FirewallNatAction do={ :execute "/ip firewall nat $1 [find where comment~\"hack_dns\"]"}$FirewallNatAction enable
Or disable/enable
Code:
/ip firewall nat find [set [find where comment~"hack_dns"] disabled=(!($disabled))]
Statistics: Posted by rextended — Tue Jun 04, 2024 3:00 am