![Sad :(](./images/smilies/icon_sad.gif)
if firewall rule contains dstnat, source addres=192.168.91.160/27 protocol=6 (tcp) destination port=53 than move this rule to position 1... Could you help me with this script? litlle bit tough one for me. thank you in advance. Radek
heh, nothing easier than that:
assign both rules a comment, say "rule1" and "rule2".
Then move arrange them with the following command:
/ip fire filter move rule1 rule2
Edit:
There is also "find" command:
/ip fire filter move [/ip fire filter find dst-addres=10.0.0.0/8] rule1
/ip firewall filter move [find comment='rule0"] 0
/ip firewall filter move [find comment='rule1"] 0
/ip firewall filter move [find comment='rule2"] 0
/ip firewall filter move [find comment='rule3"] 0
/ip firewall filter move [find comment='rule4"] 0
/ip firewall filter move [find comment='rule5"] 0
/ip firewall filter move [find comment='rule6"] 0
/ip firewall filter move [find comment='rule7"] 0
/ip firewall filter move [find comment='rule8"] 0
/ip firewall filter move [find comment='rule9"] 0
Hi, yea.. I've been checking your post out, but its not working
no luck, the first one might work, but I've got 73 rules, and don't know where the rules are changing to and it not to say that it will change every time I reboot, so I cant make a startup schedule, it happened once on a dodgy power failure... I were unable to replicate the scenario ever since, if it reboots.. no issue... if I unplug the power.. no issue...sooo mikrotik weird1. only numbers can be specified. For example if you want to move rule 3 to first position:
/ip firewall nat move 3 0
2. use find command
/ip fire filter move [/ip firewall filter find comment=rule1] [/ip firewall filter find comment=rule2]