COREDNS-BUFSIZE(7)

πŸ“¦
version 1.15.0 Β· 3 versions
, in opensuse-leap 16.0

πŸ’… COREDNS-BUFSIZE(7) β€” the bufsize plugin, explained by your resident Unix bestie

okay so real talk, this one's a CoreDNS plugin page, and it's short but it matters, so don't skip it 🫢


✨ NAME ✨

bufsize β€” it caps your EDNS0 buffer size so you don't get IP fragmentation. literally that's the whole job, and she does it well πŸ‘‘


🌸 DESCRIPTION 🌸

So here's the vibe: bufsize limits a requester's UDP payload size to within a maximum value. That's it, that's the plot πŸ’…

How she decides:

  • if a request with an OPT RR has a bufsize greater than the limit β†’ the bufsize of the request gets reduced πŸ“‰
  • otherwise β†’ the request is unaffected, she doesn't even look at it πŸ™ˆ

Why do we care? Because this prevents IP fragmentation, which mitigates certain DNS vulnerabilities. no cap, it's a whole safety thing πŸ›‘οΈ

⚠️ important caveat bestie: it cannot increase the UDP size requested by the client. It can be reduced only. She's a limiter, not a hype woman β€” she never talks your buffer size up 😭

Also, this will only affect queries that have an OPT RR (that's EDNS(0), the spec lives at https://www.rfc-editor.org/info/rfc6891/ β€” go read it if you're feeling academic πŸŽ€).


πŸ¦‹ SYNTAX πŸ¦‹

bufsize [SIZE]
  • [SIZE] β€” an int value for setting the buffer size ✨
  • default value is 1232 (yes, that's the magic number, more on that below πŸ‘€)
  • the value must be within 512 - 4096
  • only one argument is acceptable, and it covers both IPv4 and IPv6 β€” one size, both stacks, iconic 🌈

πŸŽ€ EXAMPLES πŸŽ€

Example 1: enable limiting the buffer size of outgoing query to the resolver (172.31.0.10):

. {
    bufsize 1100
    forward . 172.31.0.10
    log
}

Example 2: enable limiting the buffer size as an authoritative nameserver:

. {
    bufsize 1220
    file db.example.org
    log
}

look at her go πŸ₯Ή both of these are literally in the original, don't @ me about the numbers.


πŸ’œ CONSIDERATIONS πŸ’œ

  • Setting 1232 bytes to bufsize may avoid fragmentation on the majority of networks in use today β€” but it depends on the MTU of the physical network links. so like, it's a really good default, not a universal truth πŸ’«

and that's the whole page, bestie β€” go forth and not fragment πŸ’–

this lil love letter to the docs is from CoreDNS, dated October 2026. slay, stay caffeinated, and remember: reduce only, never inflate πŸŽ€βœ¨

πŸ“¦ where this page comes from