我想将fireHOL ip列表:http://iplists.firehol.org、ipset和iptables放在我的centOS and服务器上。
我已经安装了fireHOL列表并更新了它生成的IP列表。
它创建的IP列表保存在:/etc/firehol/ipset (https://github.com/firehol/blocklist-ipsets/wiki/Downloading-IP-Lists#where-are-the-ipsets)中。
我已经安装了ipset。
我已经安装和工作了iptable(通过CSF/LFD控制)。
如何将IP列表、ipset和iptables绑定在一起,以便通过iptables (https://github.com/firehol/blocklist-ipsets/wiki/Downloading-IP-Lists#updating-the-ipsets-in-kernel)阻止这些列表?
谢谢你的帮助。
发布于 2016-02-13 00:46:05
我不知道如何使用CSF/LFD,但是如果您使用FireHOL,您将需要为每个ipset提供如下内容。
让我们假设您对ipset dshield感兴趣。在您的firehol.conf中,在其顶部您应该添加以下内容:
ipset4 create dshield hash:net
ipset4 addfile dshield ipsets/dshield.netset
blacklist4 input inface ${wan} log "BLACKLIST dshield" ipset:dshield当然,上面是一个片段。您需要正确配置firehol.conf。
然后,update -ipset将在内核更新时自动更新dshield。
所以一般的想法是:
负责1,2,3和4的更新-ipset。检查这个:https://github.com/firehol/firehol/wiki/Working-with-IPSETs
或者:您可以通过在控制台上运行ipset命令来执行1和2。您可以使用防火墙(它必须支持ipset)或在控制台上运行iptables命令来执行3。
如果你不知道该怎么做,最简单的方法就是使用邻里酒。检查它的文档(http://firehol.org/guides/firehol-welcome/)。
https://stackoverflow.com/questions/35368800
复制相似问题