server_secure
Harden SSH, install fail2ban, set up UFW firewall, and manage custom domains with SSL. Run security audits to assess server security.
Instructions
Secure Kastell servers. Secure: 'secure-setup' applies SSH hardening + fail2ban, 'secure-audit' runs security audit with score. Firewall: 'firewall-setup' installs UFW with Coolify ports, 'firewall-add'/'firewall-remove' manage port rules, 'firewall-status' shows current rules. Domain: 'domain-set'/'domain-remove' manage custom domain with optional SSL, 'domain-check' verifies DNS, 'domain-info' shows current FQDN. All require SSH access to server. For full one-shot hardening (SSH + fail2ban + UFW + sysctl + unattended-upgrades), use server_lock instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action: Secure: 'secure-setup' hardens SSH + installs fail2ban, 'secure-audit' runs security audit with score. Firewall: 'firewall-setup' installs UFW, 'firewall-add'/'firewall-remove' manage port rules, 'firewall-status' shows rules. Domain: 'domain-set'/'domain-remove' manage FQDN, 'domain-check' verifies DNS, 'domain-info' shows current FQDN. | |
| server | No | Server name or IP. Auto-selected if only one server exists. | |
| port | No | Port number. Required for firewall-add/remove. Optional SSH port for secure-setup. | |
| protocol | No | Protocol for firewall rules. Default: tcp. | tcp |
| domain | No | Domain name. Required for domain-set and domain-check. | |
| ssl | No | Enable SSL (https) for domain. Default: true. |