当前位置:网站首页>How to use fail2ban to protect WordPress login page
How to use fail2ban to protect WordPress login page
2022-07-28 17:01:00 【Brother Xing plays with the clouds】
Fail2Ban scanning /var/log/auth.log Such log files , And forbid IP Address has too many failed login attempts . It updates the system firewall rules to reject those from within a configurable time IP Address to achieve this . Fail2Ban Open the box , You can read many standard log files , for example sshd and Apache The file of , And it can be easily configured to read any log file you choose , To resolve any errors needed .
In this article , I introduced you how to use Fail2Ban Protect SSH service . Now? , I will guide you How to use Fail2Ban Protect WordPress The login page .
To work with WordPress Integrate , You need to WordPress Install in WP fail2ban plug-in unit .
After installation , Need to put WP fail2ban Plug in folder ( Usually located in wordpress/wp-content/plugins/wp-fail2ban) In the folder of wordpress.conf File copy to Fail2ban Folder ( be located /etc/fail2ban/filter.d). And then in /etc/fail2ban/jail.conf Editor in the middle Fail2ban To configure , Add to WordPress part :
[wordpress] enabled = true filter = wordpress logpath = /var/log/auth.log port = http,https maxretry = 5 findtime = 3600 bantime = 86400
This section writes all access errors /var/log/auth.log file , This filter is applicable to http and https. however , If in Web The server Cache agent is used in the configuration of , You also need to be WP fail2ban The plug-in specifies it , So that it begins to get the client address from the special header , instead of Frontend-proxy The address of . So , Please open the wp-config.php file , And add a containing agent The server Configured rows .
define(‘WP_FAIL2BAN_PROXIES’,‘127.0.0.1’); 127.0.0.1 is the address of the proxy server.
Now? , Restart Fail2ban:
service fail2ban restart
边栏推荐
- First day of QT study
- MySQL5.7及SQLyogV12安装及使用破解及常用命令
- 记录ceph两个rbd删除不了的处理过程
- 【深度学习】:《PyTorch入门到项目实战》第一天:数据操作和自动求导
- 智慧园区是未来发展的趋势吗?
- Detailed record of steps to configure web server (many references)
- 小程序:获取元素节点信息
- Introduction and implementation of stack (detailed explanation)
- Interesting kotlin 0x06:list minus list
- Re10:读论文 Are we really making much progress? Revisiting, benchmarking, and refining heterogeneous gr
猜你喜欢

Interesting kotlin 0x07:composition

技术分享 | 误删表以及表中数据,该如何恢复?
![[deep learning]: day 6 of pytorch introduction to project practice: multi-layer perceptron (including code)](/img/19/18d6e94a1e0fa4a75b66cf8cd99595.png)
[deep learning]: day 6 of pytorch introduction to project practice: multi-layer perceptron (including code)

Each account corresponds to all passwords, and then each password corresponds to all accounts. How to write the brute force cracking code

Interesting kotlin 0x0a:fun with composition

HTAP是有代价的

MySQL 5.7 and sqlyogv12 installation and use cracking and common commands

关于 CMS 垃圾回收器,你真的懂了吗?

TCP handshake, waving, time wait connection reset and other records

负整数及浮点数的二进制表示
随机推荐
打造自组/安全/可控的LoRa网!Semtech首度回应“工信部新规”影响
SUSE CEPH rapid deployment – storage6
ERROR: transport library not found: dt_ socket
关于 CMS 垃圾回收器,你真的懂了吗?
时间复杂度
leetcode70假设你正在爬楼梯。需要 n 阶你才能到达楼顶。每次你可以爬 1 或 2 个台阶。你有多少种不同的方法可以爬到楼顶呢?
[deep learning]: day 5 of pytorch introduction to project practice: realize softmax regression from 0 to 1 (including source code)
Question note 4 (the first wrong version, search the insertion position)
RE14: reading paper illsi interpretable low resource legal decision making
Text filtering skills
在AD中添加差分对及连线
做题笔记5(有序数组的平方)
[deep learning]: model evaluation and selection on the seventh day of pytorch introduction to project practice (Part 1): under fitting and over fitting (including source code)
Leetcode647. Palindrome substring
Call DLL file without source code
Interesting kotlin 0x09:extensions are resolved statically
leetcode9. 回文数
Is smart park the trend of future development?
Question making note 2 (add two numbers)
[deep learning]: introduction to pytorch to project practice: simple code to realize linear neural network (with code)