Why do I need to restart_dns daily to keep DNS working?

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Goto page 1, 2  Next
Author Message
Geremia12
DD-WRT User


Joined: 05 Sep 2012
Posts: 96

PostPosted: Tue Feb 03, 2026 22:56    Post subject: Why do I need to restart_dns daily to keep DNS working? Reply with quote
I need this in my computer's crontab:
Code:
0 0 * * * ssh root@192.168.1.1 restart_dns &>/dev/null
If I don't, DNS on my router stops working (seemingly after midnight). Why is this?

I'm using SmartDNS.
Sponsor
Geremia12
DD-WRT User


Joined: 05 Sep 2012
Posts: 96

PostPosted: Wed Feb 04, 2026 3:46    Post subject: Reply with quote
Does it have to do with my WAN DHCP lease time (1440 min = 1 day)?
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 7112
Location: UK, London, just across the river..

PostPosted: Wed Feb 04, 2026 7:49    Post subject: Reply with quote
i dont have this issue..but i suspect a user error/ bad set up Razz
we need to know what are your general DNS settings and ways to reproduce the error, logs and ect.
otherwise the help will be limited to random shots and guessing...as i said in my other
thread that you created...SmartDNS is currently on WIP/fixing/debug...but in my case on my
Netgear XR500 i've no problems with SmartDNS and its has been running for a days without a flaw.. Razz

_________________
Atheros
TP-Link WR1043NDv2 -DD-WRT 62606 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 -DD-WRT 63600 GTW/SmDNS/DoT,AD-Blk,Forced DNS,AP&Net Isolation,x2VLAN,Vanilla
Netgear R7800 --DD-WRT 62606 Gateway/DNSCryptv2,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla,VPN cli
Netgear R9000 --DD-WRT 62606 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Dynalink DL-WRX36-DDWRT 62606
Broadcom
Netgear R7000 --DD-WRT 63790 GTW/DNScrypt-proxy2/AD-Block,IPset Firewall,Forced DNS,x4VLAN,VPN cli
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 16808
Location: Texas, USA

PostPosted: Wed Feb 04, 2026 8:00    Post subject: Reply with quote
They probably don't have control over the periodicity of WAN DHCP renewal interval. And yes, when your lease renews, some services restart. But some people aren't aware of this, obviously.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 7112
Location: UK, London, just across the river..

PostPosted: Wed Feb 04, 2026 12:39    Post subject: Reply with quote
Geremia12 wrote:
Does it have to do with my WAN DHCP lease time (1440 min = 1 day)?


on my XR500 my local DCHP lease time is 360...but my WAN is dynamic where its a 1440...but as KP-69 noted if WAN
dynamic IP renews and your WAN connection drops and you get a new IP, than it is a problem, and in some scenarios people believe its the DNS and not its not the DNS..so, nothing to blame...for SmartDNS... Cool

_________________
Atheros
TP-Link WR1043NDv2 -DD-WRT 62606 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 -DD-WRT 63600 GTW/SmDNS/DoT,AD-Blk,Forced DNS,AP&Net Isolation,x2VLAN,Vanilla
Netgear R7800 --DD-WRT 62606 Gateway/DNSCryptv2,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla,VPN cli
Netgear R9000 --DD-WRT 62606 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Dynalink DL-WRX36-DDWRT 62606
Broadcom
Netgear R7000 --DD-WRT 63790 GTW/DNScrypt-proxy2/AD-Block,IPset Firewall,Forced DNS,x4VLAN,VPN cli
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Geremia12
DD-WRT User


Joined: 05 Sep 2012
Posts: 96

PostPosted: Wed Feb 04, 2026 22:05    Post subject: seems to be Firefox's DNS over HTTPS Reply with quote
The DNS resolution issue actually seems to be in my browser, Firefox. Disabling DNS over HTTPS (DoH/DoT) seemed to fix things:


Screenshot 2026-02-04 at 14-44-31 Settings.png
 Description:
Firefox DNS over HTTPS settings
 Filesize:  116.43 KB
 Viewed:  1973 Time(s)

Screenshot 2026-02-04 at 14-44-31 Settings.png


Geremia12
DD-WRT User


Joined: 05 Sep 2012
Posts: 96

PostPosted: Fri Feb 06, 2026 12:58    Post subject: Reply with quote
And the issue was that I had
Code:
iptables -I FORWARD -p tcp -m iprange --src-range 47.128.0.0-47.128.255.255 -j DROP
among my iptables commands. That really screwed things up, as it even block even DNS lookups to my router (the DHCP-Authoritative DNS server).
Geremia12
DD-WRT User


