What's new

dnsmasq.conf.add without custom firmware?

  • 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!

filmorependrgn

New Around Here
Hi all,

I'm really close to getting PXE boot server working on my RT-AC88U but need to be able to add further customization options to dnsmasq.

I think Merlin's ability to add custom options would work, but I really don't want to install a custom firmware just to add less than a half a dozen lines to dnsmasq.conf

Does anyone know if there's a way to specify more options to dnsmasq (some magic filename in jffs ) without flashing a custom rom?

Thanks,
Charles
 
I also need this option.
I would put Google Safe Search without having to change the firmware.
 
I'm a few years later... Still looking for this same issue. Isn't there someone that knows how to do this? Honestly, I'm REALLY surprised, disappointed in ASUS having a firmware that does tons of things yet not something as simple (which you can find on a $20 router) as adding manual dns entries!?!?
 
No custom host names for clients, as far as I remember. You need Merlin for that.
 
I'm a few years later... Still looking for this same issue. Isn't there someone that knows how to do this? Honestly, I'm REALLY surprised, disappointed in ASUS having a firmware that does tons of things yet not something as simple (which you can find on a $20 router) as adding manual dns entries!?!?
Asuswrt is a Linux system, which means you can do anything you want.

Three steps to change the dnsmasq.conf:
First, add the content you need to /etc/dnsmasq.conf
Second, restart the dnsmasq service to load the changed config
Finally, save the above content to the self-starting script so that it will run automatically after each boot

You need some basic knowledge of Linux. The second thing may be a little tricky, but search the forums and you will find help.


BTW, this is an OLD thread, please don't disturb it!
 
Asuswrt is a Linux system, which means you can do anything you want.

Three steps to change the dnsmasq.conf:
First, add the content you need to /etc/dnsmasq.conf
Second, restart the dnsmasq service to load the changed config
Finally, save the above content to the self-starting script so that it will run automatically after each boot

You need some basic knowledge of Linux. The second thing may be a little tricky, but search the forums and you will find help.


BTW, this is an OLD thread, please don't disturb it!

You can edit and change /etc/dnsmasq.conf and restart dnsmasq, but the changes will not survive a reboot as the /etc directory is in ram. Changes made to /etc/dnsmasq.conf won't survive a reboot even in Merlin. That is why Merlin has a dnsmasq.conf.add script in /jffs/configs (which is located in nvram), the contents of which get appended to /etc/dnsmasq.conf before the service starts.
 
Even restarting dnsmasq via "service restart_dnsmasq" will destroy /etc/dnsmasq.conf and re-create it. I think you would need to experiment with kill -HUP $(pidof dnsmasq) to force dnsmasq to re-read /etc/ hosts and place your edits there.
 
@dave14305 , would service start_dns work? At one time looking at service.c, I thought I saw code that would have the dnsmasq config reread and acted on without restarting. I have never tried it, but curious.
 
@K-2SO , just curious, what are your objections to installing Merlin? For all practical purposes, Merlin looks and feels just like the stock firmware - just with some side benefits.

I switched to Merlin for his enhanced traffic history recording (had a need for it at the time). Since then though, I use the dnsmasq.conf.add script in /jffs/configs just for the reason you are wanting to do. I have about 10 devices I want to have static IP address and having the DHCP server provide them means the ARP table is kept up to date so I can reference them by their host name.

You just need to create the dnsmasq.conf.add file, and on each line add;

Code:
dhcp-host=00:90:A9:3B:5F:01,192.168.0.14,homecloud,3600

details and format of dhcp-host can be found here;

http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

This method is also a ton easier than typing all the clients by hand on the GUI after a factory reset.

Like I said, just curious. Each to their own.

Cheers
 
I'm a few years later... Still looking for this same issue. Isn't there someone that knows how to do this? Honestly, I'm REALLY surprised, disappointed in ASUS having a firmware that does tons of things yet not something as simple (which you can find on a $20 router) as adding manual dns entries!?!?
You can edit and change /etc/dnsmasq.conf and restart dnsmasq, but the changes will not survive a reboot as the /etc directory is in ram. Changes made to /etc/dnsmasq.conf won't survive a reboot even in Merlin. That is why Merlin has a dnsmasq.conf.add script in /jffs/configs (which is located in nvram), the contents of which get appended to /etc/dnsmasq.conf before the service starts.
you can mount your .conf on top of the regular one. you just need to make sure everything gets copied first from it to the one you wish to mount, then add your options at the end.... there is two options for initializing scripts, either using the nvram option for on mount usb or using the nvram jffs2_exec option which launches at early boot.
 
Last edited:
Similar threads
Thread starter Title Forum Replies Date
T I can't add profiles in Guest Network pro ROG-GTAX6000 ASUSWRT - Official 5

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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