How to secure my droplet to avoid abuse

February 1, 2015 2.5k views

Hello, new to digitalocean,
I have created my first droplet here and i immediately went to configure my firewall following this nice tutorial :

I have jumped from another company here, today, after 10 days of trying to setup(and learn) a simple web server for several domains(nothing fancy). While my vps was new i was under some sort of attack/scan all the time which led others submitting abuse tickets to my provider thus my vps being locked.
So the question is,
is the above setup enough to NOT cause any inconvenience to my self and to others and give me enough time to further improve my firewall rules ?

Thanks in advance.

(Sorry for putting this out in such a generic and "noobish" way but i want to start with a good base.)

2 Answers

By far the biggest piece of security advice I can offer is to use SSH keys instead of passwords to access your server. Brute force login attacks are one of the most common ways for a server to be compromised. This tutorial shows you how:

Relatedly, I would also suggest disabling root login all together and create a separate "sudo" user. Check out this tutorial series for our recommended first steps with a new CentOS server:

by Justin Ellingwood
SSH, or secure shell, is the most common way of administering remote Linux servers. Although the daemon allows password-based authentication, exposing a password-protected account to the network can open up your server to brute-force attacks. In this guide, we demonstrate how to configure your server with SSH keys, which is the recommended authentication method. These are much more difficult for attackers to work around, giving you a more secure login mechanism.

Thank you asb,
Although my login credentials weren't compromised or anything i will surely go with the SSH key soon.

Have another answer? Share your knowledge.