• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Input Howto secure a standard Postgres Port with Fail2Ban

hschneider

New Pleskian
This article describes how to add a Fail2Ban Jail for PostgreSQL:

Here the short version in english:

Create the filter file in
/etc/fail2ban/filter.d/custom-postgres.conf

with this content:

[Definition]
failregex = ^<HOST>.+FATAL: password authentication failed for user.+$
^<HOST>.+FATAL: no pg_hba.conf entry for host .+$
ignoreregex = duration:#
ignoreregex =

Save and restart Fail2Ban.

Add the Host ID to the Postgres Log by editing this file:
/etc/postgresql/10/main/postgresql.conf

Change log_line_prefix to
log_line_prefix = '%h %m [%p] %q%u@%d '

Save and restart Postgres.

Now go to Plesk's Fail2Ban Setup and create a new jail with this action:
iptables[chain="INPUT", name="PostgreSQL-Server", port="5432", protocol="tcp", returntype="RETURN", lockingopt="-w"]

Full config here:
plesk-fail2ban-postgres-jail.jpg

That'S it :)

-- Harald
 
Last edited:
Back
Top