6 Best Ways to Improve Linux Security

linux security

The Linux OS has historically been regarded as more secure than Windows or macOS thanks to how it handles user permissions and because it’s open-source software. One of the other big reasons for that faith in Linux’s security was the fact that it isn’t as popular among users worldwide. With Windows being the leader in terms of user adoption.

 

While experts still agree that Linux is a secure OS, some very valid concerns have started popping up in recent years. For one, Linux has seen a boost in popularity as of late, paired with an increase in interest from cybercriminals. But more than that, despite its secure design, Linux is vulnerable to attack.

 

The threat landscape is evolving in attack surface and complexity. So, although Windows is considered less secure, Linux users should be aware of the threats they face and prioritize security nonetheless. Let’s take a look at some of the ways users can improve their Linux security to avoid malware, brute force, and other attacks.

 

1. Encrypt the PC’s Drives

 

Many Linux users can skip this part, as their drives are already encrypted. Because when installing any Linux distribution, it automatically asks if the drives should be encrypted, and many people do. For those that haven’t yet, though, it’s important to do this step as soon as possible.

 

To encrypt a drive on Linux, follow this handy guide from the Oracle Help Center. Make sure to remember the password to be able to access those drives!

 

2. Install an Anti-Virus & Ensure the Firewall is Enabled

 

Many Linux users don’t feel that the OS needs an anti-virus since it isn’t a big target for cybercriminals, but that is changing. So, even though Linux is more secure by design and less popular than Windows and macOS, an anti-virus can add another layer of protection. Better safe than sorry! Just be sure to pick one that supports Linux as well as the correct distribution.

 

Enable the firewall as well if it isn’t already enabled. Open up the Linux Terminal and enter the “sudo apt-get install gufw” command to enable the firewall. After the installation is done, open the firewall by typing “gufw” into the console and then switch on the firewall.

 

3. Get a VPN

 

Virtual private networks (VPNs) aren’t just for people who want to access Netflix abroad or live in oppressive countries. Even for people living in the USA VPN is needed. VPN encrypts and reroutes all of the internet data traveling to and from the PC through a secure server. That ensures the encrypted connection can’t be intercepted by a third party.

 

Even with the security-focused design, Linux is known for, having a VPN as an additional form of protection is still essential. Using a VPN, a lot of harmful attacks that require a network connection and traceable IP addresses are automatically canceled out.

 

4. Increase Browser Security

 

A VPN and firewall aren’t the only ways to increase a computer’s internet connection security. Several browser extensions can add privacy and increased security as well. These include Privacy Badger, which blocks ads and can prevent adware, and NoScript (for Firefox), which blocks JavaScript on websites unless approved to run.

 

5. Enable Automatic OS & Software Updates

 

Since Linux is open-source software, it’s constantly being updated, especially with important security fixes. Any other installed software should also receive regular updates, some of which may contain security patches. Because of this, these updates must be installed as soon as possible.

Many types of cyber attacks, like the zero-day attack, rely on both vendors’ and users’ taking their time to fix recently discovered security issues. While Linux users can do nothing about a vulnerability that the vendor hasn’t yet patched, they can ensure their system is up to date. Back in 2017, the Petya cyberattack showed just how lax most people are when it comes to updating their software.

 

6. Disable Root Login via SSH

 

There are many bots on the web that are searching for and trying to access Linux computers via SSH. They generally use a brute force attack method to try and guess various passwords to find the right password and gain root access. That would be disastrous.

So, the best defense against this type of attack is to disable root login over SSH. To do this, head to “/etc/ssh/sshd_config” to access the file responsible for configuring SSH. Then open it with a text editor and remove root login by entering the “#PermitRootLogin no” command into the console.

 

The Bottom Line

 

Along with these extra security measures, which can be implemented quickly and easily, constant vigilance is also required. While some measures will protect against mistakes, like getting infected with malware from a phishing attack, avoidance is still best.