加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – 使用LXC容器的服务器上的fail2ban

发布时间:2020-12-14 02:42:09 所属栏目:Linux 来源:网络整理
导读:问题是modprobe和iptables在LX??C容器内不起作用. LXC is the userspace control package for Linux Containers,a lightweight virtual system mechanism sometimes described as “chroot on steroids”. 容器内的iptables错误是: # iptables -I INPUT -s
问题是modprobe和iptables在LX??C容器内不起作用.

LXC is the userspace control package for Linux Containers,a
lightweight virtual system mechanism sometimes described as “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在主服务器上工作,所以我可以在那里安装它并以某种方式链接到日志文件,我的猜测?

有什么建议?

解决方法

也许tcp包装器适合你. fail2ban可以管理/etc/hosts.allow和/etc/hosts.deny文件

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读