Skip to content

Security subcommand - #2

Merged
shayanb merged 10 commits into
mainfrom
security
Mar 11, 2026
Merged

Security subcommand #2
shayanb merged 10 commits into
mainfrom
security

Conversation

@shayanb

@shayanb shayanb commented Mar 11, 2026

Copy link
Copy Markdown
Member

Add security subcommand

logos-node security — Scans and reports findings:

  • Firewall status (UFW or firewalld)
  • SSH hardening (root login, password auth, authorized keys)
  • Automatic security updates (unattended-upgrades / dnf-automatic)
  • fail2ban (SSH brute-force protection)
  • File permissions (node directory, Docker socket)

logos-node security apply — Interactively fixes each issue:

  • Firewall: installs UFW/firewalld if missing, enables with SSH + Node P2P by default, then asks the user whether to also allow Node API and
    Grafana ports
  • SSH: disables root login (prohibit-password), offers to disable password auth only if authorized_keys exist (won't lock you out)
  • Auto-updates: installs and enables unattended-upgrades (Debian) or dnf-automatic (RHEL)
  • fail2ban: installs with sshd jail (5 retries, 1hr ban)
  • Permissions: fixes node directory to 700

Distro support: Debian/Ubuntu/Raspbian, Fedora/RHEL/CentOS/Rocky, Arch, with graceful fallbacks for others.

shayanb added 10 commits March 11, 2026 02:00
  logos-node security — Scans and reports findings:
  - Firewall status (UFW or firewalld)
  - SSH hardening (root login, password auth, authorized keys)
  - Automatic security updates (unattended-upgrades / dnf-automatic)
  - fail2ban (SSH brute-force protection)
  - File permissions (node directory, Docker socket)

  logos-node security apply — Interactively fixes each issue:
  - Firewall: installs UFW/firewalld if missing, enables with SSH + Node P2P by default, then asks the user whether to also allow Node API and
  Grafana ports
  - SSH: disables root login (prohibit-password), offers to disable password auth only if authorized_keys exist (won't lock you out)
  - Auto-updates: installs and enables unattended-upgrades (Debian) or dnf-automatic (RHEL)
  - fail2ban: installs with sshd jail (5 retries, 1hr ban)
  - Permissions: fixes node directory to 700

  Distro support: Debian/Ubuntu/Raspbian, Fedora/RHEL/CentOS/Rocky, Arch, with graceful fallbacks for others.
@shayanb
shayanb merged commit d6419d0 into main Mar 11, 2026
@shayanb
shayanb deleted the security branch March 11, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant