Any computer which is connected with Internet has risk of getting infected from viruses and vulnerabilities. There are several approaches to security hardening. Although Ubuntu is much more secure that Windows, but still it is better to take some precautions. I have listed some simple tips to harden the security on your Ubuntu machine.
1. Keep softwares updated. To avoid any security vulnerability make sure that softwares installed on the ubuntu machine are at the latest stable release. There could be the couple of ways to get updates of software on Ubuntu, but the most commonly used method is to use apt-get to grab the updates of packages supported by Ubuntu. Run below command to get updates of packages in Ubuntu.
sudo apt-get update
Also make sure that the softwares that you are installing on your Ubuntu are from trusted vendors only. You can also enable automatic security updates on your Ubuntu. For enabling automatic security updates, go to System -> Administration -> software sources. Open up the “Updates” tab and select “Automatic updates”, also select “Install security updates without confirmation”.
2. Firewall. In Ubuntu all ports are blocked by default and you will have to open the ports which you need on your machine. For this purpose, you can get help of firestarter. Firestarter is a graphical tool of Ubuntu which helps you easily modify the firewall rules. You can launch firestarter from Application menu of your Ubuntu machine.
View in gallery3. Avoid using root as user. By default Ubuntu has root user disabled for security reasons. By working as non root user, you can avoid so many mistakes. Modifications made by root user are often unrecoverable and any wrong command executed from root user can really put you in problem.
4. Default Settings. Be careful whenever you are going to change the default settings of your Ubuntu machine particularly network settings. Make sure that you have not allowed the remote logins to your Ubuntu machine.
5. Securing the web browsers. Most of the web sites are flash and Java script based now a days. To overcome any issues of security which you may face from web browser, make sure that you have denied all cookies and added trusted sites in your browser’s settings. There could also be some other security measures which may vary from browser to browser.
There is no end to security measures. Following above guidelines will help you to secure your Ubuntu machine to much extent. Enjoy!