Skip to content

ECS not used when reponse is cached #2140

Description

@ertanden

I have configured my OPNSense router to upstream DNS queries to Blocky. I have setup ECS and I verified that OPNSense sends the right ECS information, basically clientIPs with subnet /32.

However, in Blocky query logs, when the response is cached, the clientIp is not the actual clientIp from ECS, but the opnsense ip. Also clientName somehow always is showed as opnsense, even though I have clientLookup configured.

Cached response log:

2026-06-24 20:17:00 192.168.11.1 opnsense 0 CACHED www3.l.google.com. A (192.178.170.101), A (192.178.170.100), A (192.178.170.113), A (192.178.170.102), A (192.178.170.139), A (192.178.170.138) NOERROR CACHED A blocky

Not cached reponse log:

2026-06-24 20:13:36 192.168.11.53 opnsense 19 RESOLVED (tcp-tls:1.1.1.1) accounts.google.com. AAAA (2a00:1450:4001:c21::54) NOERROR RESOLVED AAAA blocky

Related config i have:

ecs:
  useAsClient: true
  forward: false

clientLookup:
  upstream: 192.168.11.1

queryLog:
  type: csv
  target: /app/logs
  logRetentionDays: 7
  flushInterval: 30s

Am I doing something wrong? Or could this be a potential issue?

Activity

  1. added this to the v0.33.0 milestone on Jun 24, 2026
  2. 0xERR0R commented on Jun 24, 2026

    @0xERR0R
    Owner

    Thanks for reporting, looks like it is a regression bug which was introduced in v0.29.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions