
저는 OpenVZ 가상화 시스템과 함께 2.6 커널, RHEL을 실행하는 VPS 공급자의 VPS를 사용하고 있습니다. iptables 방화벽에서 IP 세트를 관리하기 위해 ipset 유틸리티를 사용하고 싶습니다.
IPset을 생성할 때 나타나는 오류는 다음과 같습니다.
mindaugas@517713:~$ sudo ipset create cf_ipv4 hash:net
ipset v6.20.1: Cannot open session to kernel.
명령의 흔적:https://p.defau.lt/?NwzyZkxR_VgekwCRr6YlWg
질문: 이러한 옵션을 사용하면 해당 시스템에서 ipset을 사용할 수도 있습니까? 그렇다면 어떻게 할 수 있나요?
마운트 아웃:
mindaugas@517713:~$ mount
/dev/simfs on / type simfs (rw,relatime,usrquota,grpquota)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /dev type devtmpfs (rw,nosuid,noexec,relatime,mode=755)
none on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/cgroup type tmpfs (rw,relatime,size=4k,mode=755)
none on /run type tmpfs (rw,nosuid,noexec,relatime,size=275252k,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
none on /run/shm type tmpfs (rw,relatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755)
관련 정보는 다음과 같습니다.
mindaugas@517713:~$ uname -r
2.6.32-042stab120.3
mindaugas@517713:~$ sudo rpm -qa
vzkernel-headers-2.6.32-042stab120.3.x86_64
mindaugas@517713:~$ ipset --help
ipset v6.20.1
Usage: ipset [options] COMMAND
mindaugas@517713:~$ sudo apt-get install xtables-addons-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
xtables-addons-common is already the newest version.
The following packages were automatically installed and are no longer required:
dmsetup grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common
libdevmapper1.02.1 libfuse2
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
답변1
따라서 실제로는 RHEL 커널을 사용하는 것이 아니라(사용했다는 사실로 인해 apt-get
그것이 RHEL인지 궁금해집니다) OpenVZ 컨테이너를 사용하고 있습니다. OpenVZ 컨테이너는 호스팅 시스템의 커널에서 제공하는 기능을 사용하는데, 이 경우 ipset를 지원하지 않습니다. OpenVZ 호스팅 환경이 이를 지원하도록 컨테이너에 설치할 수 있는 것은 없습니다. iptables/ipset 지원이 포함된 커널을 구축하려면 호스팅 공급자에게 문의해야 합니다.