Come, sit. You have just been handed a new server to set up for the team, a fresh Linux or Windows machine, and your manager says “make it secure before it goes live”. Where do you even start? Let me tell you how I would think about it, and you tell me if it feels sensible.

The first thing to understand is that vendors ship products to be easy to start, not hard to attack. A database installed with a sample account, a router with a well-known admin password printed in the manual, a web server showing a friendly default page and its exact version number: all of these are choices made so that your first five minutes go smoothly. The vendor wants you to succeed at “hello world”. Hardening is the job of going back through those convenient choices and deciding which ones you can live without.

The idea: remove, restrict, verify

Almost every hardening activity falls into one of three moves. You remove what is not needed, you restrict what remains, and you verify that the result stays that way.

Removing means fewer things that can go wrong. Every installed service, open port, sample application, unused user account and spare software package is something that might be vulnerable, and something that needs patching. A server that does not run a print service cannot be attacked through the print service. If you would not be able to explain why a component is on the machine, that is a good reason to take it off.

Restricting is about what remains. Change or disable default accounts and passwords. Require key-based or multi-factor login for administration instead of passwords alone. Limit remote administration to a management network or a jump host rather than the whole internet. Give services their own low-privilege accounts. Turn on the host firewall with a default-deny stance. Set sensible file permissions. Tighten how the software talks, for example by disabling old protocol versions and weak cipher choices that nobody in your environment actually needs.

Verifying is the part beginners skip. A setting changed by hand on Monday may be quietly reverted by an update on Thursday, or never applied on the second server at all. Hardening that is not checked is a hope.

Do not invent your own checklist

You do not have to work out hundreds of settings from scratch. Published baselines exist. The Center for Internet Security (CIS) publishes benchmarks for operating systems, browsers, databases, cloud platforms and many other products, with explanations and recommended values. Vendors such as Microsoft publish their own security baselines, and several governments publish guidance too. Take one as your starting point, because it embodies experience from many people who already made the mistakes.

But read before you apply. Some baseline items will break your application. A rule that disables a legacy protocol might cut off an old billing system that still depends on it. Benchmarks usually offer more than one profile, a basic level and a stricter one, and the stricter one can cost you functionality. The sensible path is to test the baseline on a non-production copy, list the deviations you need with a written reason for each, and apply the rest. A documented exception is hardening done properly. A silent exception is a gap.

From one server to a hundred

Hand-hardening one machine is fine for learning. For a fleet, the process must be repeatable. The usual pattern is to build a “golden image” or a template that already contains the hardened configuration, and to use configuration management or infrastructure-as-code to apply and re-apply settings. Then if someone changes a setting manually, the tooling either flags the drift or puts it back. In the cloud this extends to the account itself: storage that blocks public access by default, default encryption, and policies that stop people from creating risky resources in the first place.

Scanning tools can compare machines against a baseline and give you a compliance percentage. Treat that number carefully. A server that scores 95 per cent but fails the one check about a wide-open administration port is worse than one that scores 80 per cent with that port closed. Weight the findings; do not just count them.

Things that get forgotten

  • Devices that are not servers. Network switches, Wi-Fi controllers, CCTV recorders, printers and biometric attendance machines often keep factory passwords for years, and they are rarely covered by patching routines.
  • Debug and verbose settings. Detailed error pages and developer modes left on in production reveal software versions, internal paths and sometimes data.
  • Logging. Hardening includes making sure the system records the right events and ships them somewhere an attacker cannot easily erase.
  • Decommissioning. A hardened server that is later switched off but never removed from the network or DNS becomes an unpatched orphan.

Back to your new server

So, with that new machine: pick the relevant baseline, build it in a test environment, remove what the application does not need, lock down access and administration, enable logging to a central place, apply patches, record deviations, then scan against the baseline and fix real gaps before go-live. Finally, put it in the inventory with an owner. That owner is not a formality. When a new vulnerability is announced, you want one name to call.

Hardening will not stop an attacker who finds a flaw in your application code, or who steals a legitimate password. It reduces the number of easy options. In practice, a large share of real-world intrusions use exactly the easy options: a default password, an exposed admin interface, an unneeded service nobody updated. Removing those is unglamorous and very effective.

Leave a Reply

Trending