当前位置:网站首页>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
边栏推荐
- Signal and slot mechanism of QT learning
- Ruoyi集成flyway后启动报错的解决方法
- 打造自组/安全/可控的LoRa网!Semtech首度回应“工信部新规”影响
- 做题笔记4(第一个错误的版本,搜索插入位置)
- 深入理解 DeepSea 和 Salt 部署工具 – Storage6
- 综合设计一个OPPE主页--页面的售后服务
- leetcode647. 回文子串
- Interesting kotlin 0x0a:fun with composition
- MD5加密验证
- [learn slam from scratch] publish the coordinate system transformation relationship to topic TF
猜你喜欢

MySQL5.7及SQLyogV12安装及使用破解及常用命令

Re13:读论文 Gender and Racial Stereotype Detection in Legal Opinion Word Embeddings

结构化设计的概要与原理--模块化

Tcp/ip related

WSL+Valgrind+Clion

Technology sharing | how to recover the erroneously deleted table and the data in the table?

负整数及浮点数的二进制表示
![[deep learning]: introduction to pytorch to project practice: simple code to realize linear neural network (with code)](/img/19/18d6e94a1e0fa4a75b66cf8cd99595.png)
[deep learning]: introduction to pytorch to project practice: simple code to realize linear neural network (with code)

Alibaba cloud MSE supports go language traffic protection

Leetcode learn complex questions with random pointer linked lists (detailed explanation)
随机推荐
MySQL安装教程
【从零开始学习SLAM】将坐标系变换关系发布到 topic tf
Re14:读论文 ILLSI Interpretable Low-Resource Legal Decision Making
Leetcode9. Palindromes
Multiple commands produce '... /xxx.app/assets.car' problem
Implementation of transfer business
First day of QT study
parseJson
小程序:scroll-view默认滑倒最下面
Alibaba cloud MSE supports go language traffic protection
Question making note 3 (two point search)
阿里云 MSE 支持 Go 语言流量防护
深入理解 DeepSea 和 Salt 部署工具 – Storage6
Call DLL file without source code
go语言慢速入门——流程控制语句
SUSE Ceph 快速部署 – Storage6
ERROR: transport library not found: dt_ socket
leetcode647. 回文子串
NoSQL introduction practice notes I
Interesting kotlin 0x07:composition