-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Site traffic classified as CDN #214
Comments
I received your traffic sample. |
Please show the output |
Sure, here is the output:
This is in a custom chain in the filter table. Packets marked 0x40 are sent here from the FORWARD table. This rule will add the metadata to |
What command did you use to create the rules
Where does "proto all" come from? In order to understand where the error is, you need a test setup and traffic samples or
|
These are the commands that I used to create those rules:
The "proto all" part comes from "ndpi --all" and in theory it should match any "onet.pl" traffic regardless of the protocol. Thanks for the debugging tips, I'll also try to debug this a bit more on my end to see what rules are being triggered here. |
The "--host" option does not require the "--all" option. |
Tried giving the latest commit a go but no luck there so far, still the same behaviour as before. Sounds good, if I also manage to find anything on my end in the meantime then I'll let you know. |
Describe the bug
I have these two rules as part of a chain in my mangle table:
The first rule should match any
onet.pl
traffic and mark the packet with 0x40 to be dropped later, blocking the site.The second rule should match
amazonaws
traffic and mark the packet with 0x30 to allow it.However with both of these rules, it seems like the traffic to
onet.pl
is being classified asamazonaws
instead of falling under the first rule and the packets are not being dropped. If I remove the second rule then the traffic is classified asonet.pl
as expected and the packets are being dropped correctly.I would expect that the traffic should be matching the first rule and dropping the packets. A similar issue can also be seen on other sites using CDNs (e.g rule 1 matching
amazon.com
and rule 2 matchingamazonaws
). Adding a first rule to match the site and then adding a second rule to match the CDN will result in all or most site traffic being classified as the CDN rather than the site. Is this a potential misclassification issue or might there be something else going on? Perhaps there is a better approach for implementing what I'm looking for here?Expected behavior
Site traffic is classified separately from CDN traffic
Obtained behavior
Site traffic is being classified as CDN traffic
nDPI Environment (please complete the following information):
How to reproduce the reported bug
Reproducible using ndpiReader?
If your bug is reproducible using a pcap, please attach a pcap file (or a valid link to download it)
Example: site_traffic.zip
The text was updated successfully, but these errors were encountered: