No way to set fixed IPs + no nano to edit

Summary:
1 I cant add a new static IP address in the webui
2 I cant manually edit the dhcp file as nano seems no longer available.
Result I can’t install any new devices (I use only static addresses).

Device
RutX11 RUTX_R_00.07.22.3

Detail
Bought a new printer and tried to add it with a static ip address.

When trying to add a new line to my list of static ip address in /
the ip address field is framed in red with a pop-up message
ipv4 addresses are accepted (eg 192.168.1.1)

If I try to save anyway I get:
An unexpected error occurred

According to Google search this is a known problem:
“Known WebUI Bug (v07.21.x - 07.22): Users on firmware versions 07.21.2, 07.21.3,
and 07.22 may encounter issues where the “Save & Apply” button fails to send data,
resulting in an error.”

Happy to provide my dhcp file if it would be useful,
but it looks correct and has the correct permissions.
Also enabling the disabled web mobile interfaces does not fix the problem.

However I found on:

that I can manually edit my /etc/config/dhcp file.

However when i tried this, nano is no longer there.

So I tried to install nano. Result:

opkg -e /etc/opkg/openwrt/distfeeds.conf update
Downloading https://downloads.openwrt.org/releases/21.02.0/targets/ipq40xx/generic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/releases/21.02.0/targets/ipq40xx/generic/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/21.02.0/packages/arm_cortex-a7_neon-vfpv4/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/21.02.0/packages/arm_cortex-a7_neon-vfpv4/base/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/21.02.0/packages/arm_cortex-a7_neon-vfpv4/vuci/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/21.02.0/packages/arm_cortex-a7_neon-vfpv4/vuci/Packages.gz

Collected errors:

opkg_download: Failed to download https://downloads.openwrt.org/releases/21.02.0/packages/arm_cortex-a7_neon-vfpv4/vuci/Packages.gz, wget returned 8.

root@mcsyd1r:/etc/config# opkg -e /etc/opkg/openwrt/distfeeds.conf install nano
Unknown package ‘nano’.
Package installation encountered an error, removing previously installed packages.

opkg list | grep nano

shows no sign of nano.

I can see here that others seem to be having a problem install nano also.

So, two questions:

  1. how do I now install nano?
    used to be no problem.

  2. when will you fix the webui static addresses problem?

I use static leases extensively, on my 5 teltonika routers,
and the moment, I can’t install anything new.

Hello, did you test if “uci” from CLI would allow you to add that static entry?

root@rutx50:~# uci add dhcp host
cfg05ef36
root@rutx50:~# uci set dhcp.@host[-1].name='test01'
root@rutx50:~# uci set dhcp.@host[-1].mac='ca:fe:ba:be:07:01'
root@rutx50:~# uci set dhcp.@host[-1].ip='192.168.1.16'
root@rutx50:~# uci show dhcp
...
dhcp.@host[0].mac='<removed>'
dhcp.@host[0].name='ocserv'
dhcp.@host[0].ip='192.168.1.8'
dhcp.@host[1]=host
dhcp.@host[1].name='test01'
dhcp.@host[1].mac='ca:fe:ba:be:07:01'
dhcp.@host[1].ip='192.168.1.16'
root@rutx50:~# uci commit dhcp
root@rutx50:~# /etc/init.d/dnsmasq restart
udhcpc: started, vX.YY.Z
udhcpc: broadcasting discover
udhcpc: no lease, failing
root@rutx50:~#

That could be a workaround if WebUI doesn’t. I’m still 07.22.1 yet as of Changelog published CVE’s this far seem not direct threat in my use case. I will upgrade as soon, as I see 07.23.x track doesn’t pop up with too much issues. If above works for you let us know, that’s then a fairly simple workaround till web part gets fixed.

:slight_smile: riku

ps. No nano, but vi is still there.

hi mesrik

thanks for the suggestions.

I didnt think of uci - have never used it,
however I scp’d the dhcp file to a laptop,
edited it on the laptop, scp’d it back to the RutX11,
rebooted both the printer and the RutX11 and…it worked

A cat /etc/config/dhcp and “uci show dhcp” show the correct entry
and a Status/Network/Topology/Scan Lan showed it with the correct ip4 address.

(vi - you need to use vi frequently to remember the commands
as everything is nonstandard (eg modes, to exit :qa!,…)
Rule 1 of editing system files is dont mess up -
and I would definitely mess up with vi)

The only unexpected outcome of the above procedure is that when I do the Scan Lan
the new printer also appears with a ipv6 entry - though nothing else does.
I wonder if I have missed some other configuration entry, though it may also require a client config change.

OK, you got it sorted out already. Perhaps just in case it would be worth checking you printer IPv6 address isn’t unintentionally globally routed address by ISP provided IPv6 PD and your interface towards them has “Delegate IPv6 prefixes” turned on.
Cheers,
:slight_smile: riku

Hmm, hadn’t thought of that.

The ipv6 address that was allocated starts with 2403:5813:…
so that seems like a globally routable ipv6 address.

Delegate IPv6 prefixes is turned on,
but i think that means these address may be routable.

For the moment, I just turned off IpV6 at the wan interface
until I have a chance to understand this better.

Nothing inside my lan should be reachable other than by specific port forwarding (eg for wireguard).

Right, if you leave on IPv6 in the interface, but just turn off that IPv6 “Delegate IPv6 prefixes” (IPv6 PD option) then your router will have IPv6 address your provider side, but inside your LAN doesn’t get delegated routable IPv6 addresses.

Q: So what’s the benefit just for the router having IPv6 if you don’t allow it to LAN?

A: your router would be itself able to use IPv6 for DNS, NTP, etc. services whatever it runs.

IPv6 is OK and fine, but if passed to LAN (with PD) then double check your LAN clients having IPv6 firewall properly configured allowing only bare minimum required IPv6 to work. Especially some bit older clients may have IPv6 but no firewall or lacking rules thereof.
:slight_smile: riku

For extra safety, I also turned off the LAN interface:
Delegate IPv6 prefixes
in case one day i enable the mobile wan interface again (currently disabled) and forget to disable IPv6 on that interface also. .

The problem with just relying on the firewall is that it is not always clear
which traffic I should should enable.
eg In the firewall I am currently allowing
Allow-DHCPv6
but as I dont want ipv6 routing into my network, I am thinking I should disable it.