Opkg update: Failed to send request: Operation not permitted

I can post to the forum, so Internet works. No idea why I get with opkg update the message Operation not permitted

root@X1860-K1M:~# opkg update
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7621/packages/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7621/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base/Packages.gz

I installed from https://firmware-selector.openwrt.org/ my own package selection:

-uboot-envtools base-files busybox ca-bundle dnsmasq dropbear firewall4 fstools kmod-gpio-button-hotplug kmod-leds-gpio kmod-mt7915-firmware kmod-nft-offload libc libgcc libustream-mbedtls logd luci mtd netifd nftables odhcp6c odhcpd-ipv6only opkg ppp ppp-mod-pppoe procd procd-seccomp procd-ujail rssileds uboot-envtools uci uclient-fetch urandom-seed urngd wpad-openssl mesh11sd iperf iperf3

root@X1860-K1M:~# ubus call system board
{
	"kernel": "5.15.137",
	"hostname": "X1860-K1M",
	"system": "MediaTek MT7621 ver:1 eco:3",
	"model": "D-Link DAP-X1860 A1",
	"board_name": "dlink,dap-x1860-a1",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "23.05.2",
		"revision": "r23630-842932a63d",
		"target": "ramips/mt7621",
		"description": "OpenWrt 23.05.2 r23630-842932a63d"
	}
}

Network configuration related.

Check your DNS, default gw, and subnets on wan and lan side.

1 Like

From my PC DNS works, from the openwrt extender not.

I can connect via ssh to the extender. So a "little bit" network should work. Maybe there is a package missing with my own image.

root@X1860-K1M:~# ping -c1 192.168.178.1
PING 192.168.178.1 (192.168.178.1): 56 data bytes
64 bytes from 192.168.178.1: seq=0 ttl=64 time=2.881 ms

--- 192.168.178.1 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 2.881/2.881/2.881 ms

DHCP is disabled.

Looks like DNS doesn't work with the openwrt-device.

root@X1860-K1M:~# cat /etc/config/dhcp 

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option cachesize '1000'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'
	option filter_aaaa '0'
	option filter_a '0'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	option ra_slaac '1'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
        option ignore '1'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

With my other openwrt-devices I never configured dns.It worked without doing anything.

root@X1860-K1M:~# ping -c1 forum.openwrt.org
ping: bad address 'forum.openwrt.org'

From another router:

root@C7v5-K1:~# ping -c1 forum.openwrt.org
PING forum.openwrt.org (139.59.210.197): 56 data bytes
64 bytes from 139.59.210.197: seq=0 ttl=54 time=29.783 ms

--- forum.openwrt.org ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 29.783/29.783/29.783 ms

I corrected this.

it did happen to me, it was DNS issue. just check Use DNS servers advertised by peer in wan interface advanced settings.

This is a WDS client. No idea, what and how can I check. I don't use WAN. DNS-server is the Fritzbox from the ISP.

  • try to copy same network configs to the non working router.
  • do a hard reset.
  • set dns manually

What's in /etc/resolv.conf and /tmp/resolv.conf.d/resolv.conf.auto ?

Not 100% sure the 2nd path is correct.

In the meantime I created the image again at https://firmware-selector.openwrt.org/

Same problems.

root@X1860-K1M:~# cat /etc/resolv.conf 
search lan
nameserver 127.0.0.1
nameserver ::1

On a device where it works:

root@C7v5-K1:~# cat /etc/resolv.conf 
search lan
nameserver 127.0.0.1
nameserver ::1
root@X1860-K1M:~# cat /tmp/resolv.conf.d/resolv.conf.auto
[empty]

where it works:

root@C7v5-K1:~# cat /tmp/resolv.conf.d/resolv.conf.auto 
# Interface lan
nameserver 192.168.178.1

So it's probably a DNS issue.

If you want a temp fix, try

echo "nameserver 192.168.178.1" > /etc/resolv.conf

I agree, but i am very confused. I installed in the meantime the standard image. Same problem.

I am interested in what is going wrong. I have lots of openwrt-devices where I never configured anything re dns, disabled dhcp only. And with this model it worked already.

root@X1860-K1M:~# grep -r 178\.1 /etc/config/
[empty]

The question is, why it is empty.

root@X1860-B1:~# grep -r 178\.1 /etc/config/
/etc/config/network:	option ipaddr '192.168.178.17'
/etc/config/network:	option gateway '192.168.178.1'
/etc/config/network:	list dns '192.168.178.1'

I don't remember, that I ever configured 192.168.178.1

You simply have to add with vim /etc/config/network at the end.

config interface 'lan'
...
	option gateway '192.168.178.1'
	list dns '192.168.178.1'

The question is, why I never had to do this (or remember this). Maybe a slightly different way to change from openwrt-network to Fritzbox network. No idea. Maybe an issue with the linux-pc-configuration and static ip and dhcp.

If you set a fixed address to the secondary router "extender", it does not get anything via DHCP. So, it has no knowledge about gateway and DNS server. You need to tell those items to it. Nothing new there. Has been that way always (at least since 2011 when I started using OpenWrt...).

Meanwhile your PC's DNS works, as it has (likely) got the info via DHCP from the main router.

No, the PC uses Network Manager, with a static IP and defined gateway and DNS.With this information it worked. But from this pc via ssh to the opernwrt-extender, gateway and dns was missing.

I flashed about 10 times different routers in the last time, don't understand why it worked there. Could be because of copying config-files.

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