CentOS/Debian/Ubuntu production server security

ykgoh

Master Member
Joined
Jan 1, 2000
Messages
2,782
Reaction score
0
Are the above secure out-of-the-box assuming I do not set a weak root password after installation from ISO and using the latest version with default/standard settings as suggested by the installer?

Do I need to do further server hardening like for Windows Server?

Do we need to install antivirus for Linux production server?
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,549
Reaction score
1,302
Are the above secure out-of-the-box assuming I do not set a weak root password after installation from ISO and using the latest version with default/standard settings as suggested by the installer?

Do I need to do further server hardening like for Windows Server?

Do we need to install antivirus for Linux production server?

no they do not come hardened. Ubuntu and Debian distro system tend to exhibit higher order of hardening by default, but generally they are not fully harden. That includes things like

1) encryption of persistent data
2) sudoers and constraint
3) network firewall, syn flood prevention etc.
4) closing of non service critical processes and services such as xinetd, avahi daemon, cups services or so forth
5) configuration of selinux or apparmor etc if you are using them and made changes to your resources usage.
6) whitelisting of ip addresses for accessing your console and your services

feel free to read http://linux-audit.com/alternatives-to-bastille-linux-system-hardening-with-lynis/

yes linux system will require antivirus too. there are rootkits for linux too, and if your services include uploading of user data and serving data, you should scan incoming files too.
 

ykgoh

Master Member
Joined
Jan 1, 2000
Messages
2,782
Reaction score
0
Btw, to keep a server secure, we need to constantly keep updating and patching the software. Like how Microsoft Windows is releasing Windows updates every month, and urgent security updates more frequently.

How are RHEL/CentOS and Debian handling this?

Do they automatically check, download and install any updates without an administrator logging in to run yum update or apt-get update? I supposed this can be done via a cron job of some kind?

From real world experience, do they ever get into trouble after an update like software breaking, or missing dependencies? I heard yum is worse than apt-get at figuring out all the necessary dependencies. Conversely, apt-get/aptitude is usually safer and get the job done.

RHEL/CentOS is also deficient in handling OS upgrade, and recommends a clean re-install if OS upgrade is desired. I heard Debian is able to upgrade OS version and kernel more smoothly with aptitude/apt-get.

From reading around, I am leaning more towards Debian, but wanting to heard feedbacks from real world experience.
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,549
Reaction score
1,302
Btw, to keep a server secure, we need to constantly keep updating and patching the software. Like how Microsoft Windows is releasing Windows updates every month, and urgent security updates more frequently.

How are RHEL/CentOS and Debian handling this?

Do they automatically check, download and install any updates without an administrator logging in to run yum update or apt-get update? I supposed this can be done via a cron job of some kind?

From real world experience, do they ever get into trouble after an update like software breaking, or missing dependencies? I heard yum is worse than apt-get at figuring out all the necessary dependencies. Conversely, apt-get/aptitude is usually safer and get the job done.

RHEL/CentOS is also deficient in handling OS upgrade, and recommends a clean re-install if OS upgrade is desired. I heard Debian is able to upgrade OS version and kernel more smoothly with aptitude/apt-get.

From reading around, I am leaning more towards Debian, but wanting to heard feedbacks from real world experience.

Security patches are made available to Linux distro via their repository, so you can always update using yum in Redhat-based system, apt-get using Debian based system, pacman for Arch or yast2 for SuSE.

All these years using Linux, I haven't really encounter any specific cases where such security updates crash or crippled a system. But you do find prudent system administrators tend to disable automatic security patches update, or even if they were to perform any manual security patches, they will first backup the environments, do it on the staging environment, test out the functionality of the applications or system, then proceed the same on the production environment. If you value your rice bowl, you will do this no matter how safe the process is. The same should be for any platforms even for Windows Servers.

For Ubuntu, you can refer to https://help.ubuntu.com/community/AutomaticSecurityUpdates for the automatic security patches only update via cron. But remember, updating security patches may requires downtime, especially for libraries because once libraries are loaded into the memory, changing the binaries will not affect loaded binaries.

For kernel patches, I ubuntu/debian can perform apt-get dist-upgrade, but you will need to restart the system eventually. For redhat based system, I believe you can do "yum update kernel".

Even so, from an operational standpoint, you will not want to do it lightly or without the necessary precautions, no matter how safe it may seems.You simply can't uninstall when it comes to kernel update. If your system stall, you will be in deep trouble.

I do not study into great depth on how the packages dependencies checking between RPM and DEB defers, but so far, both has been working rather fine.
 

Rock-kun

Senior Member
Joined
Sep 10, 2007
Messages
991
Reaction score
1
I heard yum is worse than apt-get at figuring out all the necessary dependencies. Conversely, apt-get/aptitude is usually safer and get the job done.

That is a load of rubbish.

I'd say apt is trash because i have SEEN it permanently fail to recover if a package installation goes haywire or is abruptly terminated.
 

ykgoh

Master Member
Joined
Jan 1, 2000
Messages
2,782
Reaction score
0
That is a load of rubbish.

I'd say apt is trash because i have SEEN it permanently fail to recover if a package installation goes haywire or is abruptly terminated.

Relax. I didn't make this assertion, but some people dropped such comments online. However they just vaguely mentioned yum couldn't resolve or figure out the dependencies all the time, while apt-get in Debian/Ubuntu was able to.
I suspect this may be due to the size of repository used as well. Debian is known for having huge repository with most known packages available (~23,000). RHEL/Centos appear to be more conservative (~6,000).

Anyway, seems to me that Fedora is moving away from yum to dnf, while apt-get seems to be replaced by aptitude soon. We shall see the comments and reviews again.

Not trying to troll or spark off distro war here.
 
Last edited:

Rock-kun

Senior Member
Joined
Sep 10, 2007
Messages
991
Reaction score
1
Anyway, seems to me that Fedora is moving away from yum to dnf, while apt-get seems to be replaced by aptitude soon. We shall see the comments and reviews again.

They have already done so with F23with dnf replacing yum. It's trash as well, worse then yum. Was trying to run dnf group install kde-desktop-environment and it removed a whole bunch of key packages, along with installing conflicting packages and totally destroying everything in the process. Ended up reinstalling F23 and loading the packages one by one to get a multi DE.

zypper > everything else at this point of time.

Disclaimer: Fedora, Debian and Opensuse user.
 

ykgoh

Master Member
Joined
Jan 1, 2000
Messages
2,782
Reaction score
0
Thanks for sharing your personal experience. I was leaning towards Debian because of this article: http://inthebox.webmin.com/choosing-a-linux-distribution-for-web-server

That's what it says:


In short, CentOS should be considered a “cannot upgrade” OS for servers in remote locations. The only tools for performing remote upgrades are very early alpha quality at best and are not recommended by their developers for production systems.

And the author here is praising dnf as the superior replacement for yum due to dependency resolution issues. See
https://www.linux.com/learn/what-you-need-know-about-fedoras-switch-yum-dnf

If you’re an end-user, the switch from Yum to DNF means one very simple thing: a more reliable experience. Where this reliability comes in is DNFs superior dependency solving. It will now be a very rare occasion that you go to install a package and the system cannot resolve a dependency. The system is simply smarter. Yum’s dependency algorithm was, for all intents and purposes, broken. DNF’s SAT-based dependency solver fixes that issue.

That's what I fear about a bad package manager -- it can wreck a carefully configured system one fine day that is unrecoverable unless reinstalled from scratch.
 
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ Forums. Forum members and moderators are responsible for their own posts. Please refer to our Community Guidelines and Standards and Terms and Conditions for more information.
Top