LuCI plugin and companion CLI tools for building DHCP option entries on GL.iNet routers running OpenWrt.
The LuCI app writes directly to /etc/config/dhcp through UCI. The companion CLI tools remain available for shell-driven workflows and generate:
ucicommands you can paste into an SSH session on the router- a
/etc/config/dhcpsnippet you can apply manually
This branch now includes an OpenWrt/LuCI package scaffold:
Makefilehtdocs/luci-static/resources/view/dhcp-options-wizard.jsroot/usr/share/luci/menu.d/luci-app-gli-dhcp-options.jsonroot/usr/share/rpcd/acl.d/luci-app-gli-dhcp-options.json
The web UI appears under Network -> DHCP Options Wizard and edits list dhcp_option values for each config dhcp section.
To build it inside an OpenWrt buildroot, place this repository in your package feed and compile luci-app-gli-dhcp-options.
For direct router install on this branch:
wget -O- https://raw.githubusercontent.com/zippyy/GL.iNet-DHCP-Options-Wizard/feature/luci-plugin/install-luci.sh | shThat installer places the LuCI view, menu entry, and ACL files directly on the router, then restarts rpcd and uhttpd.
wget -O- https://raw.githubusercontent.com/zippyy/GL.iNet-DHCP-Options-Wizard/main/install.sh | shThen run:
glinet-dhcp-wizardThis installs the POSIX shell version directly on a GL.iNet/OpenWrt router at /usr/bin/glinet-dhcp-wizard.
If you want to run the Node.js version on a laptop or desktop:
npm install -g git+https://github.com/zippyy/GL.iNet-DHCP-Options-Wizard.gitThen run:
glinet-dhcp-wizardRequirements:
- Node.js 22 or newer
Run:
npm startYou can also run the CLI entrypoint directly:
node ./src/cli.js- DHCP option
3: default gateway - DHCP option
6: DNS servers - DHCP option
15: domain name - DHCP option
42: NTP servers - DHCP option
66: TFTP server name - DHCP option
67: bootfile name - DHCP option
252: WPAD URL - Custom option mode for any other DHCP code/value pair
uci -q delete dhcp.lan.dhcp_option
uci add_list dhcp.lan.dhcp_option='6,1.1.1.1,8.8.8.8'
uci add_list dhcp.lan.dhcp_option='42,192.168.8.1'
uci commit dhcp
/etc/init.d/dnsmasq restart
- On GL.iNet/OpenWrt, these entries map to
list dhcp_optionin/etc/config/dhcp. - Some DHCP options expect specific encoding or payload formats. For those, use the custom option path and provide the exact raw value expected by
dnsmasq. - The router install uses the
glinet-dhcp-wizard.shshell implementation. The Node CLI insrc/cli.jsremains available for workstation use.