Security – Securing Ubuntu in Every Possible Way


I want to secure my Ubuntu PC from any threats (network/online to local/offline protection). What all can I do?

Best Answer

The best way to secure any computer that way is just to unplug it.

Security threats have been around and will continue to exist, and that's something you have to understand. However there are a few tips, costumization that you can do to have a more secure box.

A lot of these security measures are present in a wiki here: Ubuntu Security

Here you will find an introduction to the most famous forms of attack and how to prevent them, including:

Introduction to AppArmor

Host-based Intrusion Detection Systems (HIDS)

Network Intrusion Detection Systems (Snort)





Luckly, there are a few good resources where you can learn more:


My favorite site for security


The Big Ol' Ubuntu Security Resource

Locking Down Ubuntu

Basic info

Because there are so many measures one can take reading for those sites is a good place to start. I can resume some of the basic measures:

  1. Change SSH port or disable (if you don't need it)
  2. Set up a firewall (Firestarter - begginers, Iptables - advanced users)
  3. Disable Flash/Java
  4. Secure your home - sudo chmod 0700 /home/your-user-name
  5. Download security update packages
  6. Use strong passwords
  7. Limit root access, use sudo instead
  8. Do not install software or add repositories from untrusted sources
  9. Deny all cookies and add trusted sites, allowing only for session.
  10. Kernel and compiler hardening

Also there's an Ubuntu version called Ubuntu Server that you should try.

Related Question