Skip to content
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

Issue regarding logging of EDNS client subnet sent from Powerdns recursor #90

Closed
Deepanjalkumar opened this issue Jul 25, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@Deepanjalkumar
Copy link

Issue regarding capturing of DNS request sent from Powerdns recursor via protobufServer .
I can confirm that EDNS data sent from Powerdns recursor via protobufserver is working as the data has been observed via wireshark.
issue

@dmachard
Copy link
Owner

My bad, indeed the EDNS ClientSubnet exists in the protobuf definition.

OriginalRequestorSubnet []byte protobuf:"bytes,14,opt,name=originalRequestorSubnet" json:"originalRequestorSubnet,omitempty" // EDNS Client Subnet value (4 or 16 raw bytes in network byte order)

It will be ok for you if the original-requestor-subnet is added in the pdns section ?
By the way, can you share your recursor configuration ?

@dmachard dmachard added the enhancement New feature or request label Jul 25, 2022
@Deepanjalkumar
Copy link
Author

Sure here is the configuration file for Powerdns Recursor:
recursor.txt
For go-dns-collector configuration file:
config.txt

@dmachard
Copy link
Owner

Implemented in the beta release v0.22.0-beta6

I successfully tested with the following configuration

/etc/pdns-recursor/recursor.conf

ecs-add-for=0.0.0.0/0, ::/0
ecs-ipv4-bits=32
ecs-ipv4-cache-bits=32
ecs-ipv6-bits=128
ecs-ipv6-cache-bits=128v

edns-subnet-allow-list=.
use-incoming-edns-subnet=yes

local-address=0.0.0.0 ::
local-port=53

lua-config-file=/etc/pdns-recursor/recursor.lua

/etc/pdns-recursor/recursor.lua

protobufServer("192.168.1.15:6001", {exportTypes={pdns.A, pdns.AAAA, pdns.TXT}})
outgoingProtobufServer("192.168.1.15:6001", {exportTypes={pdns.A, pdns.AAAA, pdns.CNAME, pdns.NS, pdns.TXT}})

Test with dig command

dig @::1 www.google.fr +short +subnet=10.0.0.1/32

Finally in the json output, a new key is added in the pdns section


  },
  "pdns": {
    "tags": [],
    "original-request-subnet": "10.0.0.1"
  }
}

@Deepanjalkumar
Copy link
Author

Thanks Denis. It worked and thank you once again for the quick response and feedback on the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants