ozaydin.dev

Open to long-term internships

Projects

111 · Security · Infrastructure

Server Hardening

A server hardening project in Ansible that starts by auditing the server instead of changing it.

Year
2026
Role
Design and development
Tools
Ansible · Python · Lynis
“Server Hardening” · UTF-8 · 16 bytes · one column per byte

Problem

I have one server that runs my site and my email. Most guides I read started with steps that could lock me out of it if done in the wrong order.

What I did

  • Built an audit step that changes nothing by default; it only reads and writes a report.
  • Made every fix, like SSH, the firewall and fail2ban, its own category; each is turned on one at a time and can be dry-run first.
  • Wrote a rollback playbook that backs up the original files before any change and can restore all of them.

Flow

  1. Audit
  2. Plan
  3. Apply one category
  4. Verify
  5. Roll back

Result

After an SSH change, a new connection is opened to check that login still works; the firewall won't close a running service without approval. CI applies everything twice and fails if the second run changes anything.