Re: dnsdist : connection refused

Aman Grewal via Pdns-users <[email protected]> Mon, 17 Nov 2025 12:11:49 -0500
Newsgroups gmane.network.dns.powerdns.user
Message-ID <CANkERQppO6PcJ+SZWbo6YAjSzba_iGc7KbdO4EJ0saqOxXN9_A@mail.gmail.com>
--===============0951308239915842330==
Content-Type: multipart/alternative; boundary="000000000000f891da0643cd7169"

--000000000000f891da0643cd7169
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

You have to tell dig to use DoH

`+https=3D/dns-query` for https
`+http-plain=3D/dns-query` for http

On Mon, Nov 17, 2025 at 11:51=E2=80=AFAM ROGER VIncent via Pdns-users <
[email protected]> wrote:

> Hi,
>
> I intend to access dnsdist via DoH with an apache reverse proxy, but firs=
t
> I can't get dnsdist respond to queries :
>
> =E2=9E=9C  ~ dig -t aaaa powerdns.com @127.0.0.1 -p 5300 +short +nocookie
> ;; 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 @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", checkInterval=
=3D60,
> mustResolve=3Dtrue})
> newServer({address=3D"192.168.0.24:53", name=3D"Pi1-hole", checkInterval=
=3D60,
> mustResolve=3Dtrue})
>
> -- Set the load balancing policy
> setServerPolicy(roundrobin)
>
> -- Create local DOH server listener in DNS over HTTP mode, otherwise the
> information coming from nginx won't be processed well
> addDOHLocal("127.0.0.1:5300", nil, nil, "/dns-query", {reusePort=3Dtrue,
> trustForwardedForHeader=3Dfalse, keepIncomingHeaders=3Dtrue})
>
> dnsdist is listening port 5300 though :
>
> =E2=9E=9C  ~ sudo netstat -tapn | grep 5300
> tcp        0      0 127.0.0.1:5300          0.0.0.0:*
>  LISTEN      508356/dnsdist
>
> What is my mistake here ?
>
>
> --
> ROGER Vincent
>
> _______________________________________________
> Pdns-users mailing list
> [email protected]
> https://mailman.powerdns.com/mailman/listinfo/pdns-users
>

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

<div dir=3D"ltr">You have to tell dig to use DoH<br><br>`+https=3D/dns-quer=
y` for https<br>`+http-plain=3D/dns-query` for http</div><br><div class=3D"=
gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On=
 Mon, Nov 17, 2025 at 11:51=E2=80=AFAM ROGER VIncent via Pdns-users &lt;<a =
href=3D"mailto:[email protected]">[email protected]=
.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1=
ex"><u></u>

 =20

   =20
 =20
  <div>
    <p>Hi,</p>
    <p>I intend to access dnsdist via DoH with an apache reverse proxy,
      but first I can&#39;t get dnsdist respond to queries :</p>
    <p> </p>
    <blockquote type=3D"cite">=E2=9E=9C=C2=A0 ~ dig -t aaaa <a href=3D"http=
://powerdns.com" target=3D"_blank">powerdns.com</a> @<a href=3D"http://127.=
0.0.1" target=3D"_blank">127.0.0.1</a> -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 <a href=3D"http://powerdns.com" target=3D"_blank">powerdns.co=
m</a> @<a href=3D"http://127.0.0.1" target=3D"_blank">127.0.0.1</a> -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<br=
>
      setSecurityPollSuffix(&quot;&quot;)<br>
      <br>
      setACL(&quot;<a href=3D"http://127.0.0.1/8" target=3D"_blank">127.0.0=
.1/8</a>&quot;)<br>
      <br>
      -- Define upstream DNS server (Pi-hole)<br>
      newServer({address=3D&quot;<a href=3D"http://192.168.0.26:53" target=
=3D"_blank">192.168.0.26:53</a>&quot;, name=3D&quot;Pi2-hole&quot;,
      checkInterval=3D60, mustResolve=3Dtrue})<br>
      newServer({address=3D&quot;<a href=3D"http://192.168.0.24:53" target=
=3D"_blank">192.168.0.24:53</a>&quot;, name=3D&quot;Pi1-hole&quot;,
      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&#39;t be processed
      well<br>
      addDOHLocal(&quot;<a href=3D"http://127.0.0.1:5300" target=3D"_blank"=
>127.0.0.1:5300</a>&quot;, nil, nil, &quot;/dns-query&quot;,
      {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 5=
300=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 <a href=3D"htt=
p://127.0.0.1:5300" target=3D"_blank">127.0.0.1:5300</a>=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 cols=3D"72">--=20
ROGER Vincent</pre>
  </div>

_______________________________________________<br>
Pdns-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Pdns-u=
[email protected]</a><br>
<a href=3D"https://mailman.powerdns.com/mailman/listinfo/pdns-users" rel=3D=
"noreferrer" target=3D"_blank">https://mailman.powerdns.com/mailman/listinf=
o/pdns-users</a><br>
</blockquote></div>

--000000000000f891da0643cd7169--

--===============0951308239915842330==
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

--===============0951308239915842330==--