Sub topic 16
Verify the Baseline with a Checklist
What to verify
Assume the server is freshly installed, you can run commands with sudo, and you know its expected hostname, address, SSH port, and services. A baseline is the known-good state immediately after setup. Record it before installing application software so later changes are easier to explain.
The checks should confirm:
- The server has the expected network address and route.
- DNS works in both directions where required.
- SSH and other listening services are expected.
- No systemd units failed during boot.
- Filesystems have enough free space.
- The clock is synchronized.
- The firewall allows required traffic.
- The boot log has no unexpected errors.
Run the checklist
Run these commands locally or through SSH:
hostnamectl
timedatectl status
timedatectl show -p NTPSynchronized --value
ip -br addr
ip route
getent hosts example.com
ss -tlnp
systemctl --failed
systemctl is-system-running
df -h
free -h
journalctl -p err -b --no-pagerInterpret the output against your installation plan. ip -br addr gives a compact view of interfaces and addresses. ip route should show the expected default gateway. getent hosts tests name resolution using the system's configured resolver.
ss -tlnp lists listening TCP sockets and the processes that own them. A fresh server might listen on SSH, but an unexpected database or web service should be investigated. systemctl --failed should normally report no failed units. systemctl is-system-running should report running; degraded means at least one service needs attention.
df -h reports filesystem usage. Leave working space for logs, package updates, and applications. Check mounted filesystems individually if the server uses separate partitions. journalctl -p err -b shows error-priority messages from the current boot. Some messages may be harmless, but every unfamiliar one deserves review.
Use the firewall command for your distribution:
# Ubuntu or another system using ufw
sudo ufw status verbose
# RHEL-family system using firewalld
sudo firewall-cmd --list-allCompare the allowed services with the access you actually need. SSH must be allowed before you close the current session.
Record the result
Save command output with a date and server name. A small record makes later troubleshooting and audits faster.
| Check | Expected result | If it fails |
|---|---|---|
| Hostname and time | Planned values and synchronized clock | Correct identity or time service |
| Network and DNS | Address, route, and name lookup work | Check link, route, and resolver |
| Services and firewall | Only required access is exposed | Stop unwanted services or adjust rules |
| Disk, units, and logs | Space is available and no unexplained failures | Investigate before deploying |
Exercise
Why should you use a second terminal when testing SSH after changing firewall or SSH settings?
Show answer
The current session may remain open even when new connections are blocked or misconfigured. A second terminal verifies that a fresh login still works.