I can't get opkg update to work

Hello. I'm a novice computer user who only started using computers for three months, so I'm sorry that I don't understand anything. My problem is that I can't do opkg update and can't even install the software. In my environment, I have a PPPOE connection from GE-PON-ONU TYPE-D to WAN. I am using an R7800 router. I am using OpenWRT version 22.03.6. The client PC is using Ubuntu 22.04.4 LTS. It was written on the forum that it was a DNS configuration issue, and I tried configuring 8.8.8.8, 8.8.4.4, 1.1.1.1, and 1.0.0.1 from the CLI for both WAN and LAN, and for each. When setting DNS 8.8.8.8 to WAN, opkg update is possible immediately after setting, but if you do it for the second time, a wget 4 error will be output. The settings are attached. Do we have enough to offer? I fully understand that you are all busy, but could you please lend me your help? Thank you.

`root@OpenWrt:~# uci show network; uci show firewall; uci show dhcp
network.loopback=interface
network.loopback.device='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.ula_prefix='fd8b:79d2:4111::/48'
network.@device[0]=device
network.@device[0].name='br-lan'
network.@device[0].type='bridge'
network.@device[0].ports='eth1.1'
network.lan=interface
network.lan.device='br-lan'
network.lan.proto='static'
network.lan.ip6assign='60'
network.lan.ipaddr='192.168.2.1/24'
network.lan.dns='1.0.0.1' '8.8.8.8'
network.lan.peerdns='0'
network.wan=interface
network.wan.proto='pppoe'
network.wan.username='xxxx'
network.wan.password='xxxx'
network.wan.ipv6='auto'
network.wan.device='eth0.2'
network.wan.dns='8.8.8.8'
network.wan.peerdns='0'
network.wan6=interface
network.wan6.device='eth0.2'
network.wan6.proto='dhcpv6'
network.@switch[0]=switch
network.@switch[0].name='switch0'
network.@switch[0].reset='1'
network.@switch[0].enable_vlan='1'
network.@switch_vlan[0]=switch_vlan
network.@switch_vlan[0].device='switch0'
network.@switch_vlan[0].vlan='1'
network.@switch_vlan[0].ports='1 2 3 4 6t'
network.@switch_vlan[1]=switch_vlan
network.@switch_vlan[1].device='switch0'
network.@switch_vlan[1].vlan='2'
network.@switch_vlan[1].ports='5 0t'
firewall.@defaults[0]=defaults
firewall.@defaults[0].syn_flood='1'
firewall.@defaults[0].input='ACCEPT'
firewall.@defaults[0].output='ACCEPT'
firewall.@defaults[0].forward='REJECT'
firewall.@zone[0]=zone
firewall.@zone[0].name='lan'
firewall.@zone[0].network='lan'
firewall.@zone[0].input='ACCEPT'
firewall.@zone[0].output='ACCEPT'
firewall.@zone[0].forward='ACCEPT'
firewall.@zone[1]=zone
firewall.@zone[1].name='wan'
firewall.@zone[1].network='wan' 'wan6'
firewall.@zone[1].input='REJECT'
firewall.@zone[1].output='ACCEPT'
firewall.@zone[1].forward='REJECT'
firewall.@zone[1].masq='1'
firewall.@zone[1].mtu_fix='1'
firewall.@forwarding[0]=forwarding
firewall.@forwarding[0].src='lan'
firewall.@forwarding[0].dest='wan'
firewall.@rule[0]=rule
firewall.@rule[0].name='Allow-DHCP-Renew'
firewall.@rule[0].src='wan'
firewall.@rule[0].proto='udp'
firewall.@rule[0].dest_port='68'
firewall.@rule[0].target='ACCEPT'
firewall.@rule[0].family='ipv4'
firewall.@rule[1]=rule
firewall.@rule[1].name='Allow-Ping'
firewall.@rule[1].src='wan'
firewall.@rule[1].proto='icmp'
firewall.@rule[1].icmp_type='echo-request'
firewall.@rule[1].family='ipv4'
firewall.@rule[1].target='ACCEPT'
firewall.@rule[2]=rule
firewall.@rule[2].name='Allow-IGMP'
firewall.@rule[2].src='wan'
firewall.@rule[2].proto='igmp'
firewall.@rule[2].family='ipv4'
firewall.@rule[2].target='ACCEPT'
firewall.@rule[3]=rule
firewall.@rule[3].name='Allow-DHCPv6'
firewall.@rule[3].src='wan'
firewall.@rule[3].proto='udp'
firewall.@rule[3].dest_port='546'
firewall.@rule[3].family='ipv6'
firewall.@rule[3].target='ACCEPT'
firewall.@rule[4]=rule
firewall.@rule[4].name='Allow-MLD'
firewall.@rule[4].src='wan'
firewall.@rule[4].proto='icmp'
firewall.@rule[4].src_ip='fe80::/10'
firewall.@rule[4].icmp_type='130/0' '131/0' '132/0' '143/0'
firewall.@rule[4].family='ipv6'
firewall.@rule[4].target='ACCEPT'
firewall.@rule[5]=rule
firewall.@rule[5].name='Allow-ICMPv6-Input'
firewall.@rule[5].src='wan'
firewall.@rule[5].proto='icmp'
firewall.@rule[5].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type' 'router-solicitation' 'neighbour-solicitation' 'router-advertisement' 'neighbour-advertisement'
firewall.@rule[5].limit='1000/sec'
firewall.@rule[5].family='ipv6'
firewall.@rule[5].target='ACCEPT'
firewall.@rule[6]=rule
firewall.@rule[6].name='Allow-ICMPv6-Forward'
firewall.@rule[6].src='wan'
firewall.@rule[6].dest='*'
firewall.@rule[6].proto='icmp'
firewall.@rule[6].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type'
firewall.@rule[6].limit='1000/sec'
firewall.@rule[6].family='ipv6'
firewall.@rule[6].target='ACCEPT'
firewall.@rule[7]=rule
firewall.@rule[7].name='Allow-IPSec-ESP'
firewall.@rule[7].src='wan'
firewall.@rule[7].dest='lan'
firewall.@rule[7].proto='esp'
firewall.@rule[7].target='ACCEPT'
firewall.@rule[8]=rule
firewall.@rule[8].name='Allow-ISAKMP'
firewall.@rule[8].src='wan'
firewall.@rule[8].dest='lan'
firewall.@rule[8].dest_port='500'
firewall.@rule[8].proto='udp'
firewall.@rule[8].target='ACCEPT'
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.d/resolv.conf.auto'
dhcp.@dnsmasq[0].localservice='1'
dhcp.@dnsmasq[0].ednspacket_max='1232'
dhcp.@dnsmasq[0].port='53'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.leasetime='12h'
dhcp.lan.dhcpv4='server'
dhcp.lan.dhcpv6='server'
dhcp.lan.ra='server'
dhcp.lan.ra_flags='managed-config' 'other-config'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'
dhcp.odhcpd.loglevel='4'
dhcp.@host[0]=host
dhcp.@host[0].name='09'
dhcp.@host[0].ip='192.168.2.139'
dhcp.@host[0].mac='xxxx'

What is the output of the following commands:

ubus call system board
ping 151.101.2.132
ping downloads.openwrt.org
opkg update

Thank you for your quick response.

root@OpenWrt:~# ping 151.101.2.132
PING 151.101.2.132 (151.101.2.132): 56 data bytes
64 bytes from 151.101.2.132: seq=0 ttl=58 time=4.260 ms
64 bytes from 151.101.2.132: seq=1 ttl=58 time=4.489 ms
64 bytes from 151.101.2.132: seq=2 ttl=58 time=4.550 ms
64 bytes from 151.101.2.132: seq=3 ttl=58 time=4.961 ms
64 bytes from 151.101.2.132: seq=4 ttl=58 time=3.993 ms
64 bytes from 151.101.2.132: seq=5 ttl=58 time=4.396 ms
64 bytes from 151.101.2.132: seq=6 ttl=58 time=4.517 ms
64 bytes from 151.101.2.132: seq=7 ttl=58 time=4.756 ms
64 bytes from 151.101.2.132: seq=8 ttl=58 time=4.209 ms
64 bytes from 151.101.2.132: seq=9 ttl=58 time=4.333 ms
64 bytes from 151.101.2.132: seq=10 ttl=58 time=5.583 ms
^Z[1]+  Stopped                    ping 151.101.2.132
root@OpenWrt:~# ping downloads.openwrt.org
PING downloads.openwrt.org (2a04:4e42::644): 56 data bytes
^Z[2]+  Stopped                    ping downloads.openwrt.org
root@OpenWrt:~# opkg update
Downloading https://downloads.openwrt.org/releases/22.03.6/targets/ipq806x/generic/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.6/targets/ipq806x/generic/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.6/packages/arm_cortex-a15_neon-vfpv4/base/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.6/packages/arm_cortex-a15_neon-vfpv4/base/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.6/packages/arm_cortex-a15_neon-vfpv4/luci/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.6/packages/arm_cortex-a15_neon-vfpv4/luci/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.6/packages/arm_cortex-a15_neon-vfpv4/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.6/packages/arm_cortex-a15_neon-vfpv4/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.6/packages/arm_cortex-a15_neon-vfpv4/routing/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.6/packages/arm_cortex-a15_neon-vfpv4/routing/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.6/packages/arm_cortex-a15_neon-vfpv4/telephony/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.6/packages/arm_cortex-a15_neon-vfpv4/telephony/Packages.gz

Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.6/targets/ipq806x/generic/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

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

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

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.6/packages/arm_cortex-a15_neon-vfpv4/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

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

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

The problem is related to IPv6 which isn't working properly.

remove the wan6 interface, restart, and try again.

1 Like

The problem was magically resolved. Let's understand and learn from this cause. thank you very much.

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:

Remove the DNS entries on the LAN interface. That options signals the DNSs that are available on that interface, not the DNSs that clients on that interface should use.

1 Like

Thank you for your advice. I did that.

1 Like

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