[Solved] Opkg update returns error unless wan6 is disabled

I'm trying to configure OpenWrt on a GL-MT6000 router. I replaced the modified fork of OpenWrt that came with the router with the sysupgrade image provided by the Firmware Selector. I went through the installation guide, setting up basics, like passwords, enabling WiFi and so on.

However, when I try to opkg update, either through SSH or through the LuCI web interface, I get an error:

The opkg update command failed with code 7 .

Here is the entire Error message:

Error
SSL error: NET - Sending information through the socket failed
SSL error: NET - Sending information through the socket failed
SSL error: NET - Sending information through the socket failed
SSL error: NET - Sending information through the socket failed
SSL error: NET - Sending information through the socket failed
SSL error: NET - Sending information through the socket failed
SSL error: NET - Sending information through the socket failed
Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.4/targets/mediatek/filogic/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.4/packages/aarch64_cortex-a53/base/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.4/targets/mediatek/filogic/kmods/6.6.110-1-6a9e125268c43e0bae8cecb014c8ab03/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.4/packages/aarch64_cortex-a53/luci/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.4/packages/aarch64_cortex-a53/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.4/packages/aarch64_cortex-a53/routing/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.4/packages/aarch64_cortex-a53/telephony/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

I am not sure why am I receiving this error, particularly as my connectivity seems to be fine. I can ping anything I want, my devices that connect to the router have full access to the internet and so on.

I googled around, and I have tried out the following suggestions:

  • Checking that the system time is correct
  • Making my LAN interface use a custom DNS server (I've been using 8.8.8.8)

None of these solved the problem. However, when I then tried out the suggestion of disabling my wan6 interface (I have 3 interfaces currently: lan, wan, and wan6), then opkg update runs without any errors.

Could someone explain to me why opkg update requires me disabling the wan6 interface? This is basically a completely new router, a fresh OpenWrt install with nothing but just the basic configurations, and I expected it to work pretty much out of the box, but something seems to be wrong, unless wan6 is meant to interfere with opkg.

This is not an entirely uncommon situation. Basically, your upstream network (likely the ISP, but can depend on the topology of your network) doesn't have a full dual-stack (IPv4+IPv6) environment. However, the DNS lookup for downloads.openwrt.org returns IPv6 results. The opkg system in OpenWrt, in turn, tries to use IPv6 to reach the downloads server, but that fails because IPv6 connectivity isn't actually available.

Deleting the wan6 interface forces all connections to IPv4 (which obviously works) and the connections succeed.

2 Likes

Thank you, that makes sense!

On the ISP side of things, I have an old Sagemcom 3686v2 modem/router, which I've set up in bridge mode, with all traffic going to my GL-MT6000. I assumed that I had IPv6 connectivity, because the wan6 interface showed that it had an IPv6 address, and I could do IPv6 ping to openwrt.org via Diagnostics, although now I see that I can't ping IPv6-only websites, and https://test-ipv6.com/ returns a 0/10.

Glad the explanation helped.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.