Skip to content
This repository was archived by the owner on Aug 8, 2022. It is now read-only.

Commit 302275f

Browse files
authored
Add nextcloud and format configs
1 parent be44201 commit 302275f

25 files changed

+93
-17
lines changed

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,18 @@ services:
9292
- /path/to/gitea/gitea.log:/remotelogs/gitea/gitea.log:ro #optional
9393
- /path/to/homeassistant/home-assistant.log:/remotelogs/homeassistant/home-assistant.log:ro #optional
9494
- /path/to/lighttpd/error.log:/remotelogs/lighttpd/error.log:ro #optional
95+
- /path/to/nextcloud/nextcloud.log:/remotelogs/nextcloud/nextcloud.log:ro #optional
9596
- /path/to/nginx/log:/remotelogs/nginx:ro #optional
96-
- /path/to/nzbget/log:/remotelogs/nzbget:ro #optional
97+
- /path/to/nzbget/nzbget.log:/remotelogs/nzbget/nzbget.log:ro #optional
9798
- /path/to/overseerr/overseerr.log:/remotelogs/overseerr/overseerr.log:ro #optional
9899
- /path/to/prowlarr/prowlarr.txt:/remotelogs/prowlarr/prowlarr.txt:ro #optional
99100
- /path/to/radarr/radarr.txt:/remotelogs/radarr/radarr.txt:ro #optional
100101
- /path/to/roundcube/errors:/remotelogs/roundcube/errors:ro #optional
101-
- /path/to/sabnzbd/log:/remotelogs/sabnzbd:ro #optional
102+
- /path/to/sabnzbd/sabnzbd.log:/remotelogs/sabnzbd/sabnzbd.log:ro #optional
102103
- /path/to/sonarr/sonarr.txt:/remotelogs/sonarr/sonarr.txt:ro #optional
103104
- /path/to/unificontroller/server.log:/remotelogs/unificontroller/server.log:ro #optional
104105
- /path/to/vaultwarden/vaultwarden.log:/remotelogs/vaultwarden/vaultwarden.log:ro #optional
105-
- /path/to/vsftpd.log:/remotelogs/vsftpd.log:ro #optional
106+
- /path/to/vsftpd/vsftpd.log:/remotelogs/vsftpd/vsftpd.log:ro #optional
106107
restart: unless-stopped
107108
```
108109
@@ -126,17 +127,18 @@ docker run -d \
126127
-v /path/to/gitea/gitea.log:/remotelogs/gitea/gitea.log:ro `#optional` \
127128
-v /path/to/homeassistant/home-assistant.log:/remotelogs/homeassistant/home-assistant.log:ro `#optional` \
128129
-v /path/to/lighttpd/error.log:/remotelogs/lighttpd/error.log:ro `#optional` \
130+
-v /path/to/nextcloud/nextcloud.log:/remotelogs/nextcloud/nextcloud.log:ro `#optional` \
129131
-v /path/to/nginx/log:/remotelogs/nginx:ro `#optional` \
130-
-v /path/to/nzbget/log:/remotelogs/nzbget:ro `#optional` \
132+
-v /path/to/nzbget/nzbget.log:/remotelogs/nzbget/nzbget.log:ro `#optional` \
131133
-v /path/to/overseerr/overseerr.log:/remotelogs/overseerr/overseerr.log:ro `#optional` \
132134
-v /path/to/prowlarr/prowlarr.txt:/remotelogs/prowlarr/prowlarr.txt:ro `#optional` \
133135
-v /path/to/radarr/radarr.txt:/remotelogs/radarr/radarr.txt:ro `#optional` \
134136
-v /path/to/roundcube/errors:/remotelogs/roundcube/errors:ro `#optional` \
135-
-v /path/to/sabnzbd/log:/remotelogs/sabnzbd:ro `#optional` \
137+
-v /path/to/sabnzbd/sabnzbd.log:/remotelogs/sabnzbd/sabnzbd.log:ro `#optional` \
136138
-v /path/to/sonarr/sonarr.txt:/remotelogs/sonarr/sonarr.txt:ro `#optional` \
137139
-v /path/to/unificontroller/server.log:/remotelogs/unificontroller/server.log:ro `#optional` \
138140
-v /path/to/vaultwarden/vaultwarden.log:/remotelogs/vaultwarden/vaultwarden.log:ro `#optional` \
139-
-v /path/to/vsftpd.log:/remotelogs/vsftpd.log:ro `#optional` \
141+
-v /path/to/vsftpd/vsftpd.log:/remotelogs/vsftpd/vsftpd.log:ro `#optional` \
140142
--restart unless-stopped \
141143
lscr.io/linuxserver/fail2ban:latest
142144
```
@@ -162,17 +164,18 @@ Container images are configured using parameters passed at runtime (such as thos
162164
| `-v /remotelogs/gitea/gitea.log:ro` | Path to gitea log file. Mounted as Read Only. |
163165
| `-v /remotelogs/homeassistant/home-assistant.log:ro` | Path to homeassistant log file. Mounted as Read Only. |
164166
| `-v /remotelogs/lighttpd/error.log:ro` | Path to lighttpd error log file. Mounted as Read Only. |
167+
| `-v /remotelogs/nextcloud/nextcloud.log:ro` | Path to nextcloud log file. Mounted as Read Only. |
165168
| `-v /remotelogs/nginx:ro` | Path to nginx log folder. Mounted as Read Only. |
166-
| `-v /remotelogs/nzbget:ro` | Path to nzbget log folder. Mounted as Read Only. |
169+
| `-v /remotelogs/nzbget/nzbget.log:ro` | Path to nzbget log file. Mounted as Read Only. |
167170
| `-v /remotelogs/overseerr/overseerr.log:ro` | Path to overseerr log file. Mounted as Read Only. |
168171
| `-v /remotelogs/prowlarr/prowlarr.txt:ro` | Path to prowlarr log file. Mounted as Read Only. |
169172
| `-v /remotelogs/radarr/radarr.txt:ro` | Path to radarr log file. Mounted as Read Only. |
170173
| `-v /remotelogs/roundcube/errors:ro` | Path to roundcube error log file. Mounted as Read Only. |
171-
| `-v /remotelogs/sabnzbd:ro` | Path to nzbget log folder. Mounted as Read Only. |
174+
| `-v /remotelogs/sabnzbd/sabnzbd.log:ro` | Path to sabnzbd log file. Mounted as Read Only. |
172175
| `-v /remotelogs/sonarr/sonarr.txt:ro` | Path to sonarr log file. Mounted as Read Only. |
173176
| `-v /remotelogs/unificontroller/server.log:ro` | Path to unificontroller server log file. Mounted as Read Only. |
174177
| `-v /remotelogs/vaultwarden/vaultwarden.log:ro` | Path to vaultwarden log file. Mounted as Read Only. |
175-
| `-v /remotelogs/vsftpd.log:ro` | Path to vsftpd log file. Mounted as Read Only. |
178+
| `-v /remotelogs/vsftpd/vsftpd.log:ro` | Path to vsftpd log file. Mounted as Read Only. |
176179

177180
## Environment variables from files (Docker secrets)
178181

readme-vars.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,18 @@ opt_param_volumes:
4545
- { vol_path: "/remotelogs/gitea/gitea.log:ro", vol_host_path: "/path/to/gitea/gitea.log", desc: "Path to gitea log file. Mounted as Read Only." }
4646
- { vol_path: "/remotelogs/homeassistant/home-assistant.log:ro", vol_host_path: "/path/to/homeassistant/home-assistant.log", desc: "Path to homeassistant log file. Mounted as Read Only." }
4747
- { vol_path: "/remotelogs/lighttpd/error.log:ro", vol_host_path: "/path/to/lighttpd/error.log", desc: "Path to lighttpd error log file. Mounted as Read Only." }
48+
- { vol_path: "/remotelogs/nextcloud/nextcloud.log:ro", vol_host_path: "/path/to/nextcloud/nextcloud.log", desc: "Path to nextcloud log file. Mounted as Read Only." }
4849
- { vol_path: "/remotelogs/nginx:ro", vol_host_path: "/path/to/nginx/log", desc: "Path to nginx log folder. Mounted as Read Only." }
49-
- { vol_path: "/remotelogs/nzbget:ro", vol_host_path: "/path/to/nzbget/log", desc: "Path to nzbget log folder. Mounted as Read Only." }
50+
- { vol_path: "/remotelogs/nzbget/nzbget.log:ro", vol_host_path: "/path/to/nzbget/nzbget.log", desc: "Path to nzbget log file. Mounted as Read Only." }
5051
- { vol_path: "/remotelogs/overseerr/overseerr.log:ro", vol_host_path: "/path/to/overseerr/overseerr.log", desc: "Path to overseerr log file. Mounted as Read Only." }
5152
- { vol_path: "/remotelogs/prowlarr/prowlarr.txt:ro", vol_host_path: "/path/to/prowlarr/prowlarr.txt", desc: "Path to prowlarr log file. Mounted as Read Only." }
5253
- { vol_path: "/remotelogs/radarr/radarr.txt:ro", vol_host_path: "/path/to/radarr/radarr.txt", desc: "Path to radarr log file. Mounted as Read Only." }
5354
- { vol_path: "/remotelogs/roundcube/errors:ro", vol_host_path: "/path/to/roundcube/errors", desc: "Path to roundcube error log file. Mounted as Read Only." }
54-
- { vol_path: "/remotelogs/sabnzbd:ro", vol_host_path: "/path/to/sabnzbd/log", desc: "Path to nzbget log folder. Mounted as Read Only." }
55+
- { vol_path: "/remotelogs/sabnzbd/sabnzbd.log:ro", vol_host_path: "/path/to/sabnzbd/sabnzbd.log", desc: "Path to sabnzbd log file. Mounted as Read Only." }
5556
- { vol_path: "/remotelogs/sonarr/sonarr.txt:ro", vol_host_path: "/path/to/sonarr/sonarr.txt", desc: "Path to sonarr log file. Mounted as Read Only." }
5657
- { vol_path: "/remotelogs/unificontroller/server.log:ro", vol_host_path: "/path/to/unificontroller/server.log", desc: "Path to unificontroller server log file. Mounted as Read Only." }
5758
- { vol_path: "/remotelogs/vaultwarden/vaultwarden.log:ro", vol_host_path: "/path/to/vaultwarden/vaultwarden.log", desc: "Path to vaultwarden log file. Mounted as Read Only." }
58-
- { vol_path: "/remotelogs/vsftpd.log:ro", vol_host_path: "/path/to/vsftpd.log", desc: "Path to vsftpd log file. Mounted as Read Only." }
59+
- { vol_path: "/remotelogs/vsftpd/vsftpd.log:ro", vol_host_path: "/path/to/vsftpd/vsftpd.log", desc: "Path to vsftpd log file. Mounted as Read Only." }
5960

6061
# application setup block
6162
app_setup_block_enabled: true

root/defaults/fail2ban/filter.d/airsonic-auth.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ before = common.conf
66
[Definition]
77

88
failregex = ^.*: Login failed from \[<HOST>\]$
9+
910
ignoreregex =
1011

1112
datepattern = {^LN-BEG}

root/defaults/fail2ban/filter.d/filebrowser-auth.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ before = common.conf
66
[Definition]
77

88
failregex = ^.*/api/login: 403 <HOST> \<nil\>.*$
9+
910
ignoreregex =

root/defaults/fail2ban/filter.d/gitea-auth.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ before = common.conf
66
[Definition]
77

88
failregex = ^.*(Failed authentication attempt|invalid credentials|Attempted access of unknown user).* from <HOST>.*$
9+
910
ignoreregex =

root/defaults/fail2ban/filter.d/homeassistant-auth.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ before = common.conf
77

88
failregex = ^%(__prefix_line)s.*\[homeassistant.components.http.ban\] Login attempt or request with invalid authentication from <HOST>.*$
99

10+
ignoreregex =
11+
1012
[Init]
1113
datepattern = ^%%Y-%%m-%%d %%H:%%M:%%S
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Fail2Ban filter configuration for nextcloud
2+
3+
[INCLUDES]
4+
before = common.conf
5+
6+
[Definition]
7+
8+
_groupsre = (?:(?:,?\s*"\w+":(?:"[^"]+"|\w+))*)
9+
10+
failregex = ^\{%(_groupsre)s,?\s*"remoteAddr":"<HOST>"%(_groupsre)s,?\s*"message":"Login failed:
11+
^\{%(_groupsre)s,?\s*"remoteAddr":"<HOST>"%(_groupsre)s,?\s*"message":"Trusted domain error.
12+
13+
datepattern = ,?\s*"time"\s*:\s*"%%Y-%%m-%%d[T ]%%H:%%M:%%S(%%z)?"

root/defaults/fail2ban/filter.d/nginx-418.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
# Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.
55

66
[INCLUDES]
7+
78
before = common.conf
89

910
[Definition]
1011

11-
failregex = ^<HOST>.*"(GET|POST).*" (418) .*$
12+
failregex = ^<HOST>.*"(GET|POST|HEAD).*" (418) .*$
13+
1214
ignoreregex =
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Fail2Ban filter configuration for nginx unauthorized
2+
3+
[INCLUDES]
4+
before = common.conf
5+
6+
[Definition]
7+
8+
failregex = ^<HOST>.*"(GET|POST|HEAD).*" (401) .*$
9+
10+
ignoreregex = .*(?i)plex.*

root/defaults/fail2ban/filter.d/nzbget-auth.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ before = common.conf
66
[Definition]
77

88
failregex = ^.*WARNING Request received on port .* from .* \(forwarded for: <HOST>.*\), but username .* or password invalid$
9+
910
ignoreregex =

0 commit comments

Comments
 (0)