当前位置:网站首页>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
边栏推荐
- Leetcode9. Palindromes
- MD5加密验证
- Oracle system composition
- QT designer for QT learning
- 累计出货130亿颗Flash,4亿颗MCU!深度解析兆易创新的三大产品线
- Redis series 4: sentinel (sentinel mode) with high availability
- 技术分享 | MySQL Shell 定制化部署 MySQL 实例
- ticdc同步数据怎么设置只同步指定的库?
- RE14: reading paper illsi interpretable low resource legal decision making
- go语言慢速入门——流程控制语句
猜你喜欢

【深度学习】:《PyTorch入门到项目实战》第二天:从零实现线性回归(含详细代码)

【深度学习】:《PyTorch入门到项目实战》第九天:Dropout实现(含源码)

ERROR: transport library not found: dt_ socket

Probability theory and mathematical statistics Chapter 1

Re11:读论文 EPM Legal Judgment Prediction via Event Extraction with Constraints

Quickly master kotlin set functions

MySQL 5.7 and sqlyogv12 installation and use cracking and common commands

有趣的 Kotlin 0x07:Composition

Applet: scroll view slides to the bottom by default

关于 CMS 垃圾回收器,你真的懂了吗?
随机推荐
CRC16 data verification supports modelbus and XMODEM verification modes (C language)
我该如何理解工艺
Nowcode- learn to delete duplicate elements in the linked list (detailed explanation)
epoll水平出发何边沿触发
Is smart park the trend of future development?
技术分享 | 误删表以及表中数据,该如何恢复?
SUSE CEPH add nodes, reduce nodes, delete OSD disks and other operations – storage6
结构化设计的概要与原理--模块化
First day of QT study
华为Mate 40系列曝光:大曲率双曲面屏,5nm麒麟1020处理器!还将有天玑1000+的版本
小程序:scroll-view默认滑倒最下面
阿里云-武林头条-建站小能手争霸赛
智慧园区是未来发展的趋势吗?
有趣的 Kotlin 0x06:List minus list
Efficiency comparison of three methods for obtaining timestamp
13 differences between MySQL and Oracle
Re14:读论文 ILLSI Interpretable Low-Resource Legal Decision Making
记录开发问题
How should I understand craft
[JS] eight practical new functions of 1394-es2022