SmartDNS - issues

After installing and setting up SmartDNS and selecting 'Redirect to port 53' I had a working setup, but suddenly after a reboot I now have dnsmasq answering and nothing from smartdns (watching logs)

So, what is it that prevents this redirect to port 53 from working correctly? what does this option do on the backend? by default its listening on :::6053 and no IPv4, wtf is up with this?

Is smartDNS up and alive?

As long as you don't kill the dnsmasq DNS, it'll keep answering, no matter the status of smartdns.

Disable it, and set smartdns to listen in port 53 in its place, if you want to avoid it.

Hmm, okay, so then what's the point of using this redirect if the right way to do this is to simply disable dnsmasq dns and set smartdns in its place?

Nonetheless, whats the right way to disable dnsmasq?

There's no right or wrong, just two ways of solving the "problem" ...

Okay cool, good to know, only issue left is SmartDNS is only listening on IPv6

setting bind :53 gives me errors that the port is in use when it is not according to netstat -tnlpu


did you restart dnsmasq after disabling the DNS ?

you could temp stop dnsmasq, and try to fire up smartdns instead, just to see if it works.

Yup service dnsmasq restart

netstat -tnlpu | grep 53
tcp        0      0*               LISTEN      3553/smbd
tcp        0      0*               LISTEN      3553/smbd
tcp        0      0 fdd8:8925:d466::1:445   :::*                    LISTEN      3553/smbd
tcp        0      0 fdd8:8925:d466::1:139   :::*                    LISTEN      3553/smbd
tcp        0      0 :::53                   :::*                    LISTEN      7388/smartdns
udp        0      0  *                           2703/avahi-daemon:
udp        0      0 :::5353                 :::*                                2703/avahi-daemon:
udp        0      0 :::53                   :::*                                7388/smartdns

If I set bind :53 this is what I see in logs

[2022-10-26 14:22:35,564][ERROR][     dns_server.c:3068] bind service failed, Address in use
[2022-10-26 14:22:35,564][ERROR][     dns_server.c:3257] create server socket failed.
[2022-10-26 14:22:35,564][ERROR][     dns_server.c:239 ] epoll ctl failed, fd = 7, Invalid argument
[2022-10-26 14:22:35,564][ERROR][     dns_server.c:239 ] epoll ctl failed, fd = 6, Invalid argument
[2022-10-26 14:22:35,564][ERROR][       smartdns.c:289 ] start dns server failed.

Quite odd... Stopping dnsmasq results in the same error, unable to bind

doesn't say what port it fails to bind, though ... could be something else than 53.

Debug logging is enabled so I suppose I need to figure that out some other way?

I know zero about smartdns, but the only other reasons I could think of, would be you
either starting it twice, via a different init.d file, or it using some additional port(s), where it collides.

Fair enough, will report back here when I find the issue

Thanks for your input, appreciate it

I believe I may have found the issue, it seems luci wont allow me to enable smartdns to run on IPv4 and IPv6

Default settings, smartdns will only listen on IPv4... if I tick the box for IPv6 server it will only run on ipv6

So I suppose if installed with luci support then it must be configured through it

Sorry to go off topic, but I have a question about smartdns.

It sounds super cool, but doesn’t it make DNS requests very slow if it pings all the IPs first?

Or does the decreased latency make up for it?

What is your experience there?

check what disabling this does

1 Like

Fairly certain I had tried disabling that option and didnt see any difference

After uninstalling smartdns it left dnsmasq broken on IPv4... removing and reinstalling it seems to have resolved it though

Will try again shortly, however it seems dnsmasq will gloom across ALL ips while smartdns will only bind to [::]:53 or obviously, this makes it completely unusable as the only dns

Ok so I figured I'd make a go of setting up bind and it seems to be working quite well (even got RDNS IPv6 figured out)

However, upon boot, it has a similar issue of being unable to bind, but then netstat doesnt show anything using port 53... if I run service named restart it seems to bind to 53 just fine

Unsure how to further troubleshoot, I have tried setting START=80 in /etc/init.d/named just to see if starting it later would resolve it, but no luck there

I followed the info here to disable dns from dnsmasq

Edit: seems like this issue has existed for quite a few years and I have yet to come across a solution from any threads


Binding issue with named solved by starting later, i.e START=99

1 Like