Joined: 05 Sep 2012
Posts: 96

PostPosted: Sat Feb 07, 2026 3:57    Post subject: Reply with quote
Geremia12 wrote:
And the issue was that I had
Code:
iptables -I FORWARD -p tcp -m iprange --src-range 47.128.0.0-47.128.255.255 -j DROP
among my iptables commands. That really screwed things up, as it even block even DNS lookups to my router (the DHCP-Authoritative DNS server).
Actually, I tracked the issue down by enabling Syslogd and looking at the log; there was an error in my /tmp/smartdns/smartdns.conf file. It seems there must not be any blank lines.
Geremia12
DD-WRT User


Joined: 05 Sep 2012
Posts: 96

PostPosted: Sat Feb 07, 2026 13:17    Post subject: "cache-size 100" fixes "[smartdns] : maybe di Reply with quote
Geremia12 wrote:
I had the
Code:
DD-WRT user.info : [smartdns] : maybe died, we need to re-exec it
issue every several minutes, too (cf. this). I'm seeing if adding this to SmartDNS Additional Options (/tmp/smartdns/smartdns.conf) helps:
Code:
cache-size 100
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 16808
Location: Texas, USA

PostPosted: Sat Feb 07, 2026 13:53    Post subject: Reply with quote
There is a forthcoming patch in a future release that may be related if it's not your configuration:

https://github.com/pymumu/smartdns/commit/b6139a199232140447aff6c4ec111c222ac84993

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 7112
Location: UK, London, just across the river..

PostPosted: Sat Feb 07, 2026 15:22    Post subject: Reply with quote
kernel-panic69 wrote:
........ if it's not your configuration:

consider all the mess in his config, this chap was writing a SmartDNS guide...unreal...

DD-WRT user.info : [smartdns] : maybe died, we need to re-exec it

On my XR500 I don't have those only in the begging on boot, but this is normal...and those then to happen when you have bad options that compromise SmartDNS...if you use a simple config and follow the guide..things will work as expected, otherwise enjoy the head-bang...and oddities... Cool Laughing

and yes BS commit will follow..as it seams SmartDNS has its own issues..and as i keep saying
currently SmartDNS is Work in Progress..fixing/debugging have a look at the SVN

p.s. This thread needs a locky locky too 09.02.26 Cool

_________________
Atheros
TP-Link WR1043NDv2 -DD-WRT 62606 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 -DD-WRT 63600 GTW/SmDNS/DoT,AD-Blk,Forced DNS,AP&Net Isolation,x2VLAN,Vanilla
Netgear R7800 --DD-WRT 62606 Gateway/DNSCryptv2,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla,VPN cli
Netgear R9000 --DD-WRT 62606 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Dynalink DL-WRX36-DDWRT 62606
Broadcom
Netgear R7000 --DD-WRT 63790 GTW/DNScrypt-proxy2/AD-Block,IPset Firewall,Forced DNS,x4VLAN,VPN cli
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913


Last edited by Alozaros on Mon Feb 09, 2026 6:11; edited 1 time in total
Geremia12
DD-WRT User


Joined: 05 Sep 2012
Posts: 96

PostPosted: Sat Feb 07, 2026 19:19    Post subject: Reply with quote
kernel-panic69 wrote:
There is a forthcoming patch in a future release that may be related if it's not your configuration:

https://github.com/pymumu/smartdns/commit/b6139a199232140447aff6c4ec111c222ac84993
Any temporary workarounds?

Perhaps
Quote:
restart-on-crash yes
?
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 16808
Location: Texas, USA

PostPosted: Sat Feb 07, 2026 21:27    Post subject: Reply with quote
So you open yet another thread instead of confirming in this one.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Geremia12
DD-WRT User


Joined: 05 Sep 2012
Posts: 96

PostPosted: Sat Feb 07, 2026 23:12    Post subject: Reply with quote
Geremia12 wrote:
Any temporary workarounds?
Kludgy, but cronjob every minute to see if nslookup works and restart_dns if return code $? is 1.
Geremia12
DD-WRT User


Joined: 05 Sep 2012
Posts: 96

PostPosted: Sat Feb 21, 2026 3:35    Post subject: ditching "Smart"DNS in favor of DNSMasq with DNSSE Reply with quote
With r63734, which includes smartdns 1.20260217-0640, I'm getting even more memory issues; it seems to be a major leak. It crashes with tons of these errors:
Quote:
smartdns: malloc conn stream failed
smartdns: malloc memory failed for http2 stream.
I'm ditching "Smart"DNS in favor of DNSMasq with DNSSEC turned on. I don't see the advantage of the memory-hog SmartDNS.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum