Skip to content

Commit 70ac746

Browse files
author
Florian Schaal
committed
2 parents aa16ebc + def47a8 commit 70ac746

33 files changed

+231
-86
lines changed

docs/hardening/.gitkeep

Whitespace-only changes.

docs/hardening/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2+
3+
This folder contains examples for further ISPC hardening (done by NwSEC)
4+
5+
6+
Currently, these are:
7+
8+
9+
10+
anti-bruteforce WordPress Login Anti-Bruteforce via fail2ban
11+
12+
postfix-ldap Query for valid recipients via LDAP in a transparent
13+
setup routing mails e.g. to the internal server
14+
15+
16+
17+
All these examples have been productively tested and implemented on various
18+
Debian/GNU Linux based systems.
19+
20+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

docs/hardening/anti-bruteforce/.gitkeep

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2+
3+
4+
This is an example to block WordPress Login Bruteforce Attacks. Further
5+
description can also be found @ https://blog.nwsec.de/wordpress/?p=1112
6+
7+
8+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# This goes into (or at the end of) /etc/fail2ban/jail.local
3+
#
4+
[wp-auth]
5+
enabled = true
6+
filter = wp-auth
7+
action = iptables-multiport[name=wp-auth, port="http,https"]
8+
logpath = /var/www/clients/client*/web*/log/*.log
9+
bantime = 1200
10+
maxretry = 5
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#
2+
# This goes into /etc/fail2ban/filter.d/wp-auth.conf
3+
#
4+
[Definition]
5+
failregex = ^<HOST> .* "POST /wp-login.php

docs/hardening/postfix-ldap/.gitkeep

Whitespace-only changes.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2+
3+
If mails get transparently forwarded to another mailserver, a mechanism to block
4+
mail for invalid recipients makes sense, and drastically increaes the well-known
5+
backscatter problem.
6+
7+
LDAP queries are used to check for valid recipients, and forwards the mail, if
8+
an entry for the user is found.
9+
10+
For this to work, on Debian/GNU Linux, you also have to install postfix-ldap by
11+
12+
apt install postfix-ldap
13+
14+
15+
Further information can be found @ https://blog.nwsec.de/wordpress/?p=1031
16+
17+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#
2+
# This goes into /etc/postfix/main.cf in the section relay_recipient_maps
3+
#
4+
relay_recipient_maps = hash:/etc/postfix/relay_recipients, ldap:/etc/postfix/ldap-aliases.cf
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
server_host = x.x.x.x
2+
search_base = ou=xxx, dc=xxx, dc=xx
3+
version = 3
4+
timeout = 10
5+
leaf_result_attribute = mail
6+
bind_dn = user@domain
7+
bind_pw = userpassword
8+
query_filter = (mail=%s)
9+
result_attribute = mail, addressToForward

0 commit comments

Comments
 (0)