Community discussions

MikroTik App
 
jo2jo
Forum Guru
Forum Guru
Topic Author
Posts: 1007
Joined: Fri May 26, 2006 1:25 am

Winbox GUI Filter Feature / Button

Tue Jun 06, 2017 5:16 am

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
You do not have the required permissions to view the files attached to this post.
 
rbnewfan
newbie
Posts: 28
Joined: Sat Oct 22, 2016 5:23 pm

Re: Winbox GUI Filter Feature / Button

Thu Aug 24, 2017 11:48 am

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.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Winbox GUI Filter Feature / Button

Thu Aug 24, 2017 11:53 am

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"
 
rbnewfan
newbie
Posts: 28
Joined: Sat Oct 22, 2016 5:23 pm

Re: Winbox GUI Filter Feature / Button

Thu Aug 24, 2017 12:00 pm

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?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Winbox GUI Filter Feature / Button

Thu Aug 24, 2017 12:08 pm

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"..
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.
 
rbnewfan
newbie
Posts: 28
Joined: Sat Oct 22, 2016 5:23 pm

Re: Winbox GUI Filter Feature / Button

Thu Aug 24, 2017 12:17 pm

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" :) .
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.*.*
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3343
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Winbox GUI Filter Feature / Button

Tue Jul 16, 2019 10:37 am

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.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Winbox GUI Filter Feature / Button

Tue Jul 16, 2019 11:24 am

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)
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3343
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Winbox GUI Filter Feature / Button

Tue Jul 16, 2019 12:24 pm

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.
 
jo2jo
Forum Guru
Forum Guru
Topic Author
Posts: 1007
Joined: Fri May 26, 2006 1:25 am

Re: Winbox GUI Filter Feature / Button

Sun Dec 22, 2019 12:59 am

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"
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.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3343
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Winbox GUI Filter Feature / Button

Wed May 13, 2020 9:45 pm

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
 
vetash
just joined
Posts: 6
Joined: Tue Feb 07, 2017 10:09 pm

Re: Winbox GUI Filter Feature / Button

Tue Dec 21, 2021 9:00 am

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.
You do not have the required permissions to view the files attached to this post.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Winbox GUI Filter Feature / Button

Tue Dec 21, 2021 11:32 am

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.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Winbox GUI Filter Feature / Button

Tue Dec 21, 2021 11:50 am

Yes, you are using "in" wrong.
But there is a bug with "contains". We will fix that
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3343
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Winbox GUI Filter Feature / Button

Tue Dec 21, 2021 12:08 pm

But there is a bug with "contains". We will fix that
Jippi

Contains should work like the tilde ~ in most program.
 
sbromulo
just joined
Posts: 3
Joined: Tue Mar 19, 2019 4:39 am
Location: Brazil

Re: Winbox GUI Filter Feature / Button

Wed Feb 23, 2022 2:08 pm

Yes, you are using "in" wrong.
But there is a bug with "contains". We will fix that
Hi, good morning.
Did you fix that bug? Even on the winbox 3.35 this bug persists....
 
homerouter
Frequent Visitor
Frequent Visitor
Posts: 69
Joined: Sun Dec 26, 2021 12:52 pm
Location: DK

Re: Winbox GUI Filter Feature / Button

Fri Jul 15, 2022 8:55 am

Yes, you are using "in" wrong.
But there is a bug with "contains". We will fix that
Still not working in 3.36...
 
mcskiller
newbie
Posts: 40
Joined: Mon Feb 13, 2012 7:12 am
Location: Argentina
Contact:

Re: Winbox GUI Filter Feature / Button

Thu Oct 13, 2022 6:36 am

Yes, you are using "in" wrong.
But there is a bug with "contains". We will fix that
winbox 3.37 still not works
 
zYx
just joined
Posts: 10
Joined: Thu Nov 23, 2023 7:23 pm

Re: Winbox GUI Filter Feature / Button

Fri Jul 19, 2024 1:20 am

Yes, you are using "in" wrong.
But there is a bug with "contains". We will fix that
Years go by and the contains filter is still NOT WORKING!

Who is online

Users browsing this forum: Alone65, anastasis, megabytenet, yhfung and 26 guests