# security

## sk8harddiefast

how can i secure my gentoo box???i want to learn to secure gentoo systems but i have no idea of security.i suppose a firewall,to check and close ports but all this are only in my mind.i have no idea of them.i always listen for secured systems but what i need and how i make it real???

----------

## NeddySeagoon

sk8harddiefast,

What is secure to you?

What do you want to be secure against?

Security is always a trade off with usability.

Security is like the layers of an onion, the idea is not to exclude intruders with certainty, just to make it clear that there are much easier systems to break into than yours, so that potential intruders go away before they do any damage.

The first step is a firewall on incoming ports to keep the nasty things out. The next step is to firewall outgoing traffic, so that anything that does get in cannot 'phone home'.

You might add tripwire to detect changes to your filesystem, this only detects them after they have happened, so maybe you don't consider that security?

Next up is a hardened system. This protects against whole classes of exploits but begins to get intrusive.

Making Xorg work is now non trivial, as its not hardened safe - the hardened install will keep killing it.

You can encrypt your filesystems, set a BIOS and grub passwords and keep the keys on s removable device like a USB key.

As long as you do not lose the PC and the key, your data is safe against theft.

What level of security do you need against the threats that you perceive ?

----------

## sk8harddiefast

to filtering things that i will tell and stop them emediately,to stop my friends to take remote my desktop for example.only for learning.i want to learn.not only to listen for all this.to make them happen.to understand how they work.also.what is encryption and decryption.any program to use it for understand what is this?

----------

## nixnut

Moved from Portage & Programming to Networking & Security.

----------

## NeddySeagoon

sk8harddiefast,

Start with a firewall. There is a lot of learning in IPtables. The Home Router Guide tells how to set up a system as a router, including IPtables.

IPtables can do a lot more than just blocking traffic and it need not be set up on a seperate system. You will not use the Network Address Translation (NAT) parts if you are firewalling the local PC.

----------

## sk8harddiefast

any good gui firewall?i have downloaded astaro but this need a pc only for this.

----------

## think4urs11

 *sk8harddiefast wrote:*   

> any good gui firewall?

 

FirewallBuilder

and for some more cues: https://forums.gentoo.org/viewtopic-p-5664686.html#5664686

----------

## Deem3n

Try to install Config Server Security & Firewall

----------

## depontius

Actually, a firewall isn't the first step.

Start by understanding what services you're running, and what services you need to run.  Only run what you need to, and nothing more.  For that matter, if you don't need it, don't even install it.  If you don't even have a web server installed on your box, then nobody can use it to crack in.

Next, understand how to configure the services you are using.  Misconfigured services are another common source of problems.

Updates!  Keep your system up-to-date.  That doesn't necessarily mean every day, or staying on the bleeding edge.  When I've remote-administrated my mom's machine (600+ miles away) I used glsa-check to find necessary security updates.  For remote admin it was security-only for updates, and I did full updates when visiting, so I could recover from problems.

Finally, realize that security is in layers.  NONE of these layers will be perfect, all of the time.  The idea here is that if there is a hole in one layer, another layer will protect you.  Secondary is that any holes will be temporary, because you keep your system up-to-date.  The holes don't accumulate, someday leading to holes that "align", allowing your system to get cracked.

THEN get a firewall.

----------

