You are not logged in.

#1 2024-06-17 12:34:43

MAYBL8
Member
From: Florida USA
Registered: 2022-01-14
Posts: 350
Website

[SOLVED] Trying to use ipset for the first time

I read the wiki on ipset and installed it and then tried to run some commands.
Keep getting errors that when googling I can't find what is wrong?
Let me know what info you need .

root@mail mailcow-dockerized]# ipset create myset hash:net
ipset v7.21: Kernel error received: Invalid argument

[root@mail mailcow-dockerized]# modprobe ip_set
modprobe: FATAL: Module ip_set not found in directory /lib/modules/6.6.31-1-lts

[root@mail mailcow-dockerized]# ipset -N myset nethash
ipset v7.21: Kernel error received: Invalid argument

[root@mail mailcow-dockerized]# ipset create myset hash:net
ipset v7.21: Kernel error received: Invalid argument

Last edited by MAYBL8 (2024-06-18 19:01:44)

Online

#2 2024-06-17 14:04:59

cryptearth
Member
Registered: 2024-02-03
Posts: 1,860

Re: [SOLVED] Trying to use ipset for the first time

https://wiki.archlinux.org/title/Ipset
looks like a helper for iptables
from your prompt "dockerized": issue could be the container - have you tried to run on host?

Last edited by cryptearth (2024-06-17 14:06:19)

Offline

#3 2024-06-17 15:34:21

MAYBL8
Member
From: Florida USA
Registered: 2022-01-14
Posts: 350
Website

Re: [SOLVED] Trying to use ipset for the first time

Yeah I am not in the container . You are just seeing the container folder. I am running iptables outside of the container.
That is where the error is coming from trying to create the hash list as I understand it.

Online

#4 2024-06-18 05:45:41

-thc
Member
Registered: 2017-03-15
Posts: 1,066

Re: [SOLVED] Trying to use ipset for the first time

The module "ip_set" seems to be missing. Try reinstalling the lts kernel.

Consider using nftables which has native support for very complex sets.

Offline

#5 2024-06-18 07:43:25

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,680

Re: [SOLVED] Trying to use ipset for the first time

modprobe: FATAL: Module ip_set not found in directory /lib/modules/6.6.31-1-lts

6.6.31-1-lts is slightly dated.

uname -a
pacman -Q linux-lts

Offline

#6 2024-06-18 12:11:30

MAYBL8
Member
From: Florida USA
Registered: 2022-01-14
Posts: 350
Website

Re: [SOLVED] Trying to use ipset for the first time

This should be the latest lts kernel.

[demo@mail /]$ uname -a
Linux mail 6.6.31-1-lts #1 SMP PREEMPT_DYNAMIC Fri, 17 May 2024 11:49:30 +0000 x86_64 GNU/Linux
[demo@mail /]$
[demo@mail /]$ pacman -Q linux-lts
[sudo] password for demo:
linux-lts 6.6.33-1

Just updated

[demo@mail /]$ uname -a
Linux mail 6.6.31-1-lts #1 SMP PREEMPT_DYNAMIC Fri, 17 May 2024 11:49:30 +0000 x86_64 GNU/Linux
[demo@mail /]$ pacman -Q linux-lts
linux-lts 6.6.34-1

Last edited by MAYBL8 (2024-06-18 12:14:24)

Online

#7 2024-06-18 15:38:33

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,680

Re: [SOLVED] Trying to use ipset for the first time

You're booting a dated kernel, usually because you either forgot to mount the /boot partition before the update or because you're mounting a spurious /boot partition.
Check

cat /proc/cmdline

if the kernel is listed with a"boot/vmlinuz*" path you're booting from the root partition, if the kernel is directly referenced you're booting from a boot partition.
Mount the latter and re-install the kernel. You may have to do this from a chroot or booting the failsafe image, because otherwise you typically also don't have the vfat module.

Offline

#8 2024-06-18 15:44:53

MAYBL8
Member
From: Florida USA
Registered: 2022-01-14
Posts: 350
Website

Re: [SOLVED] Trying to use ipset for the first time

[demo@mail /]$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-linux-lts root=UUID=e34b9f78-6781-4bc2-826e-081af8c787e9 rw loglevel=3 audit=0 nvme_load=yes

I think this machine is bios boot

[demo@mail /]$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 931.5G  0 disk
├─sda2   8:2    0     1K  0 part
├─sda5   8:5    0 199.3G  0 part /
└─sda6   8:6    0   100G  0 part /home
[demo@mail /]$ lsblk -f
NAME   FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda2
├─sda5 ext4   1.0         e34b9f78-6781-4bc2-826e-081af8c787e9  163.9G    11% /
└─sda6 ext4   1.0         e698137d-9896-4d17-9809-72de09446d27   84.6G     8% /home

Sorry but I am not clear on exactly what I need to do.
Thanks

Last edited by MAYBL8 (2024-06-18 15:49:09)

Online

#9 2024-06-18 16:02:17

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,680

Re: [SOLVED] Trying to use ipset for the first time

You're not booting from a boot partition and there's also nothing that might pose as one.
Did you simply not reboot after updating the kernel??

Offline

#10 2024-06-18 17:43:22

MAYBL8
Member
From: Florida USA
Registered: 2022-01-14
Posts: 350
Website

Re: [SOLVED] Trying to use ipset for the first time

I update the system almost everyday.
I haven't rebooted in about 26 days.
I will reboot and see what happens.
I have rebooted before and I don't think it made a difference.
I will post results of rebooting.

Do I need to boot from a boot partition for ipset to work?

Online

#11 2024-06-18 17:47:21

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,680

Re: [SOLVED] Trying to use ipset for the first time

Do I need to boot from a boot partition for ipset to work?

No.

I update the system almost everyday.
I haven't rebooted in about 26 days.

and

I have rebooted before and I don't think it made a difference.

are contradictive.

I will reboot and see what happens.

Things will probably start to work wink

Offline

#12 2024-06-18 17:51:29

MAYBL8
Member
From: Florida USA
Registered: 2022-01-14
Posts: 350
Website

Re: [SOLVED] Trying to use ipset for the first time

Well no errors after enter the command .  I will continue on with the wiki and post back here if I have some other issues.

[root@mail demo]# ipset create myset hash:net

Online

#13 2024-06-18 18:10:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,680

Re: [SOLVED] Trying to use ipset for the first time

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB