-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathreadme-vars.yml
127 lines (120 loc) · 7.53 KB
/
readme-vars.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
---
# project information
project_name: fail2ban
project_url: "http://www.fail2ban.org/"
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/fail2ban-logo.png"
project_blurb: |
[{{ project_name|capitalize }}]({{ project_url }}) is a daemon to ban hosts that cause multiple authentication errors.
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
# supported architectures
available_architectures:
- {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
- {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
# container parameters
common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
param_usage_include_net: true
param_net: "host"
param_net_desc: "Shares host networking with container."
param_usage_include_env: true
param_env_vars:
- {env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London.", name: "Timezone"}
param_usage_include_vols: true
param_volumes:
- {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Persistent config files"}
- {vol_path: "/var/log:ro", vol_host_path: "/var/log", desc: "Host logs. Mounted as Read Only."}
cap_add_param: true
cap_add_param_vars:
- {cap_add_var: "NET_ADMIN", desc: "Required for fail2ban to be able to modify iptables rules."}
- {cap_add_var: "NET_RAW", desc: "Required for fail2ban to be able to bind to any interface & use RAW sockets."}
# optional parameters
opt_param_usage_include_env: true
opt_param_env_vars:
- {env_var: "VERBOSITY", env_value: "-vv", desc: "Set the container log verbosity. Valid options are -v, -vv, -vvv, -vvvv, or leaving the value blank or not setting the variable.", name: "Verbosity", env_options: ["", "-v", "-vv", "-vvv", "-vvvv"]}
opt_param_usage_include_vols: true
opt_param_volumes:
- {vol_path: "/remotelogs/airsonic:ro", vol_host_path: "/path/to/airsonic/log", desc: "Optional path to airsonic log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/apache2:ro", vol_host_path: "/path/to/apache2/log", desc: "Optional path to apache2 log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/authelia:ro", vol_host_path: "/path/to/authelia/log", desc: "Optional path to authelia log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/emby:ro", vol_host_path: "/path/to/emby/log", desc: "Optional path to emby log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/filebrowser:ro", vol_host_path: "/path/to/filebrowser/log", desc: "Optional path to filebrowser log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/homeassistant:ro", vol_host_path: "/path/to/homeassistant/log", desc: "Optional path to homeassistant log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/lighttpd:ro", vol_host_path: "/path/to/lighttpd/log", desc: "Optional path to lighttpd log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/nextcloud:ro", vol_host_path: "/path/to/nextcloud/log", desc: "Optional path to nextcloud log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/nginx:ro", vol_host_path: "/path/to/nginx/log", desc: "Optional path to nginx log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/nzbget:ro", vol_host_path: "/path/to/nzbget/log", desc: "Optional path to nzbget log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/overseerr:ro", vol_host_path: "/path/to/overseerr/log", desc: "Optional path to overseerr log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/prowlarr:ro", vol_host_path: "/path/to/prowlarr/log", desc: "Optional path to prowlarr log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/radarr:ro", vol_host_path: "/path/to/radarr/log", desc: "Optional path to radarr log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/sabnzbd:ro", vol_host_path: "/path/to/sabnzbd/log", desc: "Optional path to sabnzbd log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/sonarr:ro", vol_host_path: "/path/to/sonarr/log", desc: "Optional path to sonarr log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/unificontroller:ro", vol_host_path: "/path/to/unificontroller/log", desc: "Optional path to unificontroller log folder. Mounted as Read Only."}
- {vol_path: "/remotelogs/vaultwarden:ro", vol_host_path: "/path/to/vaultwarden/log", desc: "Optional path to vaultwarden log folder. Mounted as Read Only."}
# application setup block
app_setup_block_enabled: true
app_setup_block: |
This container is designed to allow fail2ban to function at the host level, as well as at the docker container level.
If you are running applications on the host, you will need to set the `chain` to `INPUT` in the jail for that application.
### [Configuration Files](https://github.com/linuxserver/fail2ban-confs)
On first run, the container will create a number of folders and files in `/config`. The default configurations for fail2ban are all disabled by default.
Please refer to the [Configuration README](https://github.com/linuxserver/fail2ban-confs/blob/master/README.md), which can be viewed in our repository, or in your config folder at `/config/fail2ban/README.md`.
### Remote Logs
All jails require the ability to read the application log files.
We recommend mounting each application's log folder as a volume to the container (illustrated by the optional volumes in our documentation).
Mounting individual log files can cause issues and is not recommended.
The `/remotelogs` path is designed to act as a parent for all log files you would like fail2ban to be able to use.
Each log file should be mounted in a subfolder underneath `/remotelogs`, ex:
- `/remotelogs/nginx/` would mount a folder containing the nginx logs to the container
# init diagram
init_diagram: |
"fail2ban:latest": {
docker-mods
base {
fix-attr +\nlegacy cont-init
}
docker-mods -> base
legacy-services
custom services
init-services -> legacy-services
init-services -> custom services
custom services -> legacy-services
legacy-services -> ci-service-check
init-migrations -> init-adduser
init-os-end -> init-config
init-config -> init-config-end
init-fail2ban-config -> init-config-end
init-os-end -> init-crontab-config
init-mods-end -> init-custom-files
base -> init-envfile
init-config -> init-fail2ban-config
base -> init-migrations
base -> init-mods
init-config-end -> init-mods
init-mods -> init-mods-end
init-mods-package-install -> init-mods-end
init-mods -> init-mods-package-install
base -> init-os-end
init-adduser -> init-os-end
init-envfile -> init-os-end
init-migrations -> init-os-end
init-custom-files -> init-services
init-mods-end -> init-services
init-services -> svc-cron
svc-cron -> legacy-services
init-services -> svc-fail2ban
svc-fail2ban -> legacy-services
}
Base Images: {
"baseimage-alpine:3.20"
}
"fail2ban:latest" <- Base Images
# changelog
changelogs:
- {date: "12.10.24:", desc: "Rebase to Alpine 3.20."}
- {date: "05.03.24:", desc: "Rebase to Alpine 3.19."}
- {date: "01.06.23:", desc: "Add optional VERBOSITY environment variable, allowing users to set the container log verbosity."}
- {date: "25.05.23:", desc: "Rebase to Alpine 3.18, deprecate armhf."}
- {date: "15.12.22:", desc: "Replace unmaintained ssmtp with msmtp."}
- {date: "15.12.22:", desc: "Rebase to Alpine 3.17, Add ssmtp and whois packages. Symlink config to allow live reloading."}
- {date: "25.08.22:", desc: "Update README to clarify remote log information."}
- {date: "09.08.22:", desc: "Initial Release."}