问题是modprobe和iptables不能在LXC容器内工作。
LXC是Linux容器的用户空间控制包,这是一种轻量级的虚拟系统机制,有时被称为“chroot on steroids”。
容器内的iptables错误是:
# iptables -I INPUT -s 122.129.126.194 -j DROP > iptables v1.4.8: can't initialize iptables table `filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.
我猜测它不能工作,因为LXC容器共享一个内核,主要的服务器内核。
在这种情况下,我如何做fail2ban。 modprobe和iptables在主服务器上工作,所以我可以在那里安装它,并以某种方式链接到日志文件,我的猜测?
有什么build议么?
也许tcp包装为你工作。 fail2ban可以pipe理/etc/hosts.allow和/etc/hosts.deny文件