IPset support in 2.2?

Vitaly

New Member
Nov 28, 2010
7
0
1
I need to filter quite big ip list. IMHO, the most reasonable solution is ipset module for iptables.

AFAIK, ipset already exists in latest kernels, used in PVE 2.2, but CLI tool show error:

Code:
root@hz ~ # ipset -H
ipset v2.5.0: Kernel ipset code is of protocol version 6.I'm of protocol version 2.
Please upgrade your kernel and/or ipset(8) utillity.

1. Is there any way to make ipset work on HN ?
2. The same, but for containers (OpenVZ)
 
looks like the ipset utility package is too old.
 
There is a lot of confusion: the ipset utility that comes with the "ipset" package in Debian squeeze is obolete. There is a version of ipset which comes in two deb packages with Debian squeeze: xtables-addons-common which contains libs and tools (e.g. the ipset utility) and xtables-addons-source which contains sources of extensions targets and matches for iptables modules. The modules need to be built from sources using module-assistant.Installation:apt-get install module-assistant pve-headers-2.6.32-19-pveapt-get install xtables-addons-common xtables-addons-sourcemodule-assistant preparemodule-assistant --text-mode auto-install xtables-addons-sourceThis will build and install the package with modules in /usr/src. In my case the package name isxtables-addons-modules-2.6.32-19-pve_1.26-2_amd64.debroot@proxmox:~# ipset -Hipset v4.2Then following example worked:ipset -N testset iphashipset -A testset 65.55.57.27ipset -A testset 77.75.76.3# ban traffic to destinations listed in ipset "testset"iptables -I OUTPUT -m set -j DROP --match-set testset dstUnfortunatelly the above worked on the hardware node only. I couldn't make it working in my OpenVZ containter (32-bit Debian squeeze)samantha144:/# ipset -Hipset v4.2: Couldn't verify kernel module version!I was trying to edit IPTABLES= in /etc/vz/vz.conf but it seems that the problem is somewhere else.ntw
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!