You are not logged in.

#1 2010-09-29 11:52:59

ftornell
Member
Registered: 2008-08-18
Posts: 277
Website

Arch secure "out-of-the-box"?

Hi!

I'm going to install a new "Family" server at home where my wife can access her documents and pictures placed on the server. On the same time I would like to access the server from my work using ssh.

I'm runnig Archlinux on my laptop and on my desktop; my wife uses ubuntu on her laptop.

Some friends told me that Debian is one of the most stable linux servers out there. But in the end I guess it's how things are configured and what type of services you have running.

I can install / configure the basic things needed for Arch to run on my laptop, done it a thousand times but when it comes to security I have no idea how to protect the server.
If I place family photos and documents on the server I do want them to stay there! smile

So, the question is if I should go for my beloved Archlinux or is there any cons that should make me go for Debian or anything else?
If I need to do tons of things in Arch to make it secure if I go for a basic "SMB/CIFS" share feature and SSH server I might miss a few steps that make it insecure!

Thank you!


[ logicspot.NET | mempad.org ]
Archlinux x64

Offline

#2 2010-09-29 12:43:45

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: Arch secure "out-of-the-box"?

Hi,

i think the "stable" primarily refers to the stability of debian's packages - not its security. As far as security goes, it comes down to what software you use, if you keep it up to date and how you configure it. there's really not much difference between linux distributions except that with archlinux you have easy access to the current versions of software.

IMHO, most people make too much fuss about home security - all you need are good passwords.
Especially with SSH you have many options to make your server as secure as possible. Assuming you have a router, just make sure port forwarding is only done for the SSH service. Keep everything else (e.g. the samba server) within your LAN. Use a key and password for SSH and sshfs for remote file access.
Don't make user accounts without passwords and whenever you use passwords, make em strong ones. It also can't hurt to use a non-standard port for SSH.
Keep logs and look through them from time to time.

IF you're gonna be target of an "attack" it's most likely just a port-scan, looking for open ports like ftp/ssh and common username/password combinations. There's really not much potential harm there.

If you use WLAN or directly connect to the Internet it'll be more difficult to secure your pcs. Do you?

Last edited by demian (2010-09-29 12:58:37)


no place like /home
github

Offline

#3 2010-09-29 12:48:12

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Re: Arch secure "out-of-the-box"?

And, IMHO, you should disable root logins in SSH.  Check out this thread as well: https://bbs.archlinux.org/viewtopic.php?id=105620

Offline

#4 2010-09-29 13:18:54

ftornell
Member
Registered: 2008-08-18
Posts: 277
Website

Re: Arch secure "out-of-the-box"?

Hi guys, Thx for the imput.
So If I use complex passwords and disable root login from SSH I would be pretty safe.

Every PC and Server are connected using WLAN or Cable (NAT) behind a D-Link Router.

What logs would a portscan or login attempts appear in?


[ logicspot.NET | mempad.org ]
Archlinux x64

Offline

#5 2010-09-29 14:15:05

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: Arch secure "out-of-the-box"?

To detect and log a port scan you'd need a software firewall like iptables (included in the kernel). Your router keeps logs too though and you can probably have it send to you via E-Mail. I don't think this is necessary at all though especially since you have only one port for SSH open. It's sufficient to look for authentication attempts in /var/log/auth.log.

You should prolly read up on how to secure your WLAN though.

Last edited by demian (2010-09-29 14:21:51)


no place like /home
github

Offline

#6 2010-09-29 14:18:03

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Arch secure "out-of-the-box"?

Security steps to take concerning ssh

First of all use a high numbered port which you define in /etc/ssh/sshd_config.

You should enter only the IP range from where you wish to connect from in /etc/hosts.allow i.e:

#
# /etc/hosts.allow
#
sshd: 192.168.0.
sshd: 136.56.67.
# End of file

Edit your /etc/security/access.conf to only allow root access from a local network:

+ : root : 192.168.0.0/24
- : ALL EXCEPT bob: ALL

Where bob is your user.

The following is only for the adventurous:
To test you can try adding "sshd: ALL: ALL" in hosts.allow, use port 22 and then see how many break-in attempts there are within 30 minutes. Use a proper password of course.

Then enable the above settings and observe how quiet your /var/log/messages becomes.

Offline

#7 2010-09-29 14:28:48

ftornell
Member
Registered: 2008-08-18
Posts: 277
Website

Re: Arch secure "out-of-the-box"?

Sweet, ill give it a try!


[ logicspot.NET | mempad.org ]
Archlinux x64

Offline

#8 2010-09-29 20:58:28

aksdb
Member
Registered: 2007-10-07
Posts: 38

Re: Arch secure "out-of-the-box"?

Regarding WLAN Security: I would advise to install a RADIUS Server somewhere inside your LAN (or maybe directly on your WLAN Router) and setup WPA-EAP. That allows even username/password authentication for the WLAN access and is as secure as it can get (public key encryption, switching keys every few minutes, etc.).

Offline

#9 2010-09-30 06:33:27

ftornell
Member
Registered: 2008-08-18
Posts: 277
Website

Re: Arch secure "out-of-the-box"?

Had about 300 login attempts during the night...if they breake in i will show in auth.log right? if they haven't remove it! smile


[ logicspot.NET | mempad.org ]
Archlinux x64

Offline

#10 2010-10-03 08:34:00

fijam
Member
Registered: 2009-02-03
Posts: 244
Website

Re: Arch secure "out-of-the-box"?

As ssh brute-force attacks are a commonplace these days, it's a good idea to rely on key authentication only with some sort of filtering script (BlockHosts, Fail2Ban, Denyhosts, I personally prefer Sshguard + IPtables).

Basically, what you want to change in sshd_config is:

Protocol 2
PermitRootLogin no
PasswordAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
RSAAuthentication yes
PubkeyAuthentication yes

And don't forget to move your pubkey to authorized keys on the server first, or you can lock yourself out. And always keep you keys password-protected.

Last edited by fijam (2010-10-03 08:34:45)

Offline

#11 2010-10-03 08:48:44

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Arch secure "out-of-the-box"?

Key authentication is definitely the safer option, albeit less portable.

ftornell wrote:

Hi guys, Thx for the imput.
So If I use complex passwords and disable root login from SSH I would be pretty safe.

Every PC and Server are connected using WLAN or Cable (NAT) behind a D-Link Router.

What logs would a portscan or login attempts appear in?

/var/log/auth.log

shows you the login attempts - but you already seem to know. As far as security goes, I would make the iptables rules on the server pretty liberal; just make sure your router is well configured and isn't too lenient.

A simple fix to get rid of all the bots out there is to run ssh on a non-standard port. That weeds out 99,9% of those scans.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#12 2010-10-03 09:10:27

fijam
Member
Registered: 2009-02-03
Posts: 244
Website

Re: Arch secure "out-of-the-box"?

.:B:. wrote:

Fijam: I think you mean it's not that safe to rely on password authentication, key authentication being the safer option wink.

Although English is my second language I have no idea how my post implied otherwise. To clarify, encrypted keys > password authentication smile

Offline

#13 2010-10-03 09:34:54

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Arch secure "out-of-the-box"?

All on my side, I totally misread your statement. My apologies smile.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

Board footer

Powered by FluxBB