Secure Your Server with fail2ban

Secure Your Server with fail2ban
Linux / Security
18:50, 01 April 2020
219
0

How to Secure Your Linux server with fail2ban and ssh
changing default port ssh 22 to 21348

tested: Debian 10 x64
software: fail2ban

1. update system
apt-get update && apt-get upgrade && apt-get dist-upgrade


2. change ssh port to 21348
nano /etc/ssh/sshd_config

change value:

#Port 22
to
Port 21348


2. install fail2ban
apt-get install fail2ban

3. secure port:

nano /etc/fail2ban/jail.conf

change value/3x/:

port     = ssh
to


[sshd]
# To use more aggressive sshd modes set filter parameter "mode" in jail.local:
# normal (default), ddos, extra or aggressive (combines all).
# See "tests/files/logs/sshd" or "filter.d/sshd.conf" for usage example and details.
mode   = aggressive    
port    = 21348
logpath = %(sshd_log)s
backend = %(sshd_backend)s

[dropbear]
port     = 21348
logpath  = %(dropbear_log)s
backend  = %(dropbear_backend)s

[selinux-ssh]
port     = 21348
logpath  = %(auditd_log)s


save and reboot server

Ctrl
Enter
Noticed-
add text and Ctrl+Enter
Comments: (0)
Top from category
Discord Server nice posts Discord Server nice posts
How to sending nice decorated broadcasts/alerts/news/posts to your discord server...
14.04.20
216
0
JailBreak | CT Zones JailBreak | CT Zones
Click for more info......
12.04.20
256
0