What's new

Solved Configure dnsmasq to have larger cache-size and persist on reboot?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

BikeHelmet

Regular Contributor
Howdy all,

I think I'm hitting a DNS edge case. I know the default 1500 cache size is enough for 99% of home users, but I'm pretty sure I'm that sub-1% edge case and need to modify the config file.

What's the best way to accomplish this? /etc/dnsmasq.conf is not in JFFS, so it can't easily be modified/saved? I saw a thread saying to create a new /jffs/configs/dnsmasq.conf.add file and add lines there, but that adds lines - as in, I end up with two cache-size entries.

I'm sure a linux guru will be able to tell me the best method in about 15 seconds, and then I'll just Putty/WinSCP in and get it done. :) Cheers!

Threads that I was reading:
 
Use a post conf script instead and change the cache value.

Details are here

 
Perfect! Got it done, thanks. :)

Code:
/jffs/scripts/dnsmasq.postconf

    #!/bin/sh
    source /usr/sbin/helper.sh
    . /opt/share/diversion/file/post-conf.div # Added by Diversion
    pc_replace "cache-size=1500" "cache-size=4000" "/etc/dnsmasq.conf"
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top