Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NoCloud-Auto-Installer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NoCloud
NoCloud-Auto-Installer
Commits
08c9559f
Commit
08c9559f
authored
3 months ago
by
David Beniamine
Browse files
Options
Downloads
Plain Diff
Merge branch '133-fail2ban-page' into 'master'
ajout du services bannisement See merge request
!19
parents
b9be0883
52304779
Branches
Branches containing commit
No related tags found
1 merge request
!19
ajout du services bannisement
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
upgrade/Traefik.sh
+12
-0
12 additions, 0 deletions
upgrade/Traefik.sh
upgrade/traefik_fail2ban.sh
+14
-1
14 additions, 1 deletion
upgrade/traefik_fail2ban.sh
with
26 additions
and
1 deletion
upgrade/Traefik.sh
+
12
−
0
View file @
08c9559f
...
...
@@ -49,6 +49,18 @@ sed -i "s/IGNORE_IPS=.*/IGNORE_IPS=$iptetrix/" .env
docker-compose up
-d
--build
# Services ban
cd
/home/dockerweb/
if
[
!
-d
"ban"
]
;
then
git clone https://gitlab.tetras-libre.fr/nocloud/docker/ban.git
cd
/home/dockerweb/ban
cp
.env.sample .env
else
cd
/home/dockerweb/ban
git pull
fi
# MAJ traefik
cd
/home/dockerweb/traefik
git pull
...
...
This diff is collapsed.
Click to expand it.
upgrade/traefik_fail2ban.sh
+
14
−
1
View file @
08c9559f
...
...
@@ -7,6 +7,7 @@ logpath = /home/dockerweb/traefik/log/access.log
chain = DOCKER-USER
mode = aggressive
findtime = 4h
banaction = docker-page
EOF
cat
<<
EOF
> /etc/fail2ban/jail.d/nocloud_base.conf
[sshd]
...
...
@@ -21,5 +22,17 @@ banaction = %(banaction_allports)s
bantime = 1w
findtime = 1d
EOF
fail2ban-client reload
cat
<<
EOF
> /etc/fail2ban/action.d/docker-page.conf
[Definition]
actionstart =
actionstop =
actioncheck =
actionban = cd /home/dockerweb/ban; bash ban.sh <ip>
actionunban = cd /home/dockerweb/ban; bash unban.sh <ip>
EOF
fail2ban-client reload
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment