Hi,
I'm trying to configure ipset table, but when I execute "ipset create", it generates the error, "Cannot open session to kernel".
root@OpenWrt:~# ipset create gfwlist hash:ip
ipset v7.6: Cannot open session to kernel.
I checked the modules regarding ipset, as followes.
root@OpenWrt:~# opkg list_installed |grep ipset
ipset - 7.6-1
kmod-ipt-ipset - 5.4.87-1
libipset13 - 7.6-1
Please help me to solve this issue
Thanks in advance
1 Like
It appears you are using a custom build, and the IP set support is disabled in the kernel.
Performing a clean build with the IP set support enabled should resolve the issue.
I've never used custom build on openwrt.
I just did "opkg install iptables ipset curl" on my openwrt router with snapshot.
As "ipset create" generates the above error, I tried reinstalling kmod-ipt-ipset with "opkg install", after then, however "ipset create" still generates the same error.
By any chance, do you have any other idea?
1 Like
The output is as followes.
root@OpenWrt:~# ubus call system board
{
"kernel": "5.4.87",
"hostname": "OpenWrt",
"system": "MediaTek MT7621 ver:1 eco:3",
"model": "Xiaomi Redmi Router AC2100",
"board_name": "xiaomi,redmi-router-ac2100",
"release": {
"distribution": "OpenWrt",
"version": "SNAPSHOT",
"revision": "r15481-7e4f055990",
"target": "ramips/mt7621",
"description": "OpenWrt SNAPSHOT r15481-7e4f055990"
}
}
1 Like
grep kmod /etc/opkg/*; opkg list-installed | grep kernel
1 Like
The output is as followes.
root@OpenWrt:~# grep kmod /etc/opkg/*; opkg list-installed | grep kernel
/etc/opkg/distfeeds.conf:src/gz openwrt_kmods https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/kmods/5.4.87-1-cdfe68f3ba866d28bcf669578bd1a9ad
kernel - 5.4.87-1-cdfe68f3ba866d28bcf669578bd1a9ad
1 Like
Try to re-flash an up-to-date snapshot.
1 Like
cat /usr/lib/opkg/status | grep -A6 'Package: kmod-ipt-ipset'
1 Like
x86cokr
January 31, 2021, 6:21am
10
The output is as followes.
root@OpenWrt:~# cat /usr/lib/opkg/status | grep -A12 'Package: kmod-ipt-ipset'
Package: kmod-ipt-ipset
Version: 5.4.87-1
Depends: kernel (= 5.4.87-1-cdfe68f3ba866d28bcf669578bd1a9ad), kmod-ipt-core, kmod-nfnetlink
Status: install user installed
Architecture: mipsel_24kc
Installed-Time: 1612070877
Package: libpcap1
Version: 1.9.1-3
Depends: libc
Provides: libpcap
Status: install ok installed
Architecture: mipsel_24kc
1 Like
x86cokr
January 31, 2021, 10:11am
11
Thanks a lot
I reflashed the recent snapshot, whose kernel version is 5.4.93 like the following, then ipset works ok with this kernel version.
root@OpenWrt:~# ubus call system board
{
"kernel": "5.4.93",
"hostname": "OpenWrt",
"system": "MediaTek MT7621 ver:1 eco:3",
"model": "Xiaomi Redmi Router AC2100",
"board_name": "xiaomi,redmi-router-ac2100",
"release": {
"distribution": "OpenWrt",
"version": "SNAPSHOT",
"revision": "r15655-ddab795b37",
"target": "ramips/mt7621",
"description": "OpenWrt SNAPSHOT r15655-ddab795b37"
}
}
2 Likes
system
Closed
February 10, 2021, 10:12am
12
This topic was automatically closed 0 minutes after the last reply. New replies are no longer allowed.