-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
[FR] Specify if the order of entries in an RPZ file matters #935
Comments
I actually have a similar situation where is seems like any "Blocking" rule super seeds "permissive" rules like the There can be a numerous good arguments for why this is, however, in my case I maintenance a local rpz zone that differs from my projects records
Whereas the @matrix project have the following records
Expected behaviour is to get the PASSTRUE = the IP for both While the log for sure show what actually happens.
The question is now, how can the expected output be accommodated by using the RPZ standard rules? is this a request for a weight system, from where a list with the weight of 0 supersedes other lists? (As Zero is the first number in the IT universe and stays first in line) |
@zacknewman, the order of records in a single RPZ file does not matter. An RPZ file is just a regular zone file with extra metadata information. In your example @spirillen, I believe you are talking about different rpz feeds (different |
Yeah, it appears to be the case that the most specific match wins regardless; so even though |
Note that a wildcard in DNS is not the same as a wildcard in regular expressions for example.
A query for The same wildcard rules apply to RPZ files. |
Foolishly I treated wildcards like a wildcard in a regular expression; hence the opening of this issue. Had I not been ignorant, I wouldn't have opened this. Apologize for the noise. |
No problem! You would be surprised how often DNS people (including me) are bitten by wildcard semantics. |
* nlnet/master: (66 commits) - Tag for release 1.21.0, the repository continues with 1.21.1 in development. - Fix spelling for the cache-min-negative-ttl entry in the example.conf. - Fix that for windows the module startup is called and sets up the module-config. - Set version number to 1.21.0 for release. - Fix CacheFlush issues with limit on NS RRs. Thanks to Yehuda Afek, Anat Bremler-Barr, Shoham Danino and Yuval Shavitt (Tel-Aviv University and Reichman University). - Fix CAMP issues with global quota. Thanks to Huayi Duan, Marco Bearzi, Jodok Vieli, and Cagin Tanir from NetSec group, ETH Zurich. - Fix that alloc stats for forwards and hints are printed, and when alloc stats is enabled, the unit test for unbound control waits for reloads to complete. Changelog note for NLnetLabs#1090 - Merge NLnetLabs#1090: Cookie secret file. Adds `cookie-secret-file: "unbound_cookiesecrets.txt"` option to store cookie secrets for EDNS COOKIE secret rollover. The remote control add_cookie_secret, activate_cookie_secret and drop_cookie_secret commands can be used for rollover, the command print_cookie_secrets shows the values in use. Cookie secret file (NLnetLabs#1090) Update changelog. - Fix testbound for alloc stats strdup in util/alloc.c. - Fix testbound for alloc stats strdup in util/alloc.c. - Fix that alloc stats has strdup checks, it stops debuggers from complaining about mismatch at free time. - Fix that the worker mem report with alloc stats does not attempt to print memory use of forwards and hints if they have been deleted already. - Fix dnstap test program, cleans up to have clean memory on exit, for tap_data_free, does not delete NULL items. Also it does not try to free the tail, specifically in the free of the list since that picked up the next item in the list for its loop causing invalid free. Added internal unit test to unbound-dnstap-socket for that. - Fix for NLnetLabs#1114: Fix that cache fill for forward-host names is performed, so that with nonzero target-fetch-policy it fetches forwarder addresses and uses them from cache. Also updated that delegation point cache fill routines use CDflag for AAAA message lookups, so that its negative lookup stops a recursion since the cache uses the bit for disambiguation for dns64 but the recursion uses CDflag for the AAAA target lookups, so the check correctly stops a useless recursion by its cache lookup. - Fix to document parameters of auth_zone_verify_zonemd_with_key. - Add root key 38696 from 2024 for DNSSEC validation. It is added to the default root keys in unbound-anchor. The content can be inspected with `unbound-anchor -l`. - For NLnetLabs#935 and NLnetLabs#1104, clarify RPZ order and semantics. - Cleanup ede.tdir test. - Fix link of unbound-dnstap-socket without openssl. ...
Current behavior
unbound.conf(5)
does not state whether the order of the entries in a Response Policy Zone (RPZ) file matters. While in the Response Policy Zone Options section, it states "RPZ clauses are applied in order of configuration"; it would be nice to know if the order of entries in a given file is also adhered to.Describe the desired feature
Explicitly state whether the order of RPZ file entries matters.
Potential use-case
I am using
unbound
as both a recursive resolver and "ad blocker". When having a wildcard entry that corresponds to one RPZ action (e.g.,CNAME .
), one may want to perform a different action on specific subdomains (e.g.,CNAME rpz-passthru.
). As an explicit example, what is the outcome of a DNS query forwww.example.com
based on an RPZ file that looks like below?If the order of entries matters, then the query will be resolved normally; however if the order of entries does not matter, then sometimes the response will be
NXDOMAIN
and other times it will be resolved normally. It would be nice to know either way.Based on a very small sample size, it appears that the order does matter; but that can be a fluke and so I would like to know for certain if one can actually rely on that always being the case.
The text was updated successfully, but these errors were encountered: