stubby icon indicating copy to clipboard operation
stubby copied to clipboard

Stubby and Openwrt installation procedure

Open hanvinke opened this issue 1 year ago • 6 comments

Lately I cannot install stubby as usual:

` opkg install stubby Unknown package 'stubby'. Collected errors:

  • opkg_install_cmd: Cannot install package stubby.`

I am using latest release Openwrt 23.05.03. The firmwareselector page from openwrt also does not recognize Stubby as a program anymore.

Is this intentional?

hanvinke avatar May 18 '24 13:05 hanvinke

Update: Although I updated twice with opkg update Stubby was not found. But Stubby was found after updating through the luci gui. Probably the reason it was not found on the firmware selector page is because the device i use is only supported through a Snapshot (not yet officially supported).

Stubby

So I will close this issue.

hanvinke avatar May 18 '24 17:05 hanvinke

Thanks for reporting @hanvinke . If anyone else has the issue, we at least know what to do.

wtoorop avatar May 19 '24 08:05 wtoorop

@wtoorop Thanks for the reaction!

Did not have much time recently to test Stubby. But got some mixed feelings when following the guide for installing with OpenWrt though. For instance when a user reboots the device Stubby will lose its DNSSEC functionality. This is because the directory "/var/lib/stubby/" does not exist anymore. The reason is OpenWrt´s /var is just a symlink to /tmp, thus only resides on a tmpfs-partition. It is however not recreated on boot. So Stubby´s Zero configuration will fail and will try to look for the default trust anchor location.

"Stubby -i" shows "default_trust_anchor_location": <bindata of "/etc/unbound/getdns-root.key" But Unbound is not installed, only dnsMasq. Maybe it is an idea to give some more information about this in the README? I think a normal user might get frustrated about Stubby not working after a reboot.

//Edit: I still need to examine if there is a difference in behaviour when using an ext4 or squashfs openWRT-image when installing Stubby.

hanvinke avatar Jun 02 '24 07:06 hanvinke

Reopening and changed description

hanvinke avatar Jun 02 '24 08:06 hanvinke

@wtoorop Thanks for the reaction!

Did not have much time recently to test Stubby. But got some mixed feelings when following the guide for installing with OpenWrt though. For instance when a user reboots the device Stubby will lose its DNSSEC functionality. This is because the directory "/var/lib/stubby/" does not exist anymore. The reason is OpenWrt´s /var is just a symlink to /tmp, thus only resides on a tmpfs-partition. It is however not recreated on boot. So Stubby´s Zero configuration will fail and will try to look for the default trust anchor location.

"Stubby -i" shows "default_trust_anchor_location": <bindata of "/etc/unbound/getdns-root.key" But Unbound is not installed, only dnsMasq. Maybe it is an idea to give some more information about this in the README? I think a normal user might get frustrated about Stubby not working after a reboot.

//Edit: I still need to examine if there is a difference in behaviour when using an ext4 or squashfs openWRT-image when installing Stubby.

read the openwrt forum ... you have an option to have /var permanent ... and really has this anything to do with stubby !!! open a question instead on forum.openwrt.org

rmandrad avatar Jul 03 '24 07:07 rmandrad

@rmandrad Hi, thank you for your input.

I think my main concern is more about a simple user following the instructions found on https://github.com/openwrt/packages/blob/master/net/stubby/files/README.md . These are fine but are missing in my opinion some important points. [ I just hate to see a highly sophisticated program like Stubby fail in the real world because of some silliness. The creators deserve better in my opinion. ]

Firstly Stubby will not work "out of the box" after installation. This is because the directory /var/lib/stubby is not created automatically. So mkdir /var/lib/stubby and chown -R stubby:stubby /var/lib/stubby is needed. Then it would be nice to have a description about adding /var/lib/stubby to the backup list via System > Backup/Flash firmware via LuCI. Then with an attended sysupgrade (see https://openwrt.org/docs/guide-user/installation/attended.sysupgrade) the directory and files will be preserved after a reinstallation for example. I don´t know if making /var permanent is in general a good idea in this case.

hanvinke avatar Jul 03 '24 12:07 hanvinke

This issue seems to be solved. With the latest snapshot images the directory /var/lib/stubby is automatically created and preserved after reboot.

The problem might have arisen due to the package manager switching to APK in openWRT. Maybe solved with https://github.com/robimarko/openwrt/commit/077a7244567c89401ac4ca44881c844e04cfbfb2

hanvinke avatar Feb 11 '25 19:02 hanvinke