Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor 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
mediaserver
envsetup
Commits
ea4909e4
Commit
ea4909e4
authored
6 years ago
by
Nicolas KAROLAK
Browse files
Options
Downloads
Patches
Plain Diff
fail2ban config
parent
84abadcb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
2.Common_services/8.Fail2ban/0_setup.py
+4
-3
4 additions, 3 deletions
2.Common_services/8.Fail2ban/0_setup.py
global-conf.sh
+2
-2
2 additions, 2 deletions
global-conf.sh
with
6 additions
and
5 deletions
2.Common_services/8.Fail2ban/0_setup.py
+
4
−
3
View file @
ea4909e4
...
@@ -14,14 +14,15 @@ def setup(interactive=True):
...
@@ -14,14 +14,15 @@ def setup(interactive=True):
]
]
utils
.
run_commands
(
cmds
)
utils
.
run_commands
(
cmds
)
# configure fail2ban
# configure fail2ban
utils
.
log
(
'
Configure fail2ban
'
)
os
.
makedirs
(
'
/etc/fail2ban/filter.d
'
,
exist_ok
=
True
)
os
.
makedirs
(
'
/etc/fail2ban/filter.d
'
,
exist_ok
=
True
)
os
.
makedirs
(
'
/etc/fail2ban/jail.d
'
,
exist_ok
=
True
)
os
.
makedirs
(
'
/etc/fail2ban/jail.d
'
,
exist_ok
=
True
)
dir_path
=
utils
.
get_dir
(
__file__
)
dir_path
=
utils
.
get_dir
(
__file__
)
action
=
'
action_mwl
'
if
utils
.
get_conf
(
'
FAIL2BAN_SEND_EMAIL
'
,
''
)
!
=
'
0
'
else
'
action_
'
action
=
'
action_mwl
'
if
utils
.
get_conf
(
'
FAIL2BAN_SEND_EMAIL
'
,
''
)
=
=
'
1
'
else
'
action_
'
sender
=
utils
.
get_conf
(
'
EMAIL_SENDER
'
,
'
root@localhost
'
)
sender
=
utils
.
get_conf
(
'
EMAIL_SENDER
'
,
'
root@localhost
'
)
destemail
=
utils
.
get_conf
(
'
FAIL2BAN_DEST_EMAIL
'
,
''
)
or
utils
.
get_conf
(
'
EMAIL_ADMINS
'
,
'
root@localhost
'
)
destemail
=
utils
.
get_conf
(
'
FAIL2BAN_DEST_EMAIL
'
,
''
)
or
utils
.
get_conf
(
'
EMAIL_ADMINS
'
,
'
root@localhost
'
)
maxretry
=
utils
.
get_conf
(
'
FAIL2BAN_MAXRETRY
'
,
'
6
'
)
maxretry
=
utils
.
get_conf
(
'
FAIL2BAN_MAXRETRY
'
,
''
)
bantime
=
utils
.
get_conf
(
'
FAIL2BAN_BANTIME
'
,
'
30
'
)
bantime
=
utils
.
get_conf
(
'
FAIL2BAN_BANTIME
'
,
''
)
cmds
=
[
cmds
=
[
dict
(
dict
(
line
=
'
write
'
,
line
=
'
write
'
,
...
...
This diff is collapsed.
Click to expand it.
global-conf.sh
+
2
−
2
View file @
ea4909e4
...
@@ -108,8 +108,8 @@ BURP_CLIENT_MAIL_DEST='sysadmin@ubicast.eu'
...
@@ -108,8 +108,8 @@ BURP_CLIENT_MAIL_DEST='sysadmin@ubicast.eu'
# -- Fail2ban specific settings --
# -- Fail2ban specific settings --
FAIL2BAN_SEND_EMAIL
=
'0'
FAIL2BAN_SEND_EMAIL
=
'0'
FAIL2BAN_DEST_EMAIL
=
FAIL2BAN_DEST_EMAIL
=
FAIL2BAN_MAXRETRY
=
FAIL2BAN_MAXRETRY
=
'6'
FAIL2BAN_BANTIME
=
FAIL2BAN_BANTIME
=
'30'
# -- tmbackup.sh --
# -- tmbackup.sh --
BACKUP_SERVER
=
''
BACKUP_SERVER
=
''
...
...
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