Pihole only accepts DNS queries coming from localhost (127.0.0.1) everything else is not accepted

Please follow the below template, it will help us to help you!

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

Pihole should listen to all interfaces when in de admin page is configured accordingly but is only listening on localhost 127.0.0.1
OS: Raspbian 32bit
Core: v5.18.3
Web: v5.21
FTL: v5.25.2

Actual Behaviour:

eventhough netstat output states that DNS service is running in all interfaces (0.0.0.0:53) pihole is only responding to queries coming from localhost.
There is no iptables preventing this as no packets are denied when there is a connection attempt on pihole interface on port 53, so that's not the problem.
The only workaround it to add the interfaces to /etc/dnsmasq.d/01-pihole.conf like:
interface=eth0
interface=wlan0
If those lines are missing pihole is only accepting DNS requests on 127.0.0.1 port 53.
The problem was not there inititally but was introduced after cloudflared was installed an properly uninstalled again. Then this issue started.

Debug Token:

https://tricorder.pi-hole.net/co1FdgpV/

Your debug log shows you have applied a custom dnsmasq configuration file that explicitly restricts your Pi-hole to a specific interface:

*** [ DIAGNOSING ]: contents of /etc/dnsmasq.d

-rw-r--r-- 1 root root 52 Aug 29 08:39 /etc/dnsmasq.d/02-pivpn.conf
   addn-hosts=/etc/pivpn/hosts.wireguard
   interface=wg0

Removing interface=wg0 will return Pi-hole to consider all interfaces.

O wow, I'm surprised I missed that, maybe because it's in the pivpn configuration. Thank you for your quick help.