DnsServer icon indicating copy to clipboard operation
DnsServer copied to clipboard

Very odd issue with DoH..

Open daedaevibin opened this issue 7 months ago • 13 comments

So, I cannot get DoH on 443 to work.

The ports are clear, systemd service should allow it to bind, even nc (netcat) can bind it..

but it just refuses to bind to it. Any other ports will work, but it just refuses to work through 443.

I am at a complete loss here. I have no idea what is wrong, everything else (DoQ and such) works perfectly.

daedaevibin avatar Apr 08 '26 13:04 daedaevibin

Thanks for the post. Please share the error log you see in the Logs > View Logs section on the panel. Also share output of sudo ss -nlpt command here.

ShreyasZare avatar Apr 08 '26 14:04 ShreyasZare

~ ❯ sudo ss -nlpt
State         Recv-Q        Send-Q               Local Address:Port                 Peer Address:Port        Process
LISTEN        0             512                        0.0.0.0:5380                      0.0.0.0:*            users:(("dotnet",pid=1179,fd=260))
LISTEN        0             512                        0.0.0.0:7742                      0.0.0.0:*            users:(("dotnet",pid=1179,fd=261))
LISTEN        0             500                        0.0.0.0:53                        0.0.0.0:*            users:(("dotnet",pid=1179,fd=263))
LISTEN        0             128                        0.0.0.0:22                        0.0.0.0:*            users:(("sshd",pid=1307,fd=7))
LISTEN        0             50                               *:1716                            *:*            users:(("kdeconnectd",pid=2478,fd=21))
LISTEN        0             32                               *:21                              *:*            users:(("vsftpd",pid=1313,fd=3))
LISTEN        0             128                           [::]:22                           [::]:*            users:(("sshd",pid=1307,fd=6))
LISTEN        0             4096                             *:9090                            *:*            users:(("systemd",pid=1,fd=106))

Note that my network has no IPv6 support whatsoever (It did before we swapped to fiber).


The normal logs are far too long to manually or even automatically audit. It contains no reports of anything consisting of 443 though, since find cannot locate anything. (Had to manual clear logs and restart service to get the below information)

I also found the following though:

[2026-04-08 09:06:24 Local] [[::53]:53] [UDP] DNS Server failed to bind.
System.Net.Sockets.SocketException (99): Cannot assign requested address
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, Boolean disconnectOnFailure, String callerName)
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at DnsServerCore.Dns.DnsServer.StartAsync(Boolean throwIfBindFails) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Dns\DnsServer.cs:line 6172
[2026-04-08 09:06:24 Local] [[::53]:53] [TCP] DNS Server failed to bind.
System.Net.Sockets.SocketException (99): Cannot assign requested address
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, Boolean disconnectOnFailure, String callerName)
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at DnsServerCore.Dns.DnsServer.StartAsync(Boolean throwIfBindFails) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Dns\DnsServer.cs:line 6248
[2026-04-08 09:06:24 Local] [[::53]:853] [QUIC] DNS Server was bound successfully.
[2026-04-08 09:06:24 Local] [127.0.0.1:443] [HTTPS] DNS Server failed to bind.
[2026-04-08 09:06:24 Local] [[::53]:443] [HTTPS] DNS Server failed to bind.
[2026-04-08 09:06:24 Local] System.Net.Sockets.SocketException (99): Cannot assign requested address
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, Boolean disconnectOnFailure, String callerName)
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at Microslop.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
   at Microslop.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
   at Microslop.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
   at Microslop.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
   at Microslop.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()

Notice how it tried 127.0.0.1 which is not what technitium is setup for, as it should be 0.0.0.0 as seen here:

[2026-04-08 09:06:19 Local] [0.0.0.0:5380] [HTTP] Web Service was bound successfully.
[2026-04-08 09:06:19 Local] [0.0.0.0:7742] [HTTPS] Web Service was bound successfully.
[2026-04-08 09:06:19 Local] [0.0.0.0:53] [UDP] DNS Server was bound successfully.
[2026-04-08 09:06:19 Local] [0.0.0.0:53] [TCP] DNS Server was bound successfully.
[2026-04-08 09:06:19 Local] [0.0.0.0:853] [QUIC] DNS Server was bound successfully.

