Pihole v6 doesn't work with custom upstreams

Greetings,

Banging my head for a second day trying to make a fresh install to work

I used a v5 Pi-hole in a LXD container for years.

A fresh installation of v6 misbehaves and I can't understand why. I've installed v6 into a an LXD container with a "macvlan" network interface and it looks and behaves exactly as any other host in my LAN (i.e. receives DHCP, can access internet etc...). There's no firewall on it or on the LXD host machine.

I have a DHCP running on my router (mikrotik) and it also serves as the DNS resolver for my LAN domain and forwarder for anything external via DoH. I've configured my router's IP as the "Custom DNS server" and disabled everything else.

Expected Behaviour:

Receive requests from LAN, forward to the custom upstream server, receive reply from upstream, forward reply to LAN

Actual Behaviour:

  • Queries from LAN timeouts.
  • dig from pihole to the router are working fine. results are received and displayed
  • tcpdump on the pihole host shows queries from LAN received, queries forwarded to the router and answers returned the pihole machine but no answers forwarded to LAN
  • Query log reports "Reply: No reply received" but I can see the replies in tcpdump

Enabling Google and/or OpenDNS upstream DNS servers immediately solves the problem, but my local domain is not resolving

Debug Token:

Running "pihole -d" failed to upload the debug data
Attempts to upload manualy via "curl --upload-file /var/log/pihole/pihole_debug.log https://tricorder.pi-hole.net" resulted in a "Could not upload empty file" error message while the file is 38K long. Getting the file to my MAC and uploading it resulted in the same error
Here's a link to gist: link to debug log removed by moderator, debug log made private
Or can you point me to a more standard/acceptable way to upload the log?

This noted in your debug log - your upstream DNS server does not appear to be happy with the new mixed case format in the latest version of dnsmasq embedded in FTL.

*** [ DIAGNOSING ]: Pi-hole diagnosis messages
   count   last timestamp       type                  message 
   ------  -------------------  --------------------  -------------------------------------
   1       2025-02-27 17:10:08  DNSMASQ_WARN          Case mismatch in DNS reply - check bit 0x20 encoding.                                                                                                                     

Try changing the upstream DNS servers to Google and see if this resolves the issue.

1 Like

Thanks!

As I've mentioned in the original post -- enabling Google or OpenDNS solved the issue but wouldn't resolve hosts in my local domain

By running 'sudo pihole-FTL --config misc.dnsmasq_lines '["no-0x20-encode"]'' I've managed to disable the 0x20 encoding in dnsmasq and it seems to be surviving reboots

Thanks for the pointer!

P.S. small update -- the DNS resolver in Mikrotik ROS v7 seems to know about "0x20 encoding". Looks like the resolver in Mikrotik ROS v6 doesn't play nice...

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.