F
F
Friend2016-12-02 15:07:42
Django
Friend, 2016-12-02 15:07:42

How to secure a VPS server?

There are a couple of simple Django projects with feedback, possibly with an admin panel. What is the best way to protect him? If you can link how to set up.
uWSGI and Nginx on Ubuntu 16.04

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Gordienko, 2016-12-06
@stagor

Add firewall - ufw, open only two ports.

apt-get install -y ufw

ufw default deny
ufw logging on
ufw allow 22
ufw allow 80
ufw allow 443
ufw limit ssh/tcp

yes | ufw enable

Disable in the nginx configuration to send a response to your version. Know less, sleep tight.
Remove the root user from ssh, and log into the server with an ssh key.
Access the database only through localhost.
Use the correct permissions for packages and files.
Basically enough to get started.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question