1

Topic: How to secure phpLDAPadmin with Fail2ban?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version: Ubuntu 16.06
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

Hello!

I wanted to ask, if someone can tell me how to secure phpLDAPadmin with Fail2ban. How has the filter to look like?

Thanks in advance!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: How to secure phpLDAPadmin with Fail2ban?

You should check Apache log file to find error related to phpldapadmin, then create your own Fail2ban filter and jail to monitor Apache log file (it's ok to use existing jail which monitoring Apache log file).

3

Re: How to secure phpLDAPadmin with Fail2ban?

In fact there is nothing in the log files if I'm trying to log in with false credentials. Can you maybe tell me how I can activate the logging of login failures?

4

Re: How to secure phpLDAPadmin with Fail2ban?

You have to check phpLDAPadmin settings.

5

Re: How to secure phpLDAPadmin with Fail2ban?

Hallo ZhangHuangbin,

I already thought that i have to edit the config.php of phpLDAPadmin. But in fact I don't understand which debug level I have to choose. I've found this documentation but it doesn't help me:

http://phpldapadmin.sourceforge.net/wik … ebug:level

I hope that you can help me!

Thanks in advance!

6

Re: How to secure phpLDAPadmin with Fail2ban?

Try "error" level first, if no failed login related info, try "debug".