DNS proxy returns malformed replies for answers over 512 bytes (EDNS) and doesn't answer TCP/53, breaking systemd-resolved clients

Running an SDX Pro on firmware 8.6.1 build 6438. DNS Proxy is enabled, DNS Caching is off, and Include Google Public DNS Servers is off.

An Ubuntu 24.04 server behind the SDX can’t resolve some hostnames through the LAN DNS proxy. It fails for names whose answer is over 512 bytes. In my case that’s Wasabi S3 endpoints, which return a CNAME plus 28 A records.

What I’m seeing, querying the SDX’s LAN IP directly:

dig @<LAN-IP> s3.us-east-1.wasabisys.com A
;; status: NOERROR
;; WARNING: Message has 5 extra bytes at end
Query Result
Large answer, EDNS (dig default) NOERROR, but 5 junk bytes appended to the reply
Same, +noedns Clean
Same, +bufsize=512 No response
Any name, +tcp No response, even for example.com
Small answer (example.com), UDP Clean
Same large query to a public resolver Clean

dig tolerates the trailing bytes and shows a warning. systemd-resolved is strict: it rejects the packet (“server misbehaving” / “does not have any RR of the requested type”), then tries TCP, which gets no answer. curl, rclone and anything else using the system resolver then fail with “could not resolve host”.

I found the 2021 thread where support said TCP/53 isn’t intercepted because it’s “normally used for zone transfers” (https://forum.peplink.com/t/roku-evading-dns-interception/34740), and the 2018 EDNS/DNSSEC feature request. RFC 7766 makes TCP support required for ordinary lookups, though. It’s the standard fallback whenever a UDP answer is too big or gets truncated, so with the EDNS replies also malformed there’s no working path for large answers.

Questions:

  1. Has anyone else seen the “extra bytes at end” warning from the Peplink DNS proxy? Is it fixed in a newer firmware than 8.6.1?

  2. Is there a support.cgi option to make the proxy listen on TCP/53, or to change how it handles EDNS (for example, cap the buffer size or set the TC flag properly)?

  3. Any recommended workaround that keeps clients on the router’s proxy? We rely on its Local DNS Records, so pointing everything at public DNS isn’t ideal.

Will open a support ticket as well, but wanted to see if this is already known.

2 Likes

acket capture detail: with EDNS, the proxy returns ANSWER: 29, ADDITIONAL: 1 (OPT), and the message is exactly 512 bytes. dig reports “malformed message packet” and “5 extra bytes at end”. With +noedns, the same answer is 506 bytes and clean. The proxy appears to hard-cap UDP replies at 512 bytes regardless of the client’s advertised EDNS buffer (1232), truncating the OPT record mid-way without setting the TC flag. TCP/53 to the proxy is actively refused (connection refused), so there’s no fallback. Expected: honor the EDNS buffer size, or truncate cleanly at a record boundary with TC=1, and accept TCP/53 per RFC 7766. Pcap available.

Ticket #26120165 for peplink team reference