Dnsmasq default DNS servers?

I am compiling my own build of lede for my WNDR3700v1. Everything seems to be going okay, except my DNS settings keep putting 127.0.0.1:5353 as the default dns server, which stops my internet from running until I change them.

Which part of the build process dictates the default DNS servers? I had a look through the dnsmasq package directory, but couldn't find any reference to it. It's really driving me nuts.

I have a config file that runs under uci-defaults, but it only adds DNS servers (8.8.8.8 and 8.8.4.4) - nothing else, so the configuration is not coming from there.

Does anyone have any ideas of resolving this?
Appreciate any help anyone can provide.

What happens if you flash a build without the script in uci-defaults?

Dnsmasq should listen on port 53 by default.

Also, what did you name your uci-defaults script? Maybe it runs too early and another (package's) script overwrites the dnsmasq settings.

That is so weird. It seems to still be applying all my settings, even though I've taken the file completely out of the build directory. How can that be?

It is just named custom_defaults - its the only file in uci-defaults. I did however remove it as per Borromini's suggestion, and somehow the configuration is still applying? How I don't know.

If you look at /rom/etc/uci-defaults you will find all the other uci-defaults script which ran on first boot.

It's possible one of them is overwriting something, unless you also include custom files in ./files during image generation.

It's a good idea to follow the naming template to start with two digits indicating how early/late in the process specific script should run.

Thanks for the info, I will definitely make sure I put a new name to it.

in terms of accessing /rom/ , how do I manage that? (please bear with me, I am a novice to building my own firmware!)
I can access /etc/uci-defaults when the router is booted.
But in terms of configuration prior to build, I placed my config file in buildroot/files/uci-defaults

Is there a better place for it?

So when the router is booted, instead of accessing /etc/uci-defaults (which should be empty if all the scripts terminated successfully) access /rom/etc/uci-defaults and you will see all the scripts which ran on first boot in this image.

Also (I'm too impatient to compile images, I just use Image Builder), the location was probably buildroot/files/etc/uci-defaults on your build system. Are there other files in buildroot/files/etc/? Specifically buildroot/files/etc/config/?

Ahhh I see. I tried to cd into /rom/ which gave an access denied. Tried the full path /rom/etc/uci-defaults and that worked.

I can see there is quite a few items in there, specifically I can see a file which appears to have an old copy of my config in there.
I just did a find in my build root and found the location where the file was. It was hidden, which is why I couldn't find it there before when I looked in the dir.
it was located in buildroot/files/etc/uci-defaults/ named '99-arokh~' (name of previous builder)

I've recompiled and can confirm everything is happy! Thank you very much for your help.Such a simple issue caused a lot of head scratching... makes it easier when you know the name of the file you're looking for!

If it wasn't for the fact I wanted to apply a wifi (reg-domain) patch and a CPU overclock patch (Having an issue applying that actually..but I've started another thread for that), then I'd only be using the imagebuilder.

thanks again.

I was under impression that in recent LEDE images regdomain info has been adjusted so that no reghack is needed. But even if it was needed, you could have just built a package for your platform once and included it in your images with the image builder.

Can't help you with the CPU overclock patch.

PS. You should totally be able to cd to /rom on your router. If you got an error -- you either tried to do it on your build system or you were doing it wrong.

the reg-domains look a lot better in LEDE, definitely. It was more about the power output - the limits are below what is allowed in my country, so wanted to pump them up a little.
I will look into building a package- as mentioned though, still very new to me, so I'll get there!

ah yes, I forgot to put cd when going into /rom - it's been a long day! :slight_smile: