Re: dnsdist : connection refused
ROGER VIncent via Pdns-users <[email protected]> Mon, 17 Nov 2025 19:35:00 +0100
| Newsgroups | gmane.network.dns.powerdns.user |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============1083756528600013236== Content-Type: multipart/alternative; boundary="------------2vSdmXY9AvrfzFCj9j6z0j1A" Content-Language: fr-FR This is a multi-part message in MIME format. --------------2vSdmXY9AvrfzFCj9j6z0j1A Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Great thank you ! > =E2=9E=9C=C2=A0 ~ dig -t aaaa powerdns.com @127.0.0.1 -p 5300 +nocookie= =20 > +http-plain=3D/dns-query > > ; <<>> DiG 9.20.15-1~deb13u1-Debian <<>> -t aaaa powerdns.com=20 > @127.0.0.1 -p 5300 +nocookie +http-plain=3D/dns-query > ;; global options: +cmd > ;; Got answer: > ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17379 > ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1 > > ;; OPT PSEUDOSECTION: > ; EDNS: version: 0, flags:; udp: 1232 > ;; QUESTION SECTION: > ;powerdns.com.=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 IN=C2=A0 =C2=A0 = AAAA > > ;; AUTHORITY SECTION: > powerdns.com.=C2=A0 =C2=A0 =C2=A0 =C2=A0 3600=C2=A0 =C2=A0 IN=C2=A0 =C2= =A0 SOA pdns-public-ns1.powerdns.com.=20 > peter\.van\.dijk.powerdns.com. 2025111301 10800 3600 604800 3600 > > ;; Query time: 168 msec > ;; SERVER: 127.0.0.1#5300(127.0.0.1) (HTTP) > ;; WHEN: Mon Nov 17 19:09:52 CET 2025 > ;; MSG SIZE=C2=A0 rcvd: 108 Now that I test requests via apache reverse proxy I get errors like this= =20 one : > [proxy_http:error] [pid 542507:tid 542557] (70014)End of file found:=20 > [remote 192.168.0.254:40452] AH01102: error reading status line from=20 > remote server 127.0.0.1:5300 I know it's perhaps more related to Apache than dnsdist but I ask anyway= =20 : is it possible to use Apache to proxy requests to dnsdist ? Le 17/11/2025 =C3=A0 18:11, Aman Grewal a =C3=A9crit=C2=A0: > 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=20 > <[email protected]> wrote: > > Hi, > > I intend to access dnsdist via DoH with an apache reverse proxy, > but first I can't get dnsdist respond to queries : > >> =E2=9E=9C=C2=A0 ~ dig -t aaaa powerdns.com <http://powerdns.com> @1= 27.0.0.1 >> <http://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 >> <http://powerdns.com> @127.0.0.1 <http://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 <http://127.0.0.1/8>") >> >> -- Define upstream DNS server (Pi-hole) >> newServer({address=3D"192.168.0.26:53 <http://192.168.0.26:53>", >> name=3D"Pi2-hole", checkInterval=3D60, mustResolve=3Dtrue}) >> newServer({address=3D"192.168.0.24:53 <http://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 <http://127.0.0.1:5300>", nil, nil, >> "/dns-query", {reusePort=3Dtrue, 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:53= 00 <http://127.0.0.1:5300> =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 > What is my mistake here ? > > > --=20 > ROGER Vincent > > _______________________________________________ > Pdns-users mailing list > [email protected] > https://mailman.powerdns.com/mailman/listinfo/pdns-users > --------------2vSdmXY9AvrfzFCj9j6z0j1A 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>Great thank you !</p> <p> <blockquote type=3D"cite">=E2=9E=9C=C2=A0 ~ dig -t aaaa powerdns.com= @127.0.0.1 -p 5300 +nocookie +http-plain=3D/dns-query=C2=A0<br> <br> ; <<>> DiG 9.20.15-1~deb13u1-Debian <<>> -t aaaa powerdns.com @127.0.0.1 -p 5300 +nocookie +http-plain=3D/dns-query<br> ;; global options: +cmd<br> ;; Got answer:<br> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17379<br> ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1<br> <br> ;; OPT PSEUDOSECTION:<br> ; EDNS: version: 0, flags:; udp: 1232<br> ;; QUESTION SECTION:<br> ;powerdns.com.=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 IN=C2=A0 = =C2=A0 AAAA<br> <br> ;; AUTHORITY SECTION:<br> powerdns.com.=C2=A0 =C2=A0 =C2=A0 =C2=A0 3600=C2=A0 =C2=A0 IN=C2= =A0 =C2=A0 SOA=C2=A0 =C2=A0 pdns-public-ns1.powerdns.com. peter\.van\.dijk.powerdns.com. 2025111301 10800 3600 604800 3600<br> <br> ;; Query time: 168 msec<br> ;; SERVER: 127.0.0.1#5300(127.0.0.1) (HTTP)<br> ;; WHEN: Mon Nov 17 19:09:52 CET 2025<br> ;; MSG SIZE=C2=A0 rcvd: 108<br> </blockquote> </p> <p><br> </p> <p>Now that I test requests via apache reverse proxy I get errors like this one :</p> <p> <blockquote type=3D"cite">[proxy_<a class=3D"moz-txt-link-freetext" = href=3D"http:error">http:error</a>] [pid 542507:tid 542557] (70014)End of file found: [remote 192.168.0.254:40452] AH01102: error reading status line from remote server 127.0.0.1:5300</block= quote> <br> </p> <p>I know it's perhaps more related to Apache than dnsdist but I ask anyway : is it possible to use Apache to proxy requests to dnsdist ?</p> <pre class=3D"moz-signature" cols=3D"72"> </pre> <div class=3D"moz-cite-prefix">Le 17/11/2025 =C3=A0 18:11, Aman Grewal= a =C3=A9crit=C2=A0:<br> </div> <blockquote type=3D"cite" cite=3D"mid:[email protected]= .com"> <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUT= F-8"> <div dir=3D"ltr">You have to tell dig to use DoH<br> <br> `+https=3D/dns-query` 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 <<a href=3D"mailto:[email protected]" moz-do-not-send=3D"true" class=3D"moz-txt-link-freetext">pdns-= [email protected]</a>> wrote:<br> </div> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p= adding-left:1ex"> <div> <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 <a href=3D"http://powerdns.com" target=3D"_blank" moz-do-not-send=3D"true">powerdns.com</a> @<a href=3D"http://127.0.0.1" target=3D"_blank" moz-do-not-send=3D"true">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> ; <<>> DiG 9.20.15-1~deb13u1-Debian <<>> -t aaaa <a href=3D"http://powerdns.com" target=3D"_blank" moz-do-not-send=3D"true">powerdns.com</a= > @<a href=3D"http://127.0.0.1" target=3D"_blank" moz-do-not-send=3D"true">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> <blockquote type=3D"cite">-- disable security status polling via DNS<br> setSecurityPollSuffix("")<br> <br> setACL("<a href=3D"http://127.0.0.1/8" target=3D"_blank" moz-do-not-send=3D"true">127.0.0.1/8</a>")<br> <br> -- Define upstream DNS server (Pi-hole)<br> newServer({address=3D"<a href=3D"http://192.168.0.26:53" target=3D"_blank" moz-do-not-send=3D"true">192.168.0.26:53= </a>", name=3D"Pi2-hole", checkInterval=3D60, mustResolve=3Dtrue})<= br> newServer({address=3D"<a href=3D"http://192.168.0.24:53" target=3D"_blank" moz-do-not-send=3D"true">192.168.0.24:53= </a>", 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("<a href=3D"http://127.0.0.1:5300" target=3D"_blank" moz-do-not-send=3D"true">127.0.0.1:5300<= /a>", nil, nil, "/dns-query", {reusePort=3Dtrue, trustForwardedForHeader=3Dfalse, keepIncomingHeaders=3Dtrue}= )<br> </blockquote> dnsdist is listening port 5300 though : <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 <a hr= ef=3D"http://127.0.0.1:5300" target=3D"_blank" moz-do-not-send=3D"true">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/dnsdis= t</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" moz-do-not-send=3D"true" class=3D"moz-txt-link-freetext">[email protected]= m</a><br> <a href=3D"https://mailman.powerdns.com/mailman/listinfo/pdns-users" rel=3D"noreferrer" target=3D"_blank" moz-do-not-send=3D"true" class=3D"moz-txt-link-freetext">https://mailman.powerdns.com/m= ailman/listinfo/pdns-users</a><br> </blockquote> </div> </blockquote> </body> </html> --------------2vSdmXY9AvrfzFCj9j6z0j1A-- --===============1083756528600013236== 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 --===============1083756528600013236==--