I’ve finished configuration on a new LEMP server and wonder: what measures do folks suggest for securing my new VPS?
Root login is disabled, I’m using strong passwords and fail2ban is enabled. What else might I want configure/enable?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
1.) Disable password logins and use key-based authentication, instead; <br>2.) Change your SSH port from the default Port 22 to a random port <b>below 1024</b>; and <br>3.) Enable a firewall. <br> <br>Check out the Security Hardening section of <a href=“https://github.com/DigitalOcean-User-Projects/Articles-and-Tutorials/blob/master/salt_cloud.md#security-hardening”>Automated Provisioning of DigitalOcean Cloud Servers with Salt Cloud on Ubuntu 12.04</a>
Apologies for hijacking this thread <br> <br>@Pablo, I bow to your greater knowledge, why use a port below 1024?
From <a href=“http://serverfault.com/questions/189282/why-change-default-ssh-port”>serverfault | Why change default ssh port?</a> <br><blockquote> <br>Whatever port you chose, if you do move away from 22, make sure it is below 1024. Under most Unix-a-like setups in their default config, only root (or users in the root group) can listen on ports below 1024, but any user can listen on the higher ports. Running SSH on a higher port increases the chance of a rogue (or hacked) user managing to crash your SSH daemon and replace it with their own or a proxy. <br></blockquote>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.