1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00

Add fail2ban for the API

This commit is contained in:
lapineige 2021-04-20 09:48:07 +02:00 committed by GitHub
parent a02d766cf5
commit 1067070e02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,6 +135,12 @@ ynh_replace_string --match_string="__PHPVERSION__" --replace_string=$phpversion
cp ../conf/freshrss.cron "$cron_path"
chmod 644 "$cron_path"
#=================================================
# SETUP FAIL2BAN
#=================================================
ynh_add_fail2ban_config_temp "/var/log/nginx/$domain-access.log" ".* - - .*\/api\/[a-z]*(.php)\/accounts\/ClientLogin\?Email=[a-z]*&Passwd=[a-z]* HTTP.* 401 .*" 12 # 10 retries should be enough to permit some tests with (for instance) an app client
#=================================================
# GENERIC FINALIZATION
#=================================================