Linux Web Virtual Server Security Checklist

soumya Ghorpade

Linux (and Unix-like) systems present an expansive attack surface that must be minimized through various security checks and practices. To achieve this goal, regular security assessments and implementation of various security practices is highly recommended.

Make sure your passwords are strong to prevent unauthorized access and data loss in case of a breach.

1. Run ubuntu-security-check

Many server administrators focus their security efforts on web servers hosting dynamic content; however, hardening an operating system can help deter both initial exploitation and post-exploitation attacks like privilege escalation.

Keep your software updated. Keeping Ubuntu software updated helps reduce vulnerabilities and make it more difficult for hackers to gain entry. There are various tools that automate this process, such as sysctl or uuupdate, available to assist with this endeavor.

Additionally, it’s advisable to conduct regular backups and use a firewall. In addition, install fail2ban, which will block any unauthorized login attempts on your Ubuntu server. Lastly, follow best server room design practices so your servers are physically secured and properly cooled; consider also adding disaster recovery solutions such as SAN that make recovering operating systems and applications after hardware failure easier.

2. Run ubuntu-security-audit

Web servers are an easy target for attackers, yet can be made more secure with some best practices such as disabling root login, enforcing strong passwords and maintaining system logs. Furthermore, updating software frequently to address vulnerabilities will further strengthen security on web servers.

lynis is an open source security auditing tool, used to scan a system for potential security issues and provide recommendations on how to improve its protection. It can be run on Linux or Unix systems and checked for vulnerable packages, security configuration settings and compliance with CIS benchmarks.

Updates can help protect a server against hacking attempts, but keeping all its software current can be time-consuming and cause performance issues. A binary package manager such as yum or apt may provide an easier and quicker solution that updates systems without negatively affecting performance.

3. Run ubuntu-security-audit

The Lynis command is a free and open source utility designed to facilitate system auditing. It checks configurations and files, scans installed software for vulnerabilities and determines which ports can be closed down to reduce risks.

Make sure your users use strong passwords and regularly change them, to protect against unauthorized access and reduce the risk of data loss or identity theft.

Make sure your software is kept current; new patches for security issues are released frequently and this can help decrease the risk of attacks that exploit older software versions.

An audit is key for keeping your Ubuntu server secure from hackers, using strong passwords, regularly updating software and taking backups as necessary. All these techniques will help create a safer Linux web server – but keep in mind that security should always be an ongoing process – there’s never an endpoint with regards to increasing server protection!

4. Run ubuntu-security-audit-report-report

Although most server administrators prioritize web server security through application layer security controls, it’s equally essential to hardening their operating system to prevent initial and post-exploitation attacks such as privilege escalation.

Make sure your password policy is stringent and requires users to regularly change their passwords in order to reduce the risk of old ones being reused by attackers. Requiring users to update their passwords at regular intervals can further protect against this possibility.

Use tools such as Logwatch or logcheck to keep tabs on security-related log files, such as authentication and firewall logs. These will alert sysadmins of any unusual activity and produce an accurate report of it all.

Disable booting from external devices such as USB thumb drives to limit physical attacks against the server, enable SecureBoot to protect the BIOS against attacks that could occur during bootup and implement server room design best practices to make sure your server is physically secured and cooled, and regularly update your system so as to patch any security vulnerabilities as soon as they arise.

 

Back to blog