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

Create proper support for DNS cookies #6187

Open
pemensik opened this issue Jul 1, 2023 · 3 comments
Open

Create proper support for DNS cookies #6187

pemensik opened this issue Jul 1, 2023 · 3 comments

Comments

@pemensik
Copy link
Contributor

pemensik commented Jul 1, 2023

What would you like to be added:

Why is this needed:

  • Current implementation just echoes blindly DNS cookie back. It should omit it from EDNS header if it is unsupported or support it properly
  • Removing cookies is not possible now
  • It might help to recognize genuine queries from DDoS traffic.
  • It would be nice if queries forwarded could be added cookie, even if the original query had not that.
$ dig @localhost -p 3053 example.org

; <<>> DiG 9.18.16 <<>> @localhost -p 3053 example.org
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16131
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: bea8a078ee01bbbb (echoed)
;; QUESTION SECTION:
;example.org.			IN	A

;; ANSWER SECTION:
example.org.		65	IN	A	93.184.216.34

;; Query time: 7 msec
;; SERVER: ::1#3053(localhost) (UDP)
;; WHEN: Sat Jul 01 12:23:23 CEST 2023
;; MSG SIZE  rcvd: 79
  • ; COOKIE: bea8a078ee01bbbb (echoed) - means that is not correct.
  • ; COOKIE: 898840cdd4e68ec47225edce649fff45d88a9e10f0963a82 (good) - shows correct cookie in dig
@pemensik
Copy link
Contributor Author

pemensik commented Jul 1, 2023

Rate limiting plugin might use different limits for correct cookie responses.

@chrisohaver chrisohaver changed the title Create (proper) support for DNS cookies Create proper support for DNS cookies Jul 5, 2023
@Mo-Fatah
Copy link

Hi! Can this ticket be proposed as LFX mentorship project for term3 under CNCF ? I am interested in CoreDNS and I would love to participate if the team is interested in offering a mentorship opportunity. The deadline for the proposals is July 27, 2023. cncf/mentoring#1032

@ChinmayaSharma-hue
Copy link

Hi! I would like to work on this issue. Is this feature still needed?

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

No branches or pull requests

3 participants