daedaevibin avatar Apr 08 '26 14:04 daedaevibin

Thanks for the details. Please share the screenshot of "DNS Server Local End Points" option in Settings > General section.

ShreyasZare avatar Apr 08 '26 14:04 ShreyasZare

Thanks for the details. Please share the screenshot of "DNS Server Local End Points" option in Settings > General section.

Image

I am unsure of when the ipv6 thing ended up being malformed, I will remove the invalid 53 from it but am unsure if I should remove the ipv6 line completely.

Update: Fixing the typo fixed the issue entirely? This should not have prevented it from working. Especially not when all other services/ports worked perfectly fine.

daedaevibin avatar Apr 08 '26 14:04 daedaevibin

Thanks for the details. The local end point config was the issue here. You specified a unicast ipv6 address ::53 which does not exists on any of your network adapter on the system so the socket was failing to bind to that specific IP.

The DoH service uses Kestrel web server and it would fail to start in such case. The rest of the optional protocols started on 0.0.0.0 but failed on ::53 se seen in the error logs.

You can just keep the 0.0.0.0 local end point and remove the ipv6 one if you do not require accessing the service over ipv6 addresses,

ShreyasZare avatar Apr 08 '26 14:04 ShreyasZare

@ShreyasZare

That is weird but it does make sense. Thanks though!

Appreciate the great tool <3

daedaevibin avatar Apr 08 '26 14:04 daedaevibin

You're welcome!

ShreyasZare avatar Apr 08 '26 14:04 ShreyasZare

You're welcome!

If you don't mind me asking, I am curious.

What compelled you to make such a tool?

It handles so many functions all in one place which is great for thousands of reasons, and the performance is even better than any other similar tools most of the time. (Including the dreaded PiHole, lol)

It is a super useful tool though, and I hope that in the future it achieves great things.

daedaevibin avatar Apr 08 '26 14:04 daedaevibin

If you don't mind me asking, I am curious.

What compelled you to make such a tool?

It handles so many functions all in one place which is great for thousands of reasons, and the performance is even better than any other similar tools most of the time. (Including the dreaded PiHole, lol)

It is a super useful tool though, and I hope that in the future it achieves great things.

Thanks for asking. I have been doing programming as a hobby since around 26 years by now. A few of the projects are published though. I do this primarily to keep learning new things. The DNS server project has got quite a bit popular now so I am working on it regularly as a long term project. It is also useful and is being used at my day job and most of the clients there too.

ShreyasZare avatar Apr 09 '26 07:04 ShreyasZare

If you don't mind me asking, I am curious. What compelled you to make such a tool? It handles so many functions all in one place which is great for thousands of reasons, and the performance is even better than any other similar tools most of the time. (Including the dreaded PiHole, lol) It is a super useful tool though, and I hope that in the future it achieves great things.

Thanks for asking. I have been doing programming as a hobby since around 26 years by now. A few of the projects are published though. I do this primarily to keep learning new things. The DNS server project has got quite a bit popular now so I am working on it regularly as a long term project. It is also useful and is being used at my day job and most of the clients there too.

I'm glad to see that something went from just a hobby to being used everyday by real people. It is far ahead of PiHole feature and performance wise.

I honestly hope to see bigger companies adopt this tool, it's so useful for web hosting and management.

Thanks again for making such a great and useful piece of software! <3

daedaevibin avatar Apr 11 '26 13:04 daedaevibin

You're welcome! A few web hosting companies and ISPs are using it already and it is steadily gaining popularity with many small to medium size companies too.

ShreyasZare avatar Apr 14 '26 07:04 ShreyasZare

You're welcome! A few web hosting companies and ISPs are using it already and it is steadily gaining popularity with many small to medium size companies too.

Well all I can say is be proud of your great work, because I'm positive it'll take you places.

I honestly hope it becomes the dominant tool in the future personally, but who know? We'll just have to wait and see.

daedaevibin avatar Apr 14 '26 11:04 daedaevibin

I agree. I swapped over from years of Pihole use and love the capabilities of this.

davistw1 avatar Apr 14 '26 11:04 davistw1