Allgemeine Diskussionen rund um KeyHelp.
pandinusimperator
Posts: 19 Joined: Tue 24. Aug 2021, 22:34
Post
by pandinusimperator » Mon 6. Nov 2023, 15:49
racmo wrote: ↑ Mon 6. Nov 2023, 15:40
Ich danke dir! Danach funktioniert es bei mir auch.
Im Fail2Ban Log taucht dann auch endlich der Eintrag auf
Code: Select all
2023-11-06 15:37:57,205 fail2ban.filter [4130545]: INFO [keyhelp-apache] Found 2001:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx- 2023-11-06 15:37:57
2023-11-06 15:37:59,206 fail2ban.filter [4130545]: INFO [keyhelp-apache] Found 2001:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx - 2023-11-06 15:37:58
2023-11-06 15:38:00,407 fail2ban.filter [4130545]: INFO [keyhelp-apache] Found 2001:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx - 2023-11-06 15:37:59
2023-11-06 15:38:01,008 fail2ban.filter [4130545]: INFO [keyhelp-apache] Found 2001:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx - 2023-11-06 15:38:01
Gut.
Aber updatesicher ist das natürlich so nicht.
Alexander
Keyweb AG
Posts: 3842 Joined: Wed 20. Jan 2016, 02:23
Post
by Alexander » Mon 6. Nov 2023, 16:19
Warum steht das "ErrorLogFormat" bei euch nicht auf Standard mit dem Wort "client"?
Was habt ihr noch zusätzlich installiert / konfiguriert?
Mit freundlichen Grüßen / Best regards
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de -
http://www.keyhelp.de
**************************************************************
pandinusimperator
Posts: 19 Joined: Tue 24. Aug 2021, 22:34
Post
by pandinusimperator » Mon 6. Nov 2023, 16:23
Alexander wrote: ↑ Mon 6. Nov 2023, 16:19
Warum steht das "ErrorLogFormat" bei euch nicht auf Standard mit dem Wort "client"?
Was habt ihr noch zusätzlich installiert / konfiguriert?
Ich habe nichts zusätzlich installiert und nichts am Logformat umkonfiguriert. Nicht wissentlich. Ist ein Hetzner Cloud Server mit Deb 11. Die sind ja gern mal bissi "anders" in mancherlei Hinsicht.
Ich schau mal auf anderen Servern.
racmo
Posts: 26 Joined: Fri 22. Apr 2016, 17:16
Post
by racmo » Mon 6. Nov 2023, 16:26
Bei uns läuft auf dem Server nur noch zusätzlich eine PostgresSQL mit TimescaleDB, aber würde mich wundern wenn das am Logformat etwas verändern würde. Der Rest ist Standard.
Ist ein Server aus Plech bei Hetzner.
Alexander
Keyweb AG
Posts: 3842 Joined: Wed 20. Jan 2016, 02:23
Post
by Alexander » Mon 6. Nov 2023, 16:28
Schaut gern mal hiermit:
Code: Select all
grep -r "ErrorLogFormat" /etc/apache2/
Danke
Mit freundlichen Grüßen / Best regards
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de -
http://www.keyhelp.de
**************************************************************
racmo
Posts: 26 Joined: Fri 22. Apr 2016, 17:16
Post
by racmo » Mon 6. Nov 2023, 16:33
Da kommt bei mir keine Ausgabe
Code: Select all
root@scp ~ # grep -r "ErrorLogFormat" /etc/apache2/
root@scp ~ #
Alexander
Keyweb AG
Posts: 3842 Joined: Wed 20. Jan 2016, 02:23
Post
by Alexander » Mon 6. Nov 2023, 16:38
Was für Apache Mods sind bei euch Aktiv?
Auch nicht bei Servern von Keyweb...
Bei denen sollte dieses Fail2Ban Problem auch erst garnicht existieren
Mit freundlichen Grüßen / Best regards
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de -
http://www.keyhelp.de
**************************************************************
racmo
Posts: 26 Joined: Fri 22. Apr 2016, 17:16
Post
by racmo » Mon 6. Nov 2023, 16:41
Code: Select all
Last login: Mon Nov 6 16:34:15 2023 from 80.187.117.68
root@scp ~ # apache2ctl -M
Loaded Modules:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
access_compat_module (shared)
actions_module (shared)
alias_module (shared)
auth_basic_module (shared)
auth_digest_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgid_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
expires_module (shared)
fcgid_module (shared)
filter_module (shared)
headers_module (shared)
http2_module (shared)
include_module (shared)
mime_module (shared)
mpm_event_module (shared)
negotiation_module (shared)
proxy_module (shared)
proxy_fcgi_module (shared)
proxy_http_module (shared)
proxy_http2_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)
setenvif_module (shared)
socache_shmcb_module (shared)
ssl_module (shared)
status_module (shared)
suexec_module (shared)
root@scp ~ #
pandinusimperator
Posts: 19 Joined: Tue 24. Aug 2021, 22:34
Post
by pandinusimperator » Mon 6. Nov 2023, 16:49
Alexander wrote: ↑ Mon 6. Nov 2023, 16:38
Was für Apache Mods sind bei euch Aktiv?
Code: Select all
Loaded Modules:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
access_compat_module (shared)
actions_module (shared)
alias_module (shared)
auth_basic_module (shared)
auth_digest_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgid_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
expires_module (shared)
fcgid_module (shared)
filter_module (shared)
headers_module (shared)
http2_module (shared)
include_module (shared)
mime_module (shared)
mpm_event_module (shared)
negotiation_module (shared)
proxy_module (shared)
proxy_fcgi_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)
setenvif_module (shared)
socache_shmcb_module (shared)
ssl_module (shared)
status_module (shared)
suexec_module (shared)
Alexander wrote: ↑ Mon 6. Nov 2023, 16:38
Auch nicht bei Servern von Keyweb...
Bei denen sollte dieses Fail2Ban Problem auch erst garnicht existieren
Ich kann dir gern eine DM schicken mit einem Keyweb-Server, bei dem auch "remote" in den Logs steht.
Alexander
Keyweb AG
Posts: 3842 Joined: Wed 20. Jan 2016, 02:23
Post
by Alexander » Mon 6. Nov 2023, 16:51
Was ich jetzt so gesehen hab, wird die Zeichenkette "client" / "remote" nicht per "ErrorLogFormat" bestimmt, sondern wird zum Zeitpunkt des Ereignis ermittelt (
https://github.com/apache/httpd/blob/tr ... log.c#L940 )
Was mich zu der Frage führt: Wie sieht euer Test-Setup aus und wie testet ihr, ob der Fail2Ban Filter funktioniert bzw. nicht funktioniert?
Mit freundlichen Grüßen / Best regards
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de -
http://www.keyhelp.de
**************************************************************
pandinusimperator
Posts: 19 Joined: Tue 24. Aug 2021, 22:34
Post
by pandinusimperator » Mon 6. Nov 2023, 16:58
Alexander wrote: ↑ Mon 6. Nov 2023, 16:51
Was ich jetzt so gesehen hab, wird die Zeichenkette "client" / "remote" nicht per "ErrorLogFormat" bestimmt, sondern wird zum Zeitpunkt des Ereignis ermittelt (
https://github.com/apache/httpd/blob/tr ... log.c#L940 )
Was mich zu der Frage führt: Wie sieht euer Test-Setup aus und wie testet ihr, ob der Fail2Ban Filter funktioniert bzw. nicht funktioniert?
Verzeichnisschutz über Keyhelp eingerichtet, Subdomain aufgerufen, die auf das Verzeichnis zeigt, fehlerhafte Daten eingegeben, Logfiles geguckt.
racmo
Posts: 26 Joined: Fri 22. Apr 2016, 17:16
Post
by racmo » Mon 6. Nov 2023, 17:15
Ich hab mich mehrfach auf einen anderen PC versucht in einem geschütztem Verzeichnis auf dem Server anzumelden. Das tauchte zuvor in keiner der Logs von Fail2Ban auf. Nur in den Apache Logs, aber immer mit Remote. Es ist dabei informationshalber auch egal welcher Fehler im Apache Log, sie sind immer alle mit Remote.
Alexander
Keyweb AG
Posts: 3842 Joined: Wed 20. Jan 2016, 02:23
Post
by Alexander » Mon 6. Nov 2023, 17:29
Rein aus Interesse würde es mich einmal interessieren, was es auslöst, dass er mal "client" und mal "remote" nimmt.
Zum Problem ansich: Es wäre es wohl ratsam, das Problem für künftige Fail2Ban Versionen hier zu melden und eine Änderung in der entsprechenden apache-common.conf anzuregen:
https://github.com/fail2ban/fail2ban/issues
Mit freundlichen Grüßen / Best regards
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de -
http://www.keyhelp.de
**************************************************************
racmo
Posts: 26 Joined: Fri 22. Apr 2016, 17:16
Post
by racmo » Mon 6. Nov 2023, 18:50
Wir haben jetzt mal auf mehreren von unseren Servern geschaut, dort ist überall im Log „remote“. So ganz schlau werden wir nicht daraus, an was oder worin das liegt
Werden das ganze morgen mal bei Fail2Ban melden.