F
F
Friend2016-10-17 04:03:27
linux
Friend, 2016-10-17 04:03:27

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

5 answer(s)
B
blackbeard, 2016-10-17
@Black_beard_ast

Most likely they are brute forcers.
There is information here.
Google in the direction of protection against brute force.

P
planc, 2016-10-17
@planc

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...

S
SKRSKR, 2016-10-17
@SKRSKR

cloudflare will go the main thing then un shoot off

A
Alexander Slyzhuk, 2016-10-17
@SLYzhuk

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

X
xmoonlight, 2016-10-17
@xmoonlight

port-knocking

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question