大网数据广告活动
服务器运维问答

Do fail2ban and apf+bfd complement each other?

· 52CE 我爱测

Researching on the differences between Advanced Firewall Policy (APF) together with Brute Force Detection System (BFD) and Fail2Ban I couldn't find much. They use different methods, at the same time both solutions essentially do …

问题原文

原帖链接 · Nick · CC BY-SA 3.0

Researching on the differences between Advanced Firewall Policy (APF) together with Brute Force Detection System (BFD) and Fail2Ban I couldn't find much. They use different methods, at the same time both solutions essentially do the same thing - they analyze logs files and based on predetermined patterns block offending IPs via iptables.

Nevertheless, there are lot's of tutorials which explain how to set both APF and Fail2Ban on the same systems, so they do not override each others' entries in iptables. And there I am confused: why to install two firewalls, which do the same thing? Or I am missing something? Do they complement each other? Does any them do something that the other solution does not?

已采纳解答

原帖链接 · Esa Jokinen · CC BY-SA 3.0

They can complement each other as they test different violations. While Fail2ban and Brute Force Detection (BFD) has essentially the same purpose, APF does whole other things.

Advanced Policy Firewall (APF) monitors the contents of the connections, instead of log files. Connection based stateful policies checks that the packets matches the connection protocol, and sanity based policies drops both known attack patterns and malformed packets potentially used for attacks.

Fail2ban scans log files (e.g. /var/log/apache/error_log) and bans IPs that show the malicious signs -- too many password failures, seeking for exploits, etc. Generally Fail2Ban is then used to update firewall rules to reject the IP addresses for a specified amount of time,

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-08-28)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。