Winbox GUI Filter Feature / Button

Is my syntax off , or am i missing something when i try to filter an address , via the Winbox Filter, in /ip fire address-lists

(see attached screen shot)
reguardless of what i try to put here, i always end up with 0 results. (name filtering works fine however)

tks
winbox.JPG

I was struggling with similar issue but in my case it seems just a limitation.
I was trying to filter out rows in Connections by two filter rules linked with logical OR. Winbox seems to only use AND implicitly for its filter function with no way to use OR.
See what I’m talking about in terms of command line:
/ip firewall connection print where src-address~“^192\.168\.1\.2” or dst-address~“^1\.2\.3\.4”
not possible to recreate the “OR” in winbox GUI.
I find this as a serious limitation and would be glad to see it implemented. In the GUI I would see a list of matching rows dynamically refreshed without having to re-run a command periodically.
As I see it, it can be implemented by just allowing us to write the “where” clause for the filtering manually instead of adding conditions with the plus button etc.

As to your issue, I’m also unable to make this work unless I specify a full value as found in the list. But this is the same result if I use any of “in, is, contains”, which makes most options plain useless and superfluous.

In columns that have an IP address there is a filter “in” and “not in” that you should use for those purposes.
E.g. “Address in 192.168.0.0/16”

Ok, yes, but Contains does the same. Why then there is “contains”.. The filter comparison dropdown updates with new choices when you select another field (and type of it).
But ultimately, yes, if he wants to filter by 192, then he would put this in the field: 192.0.0.0/8 which is at least something.

What about using “OR” for linking multiple filter conditions?

Not really.
When the address is 123.192.10.8, “contains 192” would match. If it worked.
But “in 192.0.0.0/8” would not match.

That’s right. Just as “contains 192” does not work, this makes it useless in this case.
192.0.0.0/8 would match “192” only in the start of the address, which is what OP wants I guess.
If we have two addresses: 192.168.1.2 and 123.192.11.2, how would I match these two with one rule containig 192? No way. If I write two rules, they are linked with AND and I would not be able to write several conditions to match “192” in the four possible parts of the address.
This leads us to my problem with “OR” :slight_smile: .
Anyway, this would not be easy even if I had the chance to write 4 conditions because what this would require is something like .192..*

This may be a Bug that MT should fix.

As far as I can see, when selecting Address filter under Address List in WinBox, the drop-down contains does not work.

If I like to find all IP that contains 192, contains should be the word to select.
It should then find both:
192.168.88.1
10.192.44.32

in, only select ranges, like 192.168.88.0/24 and works well.
So what in the word are then contains and contains not used for??

contains should support regex.

There are many, many other limitations on what you can do with filters.
Probably they are determined by the workings of the underlying matching mechanism.
Remember an IP address internally in the system is just a 4-byte binary value. The “192” only exists in the ASCII conversion which is being done to display it.
When the filtering happens on the original data, and then the ASCII conversion is only done for those records that match the filtering criteria, the filter your propose is not so simple.
(it would be doable for the special case shown above, as the 192 can only appear in 4 places in the binary value, but what if one filters by 11? it could only be done on the ASCII string)

When you select the first column, you can select from address, comment, dynamic ++.
For all the field, the second column do change.
So since you can for address select contains and contains not.
For this reason it has to do something to the search, but I can not figure out how it works
If it does not work, fix it, or remove it.

thanks pe1chl, this does help as i had not tried this before (i just always assumed the winbox filter fuction is partially broken, which i do think it still is for the contains fuction).

funnything is i was coming back to the mt forums (in dec 2019) to post this exact same question again, but did a search first and saw i had already posted this issue/question in 2017!

mikrotik really does need to fix this, “contains” on filters just does not work, and it should.

MikroTik should explain what it means with contains in the firewall filter when address is selected.
I would say that this still is a bug and needs to be fixed.

Searching for address contains 192 should give positive on all these lines

192.168.0.1
10.192.20.45
16.23.192.53
72.100.20.192

This issue still persist, every time i need to filter IP address i faced this bug. Even if you try to filter with mask this does nothing.
Screenshot_20211221_145817.png
Screenshot_20211221_145753.png
Screenshot_20211221_145856.png
Screenshot_20211221_145837.png

Your input is wrong. When you use “in” you should use a valid subnet, so 10.11.31.0/24 not 10.11.31.252/24.
Winbox shows it is wrong by coloring it red.

Yes, you are using “in” wrong.
But there is a bug with “contains”. We will fix that

Jippi

Contains should work like the tilde ~ in most program.

Hi, good morning.
Did you fix that bug? Even on the winbox 3.35 this bug persists…

Still not working in 3.36…

winbox 3.37 still not works

Years go by and the contains filter is still NOT WORKING!