Dnsmasq not reading host files from permanent folder

Hi,
I'm having a little bit of a odd issue. I'm running LanCache on my TrueNas Server and using dnsmasq to point the CDN's to said LanCache. I want to set Dnsmasq to read the host files from /etc/gamecache/scripts/output/dnsmasq.

I added addn-hosts=/etc/gamecache/scripts/output/dnsmasq/*.conf to the /etc/dnsmasq.conf file and restart dnsmasq using /etc/init.d/dnsmasq restart.

However it isn't working, I change permissions for the folder to dnsmasq and checked that the no hosts or ignore host options are not enabled, but still doesn't work. I have done this before without issues, so a little mythed as to why it isn't working now.

It works fine if I copy the files into the default /tmp/dnsmasq.d/ folder

Many Thanks in Advance.

Because of ujail you need to add it as addnhosts list in /etc/config/dhcp

uci add_list dhcp.lan.addnhosts='/etc/gamecache/scripts/output/dnsmasq/'
3 Likes