From 87977ff35ae1d1c339ae98051f0905b3ac5cc682 Mon Sep 17 00:00:00 2001
From: Zhang Huangbin
Date: Fri, 17 Apr 2020 10:14:48 +0800
Subject: [PATCH] Mention updating iRedAdmin-Pro config file.
---
en_US/howto/fail2ban.sql.md | 19 +++++++++++++++++++
html/fail2ban.sql.html | 17 +++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/en_US/howto/fail2ban.sql.md b/en_US/howto/fail2ban.sql.md
index 502d3de8..37c5b013 100644
--- a/en_US/howto/fail2ban.sql.md
+++ b/en_US/howto/fail2ban.sql.md
@@ -237,6 +237,25 @@ apt -y install geoip-bin geoip-database
pkg_add GeoIP geolite-country
```
+## For iRedAdmin-Pro users: Enable the SQL integration
+
+Please add Fail2ban SQL credential in iRedAdmin-Pro config file
+`/opt/www/iredadmin/settings.py`, then restart `iredadmin` service. If you're
+still running Apache web server, you should restart Apache service instead.
+
+!!! attention
+
+ If you're running PostgreSQL backend, the port number is `5432`.
+
+```
+fail2ban_enabled = True
+fail2ban_db_host = '127.0.0.1'
+fail2ban_db_port = '3306'
+fail2ban_db_name = 'fail2ban'
+fail2ban_db_user = 'fail2ban'
+fail2ban_db_password = ''
+```
+
## Tests
!!! attention
diff --git a/html/fail2ban.sql.html b/html/fail2ban.sql.html
index febdba8a..5aa4e925 100644
--- a/html/fail2ban.sql.html
+++ b/html/fail2ban.sql.html
@@ -30,6 +30,7 @@
Enable the new action banned_db
Add required cron job to query SQL database and unban IP addresses
Optional: look up and store country name of banned IP address
+For iRedAdmin-Pro users: Enable the SQL integration
Tests
Troubleshooting
@@ -247,6 +248,22 @@ country of banned IP address and store it in SQL database.
pkg_add GeoIP geolite-country
+For iRedAdmin-Pro users: Enable the SQL integration
+Please add Fail2ban SQL credential in iRedAdmin-Pro config file
+/opt/www/iredadmin/settings.py
, then restart iredadmin
service. If you're
+still running Apache web server, you should restart Apache service instead.
+
+
Attention
+
If you're running PostgreSQL backend, the port number is 5432
.
+
+fail2ban_enabled = True
+fail2ban_db_host = '127.0.0.1'
+fail2ban_db_port = '3306'
+fail2ban_db_name = 'fail2ban'
+fail2ban_db_user = 'fail2ban'
+fail2ban_db_password = '<my-secret-password>'
+
+
Tests