-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
Track DNS queries and prefer the queried name rather than a CNAME #176
Comments
I think #116 is required before this can be done, or at least done efficiently. But I agree, it's a lot more useful to make decisions when you're presented with a domain name rather than an IP address. Edit 2: Wait, are you saying that you do see a domain name when you get the allow/deny prompt? I had thought that your issue was regarding no domain names being displayed at all, since that is an issue that I am seeing. Apparently the facilities already exist for tracking DNS to connect IP addresses to domains, but because the rule for capturing DNS in iptables is too low in the chain, it was not working for me. I made a modification to the iptables rule placement, and you can see the before and after attached (where one does not show a domain name and one does.) Is this the issue you were having, or part of it? Edit 3: Bummer, looks like I can't upload files. Well, one simply says:
And the other says:
|
To clarify, this is a feature request rather than a bug. I am talking about outgoing connections. The current code looks for records where the IP address is the value for an I would like some slightly more complex logic/state to track which If it can't find a request that matches the response, then defaulting to the current behaviour of just showing the DNS host in the |
Check out https://github.com/Northern-Lights/opensnitch/tree/syscall-fix. Not sure why the update to the branch isn't showing up in the PR and being referenced here, but I basically put CNAMEs into the map to try to keep going back to the "root" domain. It works, showing Edit: guess it takes a moment for it to show up in the PR... |
@gustavo-iniguez-goya I am not currently using opensnitch and I would not be able to setup a test environment for a few weeks at least. If you are confident that it is fixed, then feel free to close this issue. |
well, we have now deb, rpm and aur packages ;) Latest versions obtain the domains that an application is trying to resolve (without waiting for the DNS response), which is one of the things you requested. We only display one domain on the pop-ups, but as far as I can tell, I haven't seen more than one.
once a domain is resolved, we save all the IPs and records, but it may be there several domains for the same IP. There's no logic to get the correct domain in such case. I haven't noticed any problem with this though. I'll close it now, but if you have the chance to test it again and notice any problem or that this feature/bug is incomplete, please open a new issue. Thank you! |
It would be useful to track original DNS queries, and prefer the names that were queried for when making a rule, rather than only observing the DNS responses, which can link the IP address to a separate
CNAME
, rather than the original.In my example, the query was for
s3.amazonaws.com
, which sends aCNAME
response back to adds3-1.amazonaws.com
to the chain, and assigns the IP address to that.s3.amazonaws.com
was included in the response, but was not shown in the opensnitch user interface, which instead showeds3-1.amazonaws.com
. In this case, it isn't too difficult to identify, but for others, theCNAME
may not be useful for deciding whether to allow the request or not:In addition, if I want to create a permanent rule, I would prefer to make it on the DNS name that was actually requested rather than the
CNAME
, which the website owner could change over time.The text was updated successfully, but these errors were encountered: