Answer the question
In order to leave comments, you need to log in
What is the best way to protect your server from hacking and dos attacks?
Previously, I launched a Django server uWSGI and Nginx on Ubuntu 14.04, but for some reason after 20 minutes I lost access via ssh (
Please tell me what is the best way to protect yourself from attacks from outside, thanks in advance)
Answer the question
In order to leave comments, you need to log in
Most likely they are brute forcers.
There is information here.
Google in the direction of protection against brute force.
you need to turn off password authorization, only using keys and allow login only to your user (not root)
https://serversforhackers.com/series/ssh-usage-tip...
1. fail2ban
2. in the file /etc/ssh/sshd_config add:
# Authentication:
LoginGraceTime 120
PermitRootLogin prohibit-password
StrictModes yes
# What ports, IPs and protocols we listen for - port for ssh access
# prescribe your own other than 22, for example 22222
Port 22
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question