Read a sample: 1. Define the Server Before Choosing the Distribution
A hardened server begins as a clear description of a job, not as a list of security settings. Before comparing distributions or opening an installer, decide what the server must do, who will administer it, what it must protect, and how you will recover when a change goes wrong. These decisions give every later technical choice a purpose.
Imagine being asked to build “a secure Linux server.” The request sounds straightforward, but it leaves important questions unanswered. Is the server hosting a public website or a private reporting tool? Must it run for years with few major changes, or can it be replaced regularly? Can an administrator reach a virtual console if remote access fails? Is the information on the server disposable lab data or a unique business record?
The answers affect the distribution you choose and the way you configure it. A long support period may matter more than access to the newest application packages. A familiar administration tool may reduce operational mistakes, but familiarity alone does not establish that a distribution meets the workload’s needs. Even a carefully configured firewall cannot compensate for an undocumented service that the organization expects to reach.
This chapter gives you a small, concrete server to plan. You will use it to create a requirements worksheet that follows the project through distribution selection, installation, hardening, and maintenance. You do not need to install Linux yet. The first deliverable is a plan that another administrator could read, question, and use.
For the book’s practice scenario, assume a small team needs an internal documentation server. Its job is to present a collection of static HTML pages to people on a designated internal network. The pages contain operating procedures and other low-sensitivity practice material. They do not contain passwords, customer records, or production secrets.
The server has two intended functions:
- Deliver the documentation over a web service to authorized network locations.
- Allow an administrator to manage the system remotely over SSH.
A web service handles requests for pages. SSH provides an encrypted remote administration channel. Both introduce network exposure, so both need an identified audience and a reason to exist. In this scenario, neither service needs to be reachable from the public internet.
Static pages keep the application requirements small: there is no database or application runtime to maintain for the initial workload. A team member may update the pages through an administrative process, but this scenario does not require a separate file-sharing service or a web-based editing interface. If a future requirement adds either, it must be evaluated as a change to the workload rather than enabled by default.
This is a hypothetical service, not a claim that every internal documentation site has the same needs. If you have a real workload in mind, adapt the worksheet. Preserve the distinction between what the service must do now and what someone might want someday. Optional capabilities can be recorded for later without becoming part of the initial installation.
A useful workload description is specific enough to guide a test. “Provide documentation” is a starting point. “Serve static HTML to clients on the lab’s internal network and provide SSH administration from the management workstation” is better: it identifies the service, the users’ location, and the management path.
A security boundary separates systems, people, or data with different levels of trust. In the lab, the virtual server, the administrator’s workstation, and any client used for testing have different roles even if they run on the same physical computer. Treating them as distinct helps you ask which connections are necessary.
For the practice server, draw or describe these boundaries:
- Client boundary: A test client on the internal lab network may request documentation pages. It has no administrative privileges on the server.
- Management boundary: The administrator’s workstation may connect to the server over SSH. Administrative actions require an account with appropriate privileges.
- Server boundary: The server runs the web service and stores the practice pages. It should not provide unrelated network services merely because they were available during installation.
- External boundary: The server may need outbound access to obtain software and security updates. That need does not, by itself, require accepting unsolicited inbound connections from the internet.
- Recovery boundary: An administrator can reach the virtual machine through its local console or the virtualization platform’s console when SSH is unavailable.
A network location is not a person’s identity. Restricting SSH to a management network can reduce exposure, but it does not replace account authentication or appropriate privileges. Likewise, an internal web service should not automatically be treated as suitable for sensitive material. For this exercise, avoid putting secrets into the pages or the worksheet.
Distinguish desired traffic from a firewall rule. At this stage, you are recording that a management workstation needs SSH access and that an internal client needs web access. You have not yet proved which interfaces, addresses, ports, or firewall tools will be in use. You will map and test those details after installation.
Consider outbound connections as well. A system that cannot reach an appropriate software source may be difficult to maintain. On the other hand, “allow everything because updates are needed” is not a precise requirement. Record the need to obtain updates, then determine the relevant sources and controls for your environment later.
A virtual machine is a useful setting for this book because it separates the practice server…