GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Lalatenduswain/linux-server-hardening-kit: Audit your Linux server's security with a scorecard, then apply a safe SSH + UFW + Fail2ban baseline in one command. Debian/Ubuntu.

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
harden.sh
harden.sh
 
 

Repository files navigation

🛡️ Linux Server Hardening Kit

Audit your server's security in seconds, then fix it in one command. A conservative SSH + UFW + Fail2ban baseline for Debian/Ubuntu — with a scorecard so you can see exactly where you stand before and after.

Shell Debian/Ubuntu License: MIT Sponsor


Why

Most "hardening guides" are 40 manual steps you do once and never re-check. This kit gives you a read-only audit that scores your box, and an apply mode that fixes the gaps — backing up every config first and refusing to lock you out of SSH.

Two modes

sudo ./harden.sh audit     # read-only — scores the box, changes nothing
sudo ./harden.sh apply     # interactive — applies the baseline (with backups)

Scorecard (audit)

== Security scorecard ==

[+] SSH: root password login disabled
[-] SSH: password authentication disabled
[+] Firewall: UFW installed
[-] Firewall: UFW active
[-] Fail2ban installed
...
Score: 4/8 (50%)
[!] Decent, but gaps remain — run: sudo ./harden.sh apply

What apply does

Area Baseline
SSH PermitRootLogin prohibit-password, MaxAuthTries 4, optional PasswordAuthentication no (only after you confirm keys work)
Firewall Installs UFW, allows your current SSH port first, then default-deny incoming + enable
Fail2ban Installs + enables an sshd jail (1h ban, 5 retries / 10 min)

Every edited file is copied to /var/backups/hardening-kit/ before changes.

Quick start

git clone https://github.com/Lalatenduswain/linux-server-hardening-kit.git
cd linux-server-hardening-kit
chmod +x harden.sh
sudo ./harden.sh audit

Safety first

⚠️ Hardening can lock you out if done carelessly. This script is built to avoid that — it allows your SSH port through UFW before enabling the firewall and only disables password auth after you confirm a working key. Still: keep a second session open the first time, and review the script.

🧰 Part of the Homelab Suite

  • 🏠 Proxmox Homelab Toolkit — day-1/day-2 Proxmox chores
  • ☁️ RClone Cloud-Backup Suite — verified cloud backups
  • 🛡️ Linux Server Hardening Kit — you are here

❤️ Support

If this kit hardened your servers, a GitHub Sponsorship keeps it current with new checks — and ⭐ starring helps other admins find it.

Contributing

New audit checks and distro support (RHEL/Alma/Rocky) are very welcome — open an issue or PR.

License

MIT © Lalatendu Swain

About

Audit your Linux server's security with a scorecard, then apply a safe SSH + UFW + Fail2ban baseline in one command. Debian/Ubuntu.

Topics

bashdevsecopsfail2banhardeninglinuxsecurityserver-securitysshsysadminufw

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.