ssh
This commit is contained in:
parent
b71876a299
commit
0bf8539909
@ -11,8 +11,10 @@ services:
|
|||||||
- /etc/fail2ban/entrypoint.sh
|
- /etc/fail2ban/entrypoint.sh
|
||||||
volumes:
|
volumes:
|
||||||
- ./fail2ban/entrypoint.sh:/etc/fail2ban/entrypoint.sh
|
- ./fail2ban/entrypoint.sh:/etc/fail2ban/entrypoint.sh
|
||||||
|
- ./fail2ban/sshd_config:/etc/ssh/sshd_config
|
||||||
ports:
|
ports:
|
||||||
- 22:22/tcp
|
- 22:22/tcp
|
||||||
|
- 2222:2222/tcp
|
||||||
networks:
|
networks:
|
||||||
mynet:
|
mynet:
|
||||||
ipv4_address: 172.24.0.101
|
ipv4_address: 172.24.0.101
|
||||||
|
@ -30,9 +30,9 @@ fi
|
|||||||
# Send email
|
# Send email
|
||||||
if [ \$ABUSE_ADDR ]; then
|
if [ \$ABUSE_ADDR ]; then
|
||||||
#sendmail -t -i -f \$SENDER_MAIL \$ABUSE_ADDR << EOF
|
#sendmail -t -i -f \$SENDER_MAIL \$ABUSE_ADDR << EOF
|
||||||
swaks -f \$SENDER_MAIL -t \"\$ABUSE_ADDR\" --tlsc -au $USER -ap $PASS -s $SMTP -p 465
|
swaks -f \$SENDER_MAIL -t \"\$ABUSE_ADDR,webmaster@$DOMAIN\" --tlsc -au $USER -ap $PASS -s $SMTP -p 465
|
||||||
--h-Subject \"[Urgent]: Automatic abuse report for IP address \$REMOTE_IP from $DOMAIN, please read\" --h-From \"Fail2Ban $DOMAIN <\$SENDER_MAIL>\"
|
--h-Subject \"[Urgent]: Automatic abuse report for IP address \$REMOTE_IP from $DOMAIN, please read\" --h-From \"Fail2Ban $DOMAIN <\$SENDER_MAIL>\"
|
||||||
--h-Bcc \"webmail@$DOMAIN\" --h-To \$ABUSE_ADDR --body
|
--h-Bcc \"webmaster@$DOMAIN\" --h-To \$ABUSE_ADDR --body
|
||||||
\"This is an automatic email abuse report about the IP address \$REMOTE_IP generated at \$DATE, please do not reply.
|
\"This is an automatic email abuse report about the IP address \$REMOTE_IP generated at \$DATE, please do not reply.
|
||||||
You get this email because you are listed as the official and popular abuse email contact for this concrete IP address.
|
You get this email because you are listed as the official and popular abuse email contact for this concrete IP address.
|
||||||
|
|
||||||
|
10
fail2ban/sshd_config
Normal file
10
fail2ban/sshd_config
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
Port 22
|
||||||
|
Port 2222
|
||||||
|
PermitRootLogin no
|
||||||
|
ChallengeResponseAuthentication yes
|
||||||
|
UsePAM yes
|
||||||
|
X11Forwarding no
|
||||||
|
X11UseLocalhost no
|
||||||
|
PrintMotd no
|
||||||
|
AcceptEnv LANG LC_*
|
||||||
|
PasswordAuthentication yes
|
Loading…
Reference in New Issue
Block a user