What's new

YazDHCP - alpha - Extended DHCP management script

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

Jack Yaz

Part of the Furniture
ALPHA
Installation
Using your preferred SSH client/terminal, copy and paste the following command, then press Enter:
Code:
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/YazDHCP/master/YazDHCP.sh" -o "/jffs/scripts/YazDHCP" && chmod 0755 /jffs/scripts/YazDHCP && /jffs/scripts/YazDHCP install
 
Last edited:
I'm tempted to make another GUI addon that can use the custom settings API to read/write to JFFS and do this. You increased the user page limit from 10 to 20, so someone has to start filling those up!

I was *just* going to suggest what a great opportunity it would be to build some kind of config editor into the GUI for those of us who aren't too familiar with using these methods, and since I just went through this exercise to dump my vpn custom config into an openvpnclient1.postconf file... LOL... We're all behind you on this! Thank you! :)
 
I'm tempted to make another GUI addon that can use the custom settings API to read/write to JFFS and do this. You increased the user page limit from 10 to 20, so someone has to start filling those up!
Great idea given that Asus keeps reducing the amount of nvram to static IP management. I don’t blame them - it really does start to eat into the small nvram space.

I switched to dnsmasq.conf.add and hosts.add long ago. Works great, more portable and you could use some of the many options dnsmasq provides.

I would also recommend that the GUI provides an initial “export existing nvram static info to dnsmasq.conf.add“ (and create a hosts.add). You could also support different lease times on a per IP basis, etc.

Go for it Jack!
 
I'm tempted to make another GUI addon that can use the custom settings API to read/write to JFFS and do this. You increased the user page limit from 10 to 20, so someone has to start filling those up!

I say, sounds good
 
Last edited:
Great idea given that Asus keeps reducing the amount of nvram to static IP management. I don’t blame them - it really does start to eat into the small nvram space.

I switched to dnsmasq.conf.add and hosts.add long ago. Works great, more portable and you could use some of the many options dnsmasq provides.

I would also recommend that the GUI provides an initial “export existing nvram static info to dnsmasq.conf.add“ (and create a hosts.add). You could also support different lease times on a per IP basis, etc.

Go for it Jack!
@Xentrk has a script that can export the existing to dnsmasq.conf.add already....let me see if he minds me using it!
 
I'm tempted to make another GUI addon that can use the custom settings API to read/write to JFFS and do this.

That would be a very useful utility indeed @Jack Yaz with the impending 128 => 64 reduction - would you envisage it being part of scMerlin perhaps?
 
I'm working on it as a separate script/entity

@Jack Yaz
Ah I see - anxious to stake a claim on those 20 available slots :)
Thanks, looking forward to it.

(J7 arriving soon to an AMTM near you ...)
 
As it happens I'm looking to override the stock Asus DHCP page, so not even using one of the user pages :)

Sounds good @Jack Yaz, looking forward as always to what you come up with. May I assume some kind of export/import of (externally stored) lists from/to your new “editor” would be on the radar?
 
Sounds good @Jack Yaz, looking forward as always to what you come up with. May I assume some kind of export/import of (externally stored) lists from/to your new “editor” would be on the radar?
my current plan is to just rework the existing DHCP page to read/write from jffs via the addons API rather than to nvram/pseudo-nvram-jffs
Since each "setting" can be up to 2999 characters/bytes with the custom_settings.txt being allowed to be 8KB overall, that gives a pretty big increase in the number of reservations allowed.
Reservations will only exist in custom_settings.txt when the page is submitted, before being written out to my script's directory (and parsing into dnsmasq's config)
 
Any willing alpha testers for this script? I'm confident that I've covered enough in my testing, but I'm currently only able to test on an AC86U which is HND, so I'd like any non-HND users especially!

The script will export and unset the existing nvram variables for static assignments, but I recommend screenshotting your WebUI assignment list in case anything goes wrong. For this reason I'd prefer starting testing with users with not many assignments, so if my script doesn't do something correctly you don't have to manually re-input 50+ entries!

Reply here if interested and I will send a PM.
 
It would be awesome if the UI would allow IPs that are not on the local LAN so resolution of private IPs on different networks is possible!
I assume you'd be looking for a GUI way to edit a hosts file in this case, rather than assign DHCP addresses?
 
I assume you'd be looking for a GUI way to edit a hosts file in this case, rather than assign DHCP addresses?
do the entries appear in DNSMASQ.conf the exact same way they do when you use the regular GUI option?

for example

Code:
dhcp-host=A1:B2:C3:D4:E5:F6,set:A1:B2:C3:D4:E5:F6,192.168.1.250

and host file

Code:
192.168.1.250 Some-Device-Name
 
do the entries appear in DNSMASQ.conf the exact same way they do when you use the regular GUI option?

for example

Code:
dhcp-host=A1:B2:C3:D4:E5:F6,set:A1:B2:C3:D4:E5:F6,192.168.1.250

and host file

Code:
192.168.1.250 Some-Device-Name
yes and no. i add the following to dnsmasq.conf.add:
Code:
addn-hosts=/jffs/addons/YazDHCP.d/.hostnames # YazDHCP_hostnames
dhcp-hostsfile=/jffs/addons/YazDHCP.d/.staticlist # YazDHCP_staticlist
dhcp-optsfile=/jffs/addons/YazDHCP.d/.optionslist # YazDHCP_optionslist
the contents of these files then matches (omitting the dhcp-host= bit for staticlist)
 
yes and no. i add the following to dnsmasq.conf.add:
Code:
addn-hosts=/jffs/addons/YazDHCP.d/.hostnames # YazDHCP_hostnames
dhcp-hostsfile=/jffs/addons/YazDHCP.d/.staticlist # YazDHCP_staticlist
dhcp-optsfile=/jffs/addons/YazDHCP.d/.optionslist # YazDHCP_optionslist
the contents of these files then matches (omitting the dhcp-host= bit for staticlist)
I only ask because I am interested testing your script ( i got 123 devices). I was just checking how you defined the list.
 

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

Staff online

Top