@johnpoz
Q. where are you seeing this??
I'm actually see that in Graylog but the source of the data is pfSense / pfblocker Unified log, sent in real time. The data is not wrong, I was just trying to clarify the distinction of those named resolver. Sample screen shot of the log file on pfSense
Screen Shot 2024-08-29 at 6.35.57 PM.png
Q. And your forwarding in unbound.
Yes, I'm forwarding in unbound.
Q. What are you doing a query for? microsoft - from where??
A1. for microsoft.com (but it could be and is anything)
A2. in this case from the pfSense box with and without the server specified.
the response showing as resolver is the default
dig microsoft.com
the response is to and from 127 addresss and does a round trip next door (server in this reply shows as 127.0.0.1)
the second screen capture with the reply/cache is simply
dig microsoft.com (at)192.168.0.1
The responding server is just that 192.168.0.1 which is what clients would hit. in this case only the reply caused a query next door the other came from cache didn't even open the door.
Q. Where are you seeing this log that says resolver in it???
A. see first answer unless you mean something else.
Statement: there is no different between asking loopback or the IP unbound is listening on.
A. clearly there is
unbound-control -c /var/unbound/unbound.conf lookup forum.netgate.com
The following name servers are used for lookup of....
and I said (and maybe not clearly enough) all of mine are
unbound-control -c /var/unbound/unbound.conf lookup sample_in_question
"the following name servers are used for lookup of .... and it list the upstreams
the list of upstreams is different than the responding servers format you are showing.
so then
What I think the definition for the original question Resolver vs. Reply/Cache is:
when you specify a forward to (and maybe only if it is local) the query on the netgate with localhost (or 127.0.0.1) will always resolve by reaching upstream when the query is against itself on that interface and it reports that as "resolver" (perhaps because in the unified log 127.0.0.1 implies simply I'm going to resolved this, not questions asked about or regarding cache)
However when you hit the same unbound on the non-local IP (so 192.168.0.1) -- it says ah here is a query, let me look that up for you, I don't have it go upstream get it, cache the result- next query again = I have that in cache.
the dig structure as shown above is exactly the same except for explicit server on the 192.
no magic query or anything like that. The results are exactly the same except one says it came from 127.0.0.1 and the other from 192.168.0.1 -- queries against 127.0.0.1 in this setup are most assuredly going upstream every time (but I'm not worried about the response time) it's actual not any better or worse than those that return on 192.168.0.1 when it is asked and returns them via cache.
the only reason for the question in the first place was to determine the correct filters on the Graylog dashboard. Not really a question about the DNS query or answer. Just to confirm what the difference was. In talking to you and testing I okay with the answer what I think.
Screen Shot 2024-08-29 at 7.12.17 PM.png
As you can see the pfSense box, on its own does a bunch of queries by and for itself (so stuff running on the box, be that pretty much anything that hit 127.. (itself) of blocker, other stuff anything that runs their queries there.
the queries by and for clients is exactly that 55.1% go upstream and 38.6% are cache.
with the pfsense queries in there the numbers are wacked.
Clearly in this setup, I'm actually ok with the stuff to and from localhost being isolated and in fact talking upstream every time.. There is no issue with the performance and none of that pfsense dns traffic actually counts against a specific client IP anyway.. That is just the various pfsense bits doing their thing looking stuff up as they need to.
Even if my definition is wrong, and therefore based solely on the observation of what goes up and by whom, I'm really ok with the way it is working.
Thanks, even though you may not realize it a couple of things you said gave me some clues of things to look at. I needed that sounding board. So much appreciated.