Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Trèfle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Open source
Trèfle
Commits
58614031
Commit
58614031
authored
Jul 06, 2020
by
David Foucher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP add fail2ban
parent
a8048d10
Pipeline
#3535
passed with stage
in 2 minutes and 4 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
1 deletion
+32
-1
docker/backoffice/etc/fail2ban/filter.d/nginx-conn-limit.conf
...er/backoffice/etc/fail2ban/filter.d/nginx-conn-limit.conf
+2
-0
docker/backoffice/etc/fail2ban/filter.d/nginx-http-auth.conf
docker/backoffice/etc/fail2ban/filter.d/nginx-http-auth.conf
+3
-0
docker/backoffice/etc/fail2ban/filter.d/nginx-req-limit.conf
docker/backoffice/etc/fail2ban/filter.d/nginx-req-limit.conf
+2
-0
docker/backoffice/etc/fail2ban/jail.d/nginx.conf
docker/backoffice/etc/fail2ban/jail.d/nginx.conf
+22
-0
docker/dockerfile_web
docker/dockerfile_web
+3
-1
No files found.
docker/backoffice/etc/fail2ban/filter.d/nginx-conn-limit.conf
0 → 100755
View file @
58614031
[
Definition
]
failregex
=
limiting
connections
by
zone
.*
client
: <
HOST
>
docker/backoffice/etc/fail2ban/filter.d/nginx-http-auth.conf
0 → 100755
View file @
58614031
[
Definition
]
failregex
= ^ \[
error
\] \
d
+
#\d+: \*\d+ user "\S+":? (password mismatch|was not found in ".*"), client: <HOST>, server: \S+, request: "\S+ \S+ HTTP/\d+\.\d+", host: "\S+"\s*$
ignoreregex
=
docker/backoffice/etc/fail2ban/filter.d/nginx-req-limit.conf
0 → 100755
View file @
58614031
[
Definition
]
failregex
=
limiting
requests
,
excess
:.*
by
zone
.*
client
: <
HOST
>
docker/backoffice/etc/fail2ban/jail.d/nginx.conf
0 → 100755
View file @
58614031
[sshd]
enabled
=
false
[nginx-req-limit]
enabled
=
true
filter
=
nginx-req-limit
action
=
iptables-multiport[name=ReqLimit,
port="http,https",
protocol=tcp]
port
=
http,https
logpath
=
/var/log/nginx/error.log
findtime
=
600
bantime
=
7200
maxretry
=
10
[nginx-conn-limit]
enabled
=
true
filter
=
nginx-conn-limit
action
=
iptables-multiport[name=ConnLimit,
port="http,https",
protocol=tcp]
port
=
http,https
logpath
=
/var/log/nginx/error.log
findtime
=
300
bantime
=
7200
maxretry
=
100
docker/dockerfile_web
View file @
58614031
...
@@ -28,6 +28,7 @@ RUN apt-get update && apt-get -y install \
...
@@ -28,6 +28,7 @@ RUN apt-get update && apt-get -y install \
cron \
cron \
rsyslog \
rsyslog \
logrotate \
logrotate \
fail2ban \
iptables \
iptables \
git \
git \
dnsutils
dnsutils
...
@@ -43,5 +44,6 @@ RUN git clone -b ${TREFLE_OLD_VERSION} ${TREFLE_GIT} /srv/trefle-old && \
...
@@ -43,5 +44,6 @@ RUN git clone -b ${TREFLE_OLD_VERSION} ${TREFLE_GIT} /srv/trefle-old && \
chown -R www-data: /srv/trefle-old && \
chown -R www-data: /srv/trefle-old && \
chmod -R u+rwx /srv/trefle-old
chmod -R u+rwx /srv/trefle-old
CMD service nginx start; \
CMD service fail2ban start; \
service nginx start; \
cron -f
cron -f
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment