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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NoCloud
NoCloud-Auto-Installer
Commits
59f2afc6
Verified
Commit
59f2afc6
authored
8 months ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Upgrade traefik fail2ban jails on update
parent
83451675
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
install/Traefik.sh
+1
-18
1 addition, 18 deletions
install/Traefik.sh
upgrade/Traefik.sh
+2
-0
2 additions, 0 deletions
upgrade/Traefik.sh
upgrade/traefik_fail2ban.sh
+25
-0
25 additions, 0 deletions
upgrade/traefik_fail2ban.sh
with
28 additions
and
18 deletions
install/Traefik.sh
+
1
−
18
View file @
59f2afc6
...
@@ -43,21 +43,4 @@ touch acme.json
...
@@ -43,21 +43,4 @@ touch acme.json
chmod
600 acme.json
chmod
600 acme.json
echo
"Update /home/dockerweb/traefik/docker-compose.yml to change htpassword line 29"
echo
"Update /home/dockerweb/traefik/docker-compose.yml to change htpassword line 29"
bash
$DIR
/upgrade/traefik_fail2ban.sh
cat
<<
EOF
> /etc/fail2ban/jail.d/nocloud_traefik.conf
[traefik-auth]
enabled = true
logpath = /home/dockerweb/traefik/log/access.log
chain = DOCKER-USER
mode = aggressive
findtime = 4h
EOF
cat
<<
EOF
> /etc/fail2ban/jail.d/nocloud_base.conf
[sshd]
enabled = true
chain = DOCKER-USER
[recidive]
enabled = true
chain = DOCKER-USER
EOF
fail2ban-client reload
This diff is collapsed.
Click to expand it.
upgrade/Traefik.sh
+
2
−
0
View file @
59f2afc6
...
@@ -63,3 +63,5 @@ find /home/dockerweb -name "docker-compose.yml" | while read file; do
...
@@ -63,3 +63,5 @@ find /home/dockerweb -name "docker-compose.yml" | while read file; do
fi
fi
cd
-
cd
-
done
done
bash
$DIR
/upgrade/traefik_fail2ban.sh
This diff is collapsed.
Click to expand it.
upgrade/traefik_fail2ban.sh
0 → 100644
+
25
−
0
View file @
59f2afc6
#!/bin/bash
cat
<<
EOF
> /etc/fail2ban/jail.d/nocloud_traefik.conf
[traefik-auth]
enabled = true
logpath = /home/dockerweb/traefik/log/access.log
chain = DOCKER-USER
mode = aggressive
findtime = 4h
EOF
cat
<<
EOF
> /etc/fail2ban/jail.d/nocloud_base.conf
[sshd]
enabled = true
chain = DOCKER-USER
[recidive-docker]
enabled = true
filter = recidive
chain = DOCKER-USER
logpath = /var/log/fail2ban.log
banaction = %(banaction_allports)s
bantime = 1w
findtime = 1d
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