dnsdist : connection refused

ROGER VIncent via Pdns-users <[email protected]> Mon, 17 Nov 2025 17:50:20 +0100
Newsgroups gmane.network.dns.powerdns.user
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============8636963463971737879==
Content-Type: multipart/alternative;
 boundary="------------c0bJ97Iz4b0wUghfM5pCwumM"
Content-Language: fr-FR

This is a multi-part message in MIME format.
--------------c0bJ97Iz4b0wUghfM5pCwumM
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi,

I intend to access dnsdist via DoH with an apache reverse proxy, but=20
first I can't get dnsdist respond to queries :

> =E2=9E=9C=C2=A0 ~ dig -t aaaa powerdns.com @127.0.0.1 -p 5300 +short +no=
cookie
> ;; communications error to 127.0.0.1#5300: connection refused
> ;; communications error to 127.0.0.1#5300: connection refused
> ;; communications error to 127.0.0.1#5300: connection refused
>
> ; <<>> DiG 9.20.15-1~deb13u1-Debian <<>> -t aaaa powerdns.com=20
> @127.0.0.1 -p 5300 +short +nocookie
> ;; global options: +cmd
> ;; no servers could be reached
Here is my dnsdist.conf :

> -- disable security status polling via DNS
> setSecurityPollSuffix("")
>
> setACL("127.0.0.1/8")
>
> -- Define upstream DNS server (Pi-hole)
> newServer({address=3D"192.168.0.26:53", name=3D"Pi2-hole",=20
> checkInterval=3D60, mustResolve=3Dtrue})
> newServer({address=3D"192.168.0.24:53", name=3D"Pi1-hole",=20
> checkInterval=3D60, mustResolve=3Dtrue})
>
> -- Set the load balancing policy
> setServerPolicy(roundrobin)
>
> -- Create local DOH server listener in DNS over HTTP mode, otherwise=20
> the information coming from nginx won't be processed well
> addDOHLocal("127.0.0.1:5300", nil, nil, "/dns-query", {reusePort=3Dtrue,=
=20
> trustForwardedForHeader=3Dfalse, keepIncomingHeaders=3Dtrue})
dnsdist is listening port 5300 though :

> =E2=9E=9C=C2=A0 ~ sudo netstat -tapn | grep 5300
> tcp=C2=A0 =C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 0 127.0.0.1:5300=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.0.0.0:* =C2=A0LISTEN=C2=A0 =C2=A0 =C2=A0=
=20
> 508356/dnsdist
What is my mistake here ?


=2D-=20
ROGER Vincent

--------------c0bJ97Iz4b0wUghfM5pCwumM
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-=
8">
  </head>
  <body>
    <p>Hi,</p>
    <p>I intend to access dnsdist via DoH with an apache reverse proxy,
      but first I can't get dnsdist respond to queries :</p>
    <p> </p>
    <blockquote type=3D"cite">=E2=9E=9C=C2=A0 ~ dig -t aaaa powerdns.com @=
127.0.0.1 -p
      5300 +short +nocookie<br>
      ;; communications error to 127.0.0.1#5300: connection refused<br>
      ;; communications error to 127.0.0.1#5300: connection refused<br>
      ;; communications error to 127.0.0.1#5300: connection refused<br>
      <br>
      ; &lt;&lt;&gt;&gt; DiG 9.20.15-1~deb13u1-Debian &lt;&lt;&gt;&gt;
      -t aaaa powerdns.com @127.0.0.1 -p 5300 +short +nocookie<br>
      ;; global options: +cmd<br>
      ;; no servers could be reached</blockquote>
    Here is my dnsdist.conf :
    <p></p>
    <p> </p>
    <blockquote type=3D"cite">-- disable security status polling via DNS<b=
r>
      setSecurityPollSuffix("")<br>
      <br>
      setACL("127.0.0.1/8")<br>
      <br>
      -- Define upstream DNS server (Pi-hole)<br>
      newServer({address=3D"192.168.0.26:53", name=3D"Pi2-hole",
      checkInterval=3D60, mustResolve=3Dtrue})<br>
      newServer({address=3D"192.168.0.24:53", name=3D"Pi1-hole",
      checkInterval=3D60, mustResolve=3Dtrue})<br>
      <br>
      -- Set the load balancing policy<br>
      setServerPolicy(roundrobin)<br>
      <br>
      -- Create local DOH server listener in DNS over HTTP mode,
      otherwise the information coming from nginx won't be processed
      well<br>
      addDOHLocal("127.0.0.1:5300", nil, nil, "/dns-query",
      {reusePort=3Dtrue, trustForwardedForHeader=3Dfalse,
      keepIncomingHeaders=3Dtrue})<br>
    </blockquote>
    dnsdist is listening port 5300 though :
    <p></p>
    <p> </p>
    <blockquote type=3D"cite">=E2=9E=9C=C2=A0 ~ sudo netstat -tapn | grep =
5300=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
      =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0=C2=A0<br>
      tcp=C2=A0 =C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 0 127.0.0.1:530=
0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.0.0.0:*=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0
      =C2=A0LISTEN=C2=A0 =C2=A0 =C2=A0 508356/dnsdist</blockquote>
    What is my mistake here ?
    <p><br>
    </p>
    <pre class=3D"moz-signature" cols=3D"72">--=20
ROGER Vincent</pre>
  </body>
</html>

--------------c0bJ97Iz4b0wUghfM5pCwumM--

--===============8636963463971737879==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Pdns-users mailing list
[email protected]
https://mailman.powerdns.com/mailman/listinfo/pdns-users

--===============8636963463971737879==--