Add readme file for systemd integration. Some minor changes on jail values.
This commit is contained in:
parent
4dbdf09dc9
commit
95e952c946
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.swp
|
28
0.10.2/README.sytemd
Normal file
28
0.10.2/README.sytemd
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# - Configure fail2ban as systemd service
|
||||||
|
# -
|
||||||
|
|
||||||
|
cat << EOF > /etc/systemd/system/fail2ban.service
|
||||||
|
[Unit]
|
||||||
|
Description=Fail2Ban Service
|
||||||
|
Documentation=man:fail2ban(1)
|
||||||
|
After=network.target iptables.service firewalld.service ip6tables.service ipset.service
|
||||||
|
PartOf=iptables.service firewalld.service ip6tables.service ipset.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStartPre=/bin/mkdir -p /var/run/fail2ban
|
||||||
|
ExecStart=/usr/local/bin/fail2ban-server -xf start
|
||||||
|
# if should be logged in systemd journal, use following line or set logtarget to sysout in fail2ban.local
|
||||||
|
# ExecStart=/usr/local/bin/fail2ban-server -xf --logtarget=sysout start
|
||||||
|
ExecStop=/usr/local/bin/fail2ban-client stop
|
||||||
|
ExecReload=/usr/local/bin/fail2ban-client reload
|
||||||
|
PIDFile=/var/run/fail2ban/fail2ban.pid
|
||||||
|
Restart=on-failure
|
||||||
|
RestartPreventExitStatus=0 255
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable fail2ban.service
|
@ -93,7 +93,10 @@ bantime = 10800
|
|||||||
[dovecot]
|
[dovecot]
|
||||||
|
|
||||||
enabled = true
|
enabled = true
|
||||||
action = %(action_mbu)s
|
# - Take care to allowh 'whois' requests from this mashine. Maybe
|
||||||
|
# - you have configure your firewall
|
||||||
|
action = %(action_mwl)s
|
||||||
|
#action = %(action_mbu)s
|
||||||
port = pop3,pop3s,imap2,imaps,submission,465
|
port = pop3,pop3s,imap2,imaps,submission,465
|
||||||
filter = dovecot[mode=sql]
|
filter = dovecot[mode=sql]
|
||||||
#mode = sql
|
#mode = sql
|
||||||
|
Loading…
Reference in New Issue
Block a user