Another neophyte question. I need to add some CNAME data to dsnmasq on my GT MT-6000. (The ability to do this is why I picked a GL-iNet router.) However, knowing that I can do it and knowing how to do it are not the same thing. As near as I can tell, I need to add the following commands (with the fake names and MAC addresses replaced by the real ones).
uci add dhcp domain
uci set dhcp.@domain[-1].name="NAS_2"
uci set dhcp.@domain[-1].ip="192.168.8.57"
uci commit dhcp
service dnsmasq restart
uci add dhcp host
uci set dhcp.@host[-1].name="NAS_2"
uci set dhcp.@host[-1].mac="00:11:22:33:44:55"
uci set dhcp.@host[-1].ip="192.168.8.57"
uci set dhcp.@host[-1].dns="1"
uci commit dhcp
service dnsmasq restart
uci add dhcp cname
uci set dhcp.@cname[-1].cname="NAS-2"
uci set dhcp.@cname[-1].target="NAS_2"
uci add dhcp cname
uci set dhcp.@cname[-1].cname="LanMail"
uci set dhcp.@cname[-1].target="NAS_2"
uci commit dhcp
service dnsmasq restart
Is there some way to enter this through the LuCI GUI or do I need to SSH into the router?
When I enter this, does it become permanent or do I need to put it in a script that gets executed after every reboot? And if I need write a script, is there a user-friendly text editor in the LuCI GUI or do I need to use vi or some such to write the script?
Are multiple names allowed in the cname= field:
uci set dhcp.@cname[-1].cname="NAS-2,LanMail”
as is allowed on an actual CNAME record, or do I need to do multiple definitions as I’ve done?
Can I do all of the above with just one”comit dhcp” and “restart”, or are there timing issues that require multiples as I’ve done above?
You need a more recent version of the OpenWrt base, if you have luck the OP24 versions are new enough to do it, the only backslash is that the gl ui and features are older, but this will give you new luci dhcp options called dns records.
As soon you wrote uci commit dhcp it has been written to config file dhcp in /etc/config/dhcp
I don't think so from how the logic is designed in the config nodes.
so for each you use:
uci set dhcp cname # creates a new cname node
uci set dhcp.@cname[-1].cname="blah.com" # add sub option node.
uci set dhcp.@cname[-1].target="example.com" # add another sub option node, the -1 is the last cname main node created.
uci commit dhcp # saves from memory to file
What I see outputed from luci there is no list so you have to build them for each.
When done you only need to issue: /etc/init.d/dnsmasq restart to reload dhcp.
There is also /etc/dnsmasq.conf if you want a raw dnsmasq config, I will warn about this it will skip half of OpenWrts stuff, its really easy to break things but if you have huge lists which are easier in dnsmasq format it is a option, I do that for my lancache server list I point basically all my domains to the monolithic ip so I'm not required to use the lancache-dns docker image
I’m very new to the GL gui and firmware, and I don’t know OpenWrt at all. My questions may not make any sense but I’ll ask them anyway.
I assume that the GL firmware is a bundled set of the GL gui and the OpenWrt base - there’s no way to upgrade from OP21 to OP24 and keep the GL gui. True? I’m not sure I’m up to dealing with native OpenWrt. For one thing, installing and configuring an OpenVPN server does not look very straightforward.
I’m running mt6000-4.8.3_release-877-1016-1760589400 which is built on OP21. On the GL download page under the OpenWrt 24 tab I see references to 4.8.n which makes me think these are OpenWrt OP24 with the GL GUI. Am I misunderstanding what I’m seeing? The 4.8.3 version is beta but the older versions don’t mention beta.
I saw that tab - and even downloaded a couple of the files - but I wasn’t I sure what I was looking at. The most recent OP24 is marked “beta”, but GL GUI release number doesn’t match the release I saw reported in the beta test (which apparently ended a few weeks ago). I guess there are levels of beta testing. I also guess that no firmware using OP24 can be considered stable.
But I think my initial question wasn’t answered (if I run into problems need to go back to OP21-based firmware). Do I need to SSH into the router or is there a way to enter the uci commands via a GUI?
You can still use the normal upgrade system regardless
The only key of thumb is that you don't need to restore or keep configuration between these distinct different versions.
The beta of OP24 is basically just a fork off one of the latest OpenWrt releases, but is in beta because of the gl ui and features, the configuration differs due to total different wifi drivers and references in the configuration.
Theres only a few reasons to stay on the defaults firmwares vs OP24, for newer gl feature rich support you can better stay on the normal firmware but this will give you an older OpenWrt base, but if you want more advancement in OpenWrt especially from the luci ui or the MT76 wifi drivers from OpenWrt go with the OP24 version, you will lack some newer features from the gl sdk, but eventually these also get added but later.
Personally I'm a OP24 user because it allows me to use more grain control over the options I can do over wireless, like using multi psk, but the newer vpn dashboard and such are on the default firmware.
If flashing still goes wrong or you came into a bootloop due to flashing errors, you can simply go to U-boot, remove the power from the device, hold reset and then plug the power in it, then give your network a static ip assignment to 192.168.1.2 and visit 192.168.1.1 there you can completely restore the firmware by uploading it.
If you ever plan to not using GL-iNet firmware at all but directly from OpenWrt always use the images with sysupgrade in its naming, and not the factory ones as these replace U-boot with a less user friendly one from OpenWrt itself.
OK. I’m now using openwrt-mt6000-4.8.2-op24-0903-1756864663. The LuCI DSN Records stuff is great but I think I’ve found some bugs in basic Admin Panel Clients display.
I’ve succeeded in adding stuff (mostly via the LuCI GUI) but I’m definitely running into a problem. I’ll start a new thread for that problem because it has nothing to do with how to add the stuff. (It probably has everything to do with what I’ve added.)