landfall 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -1
- package/dist/cli.mjs +416 -335
- package/dist/index.html +85 -34
- package/dist/{server-D2_Msm-i.mjs → server-Bbkw_Rxx.mjs} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@ cd my-site && lf deploy -s vps # live at https://my-site.203-0-113-7.sslip.
|
|
|
31
31
|
- [Managing servers](#managing-servers)
|
|
32
32
|
- [Traffic, certificates and checks](#traffic-certificates-and-checks)
|
|
33
33
|
- [Server system](#server-system)
|
|
34
|
+
- [Security](#security)
|
|
34
35
|
- [Web UI](#web-ui)
|
|
35
36
|
- [Using landfall from scripts and agents](#using-landfall-from-scripts-and-agents)
|
|
36
37
|
- [Command reference](#command-reference)
|
|
@@ -519,6 +520,19 @@ started service, puts a removed key back, bans an unbanned IP again or restores
|
|
|
519
520
|
firewall does. Services work with systemd and OpenRC. The Docker log limit applies to containers created
|
|
520
521
|
afterwards (and Docker restarts only with `--restart`), so redeploy or restart sites to apply it to them.
|
|
521
522
|
|
|
523
|
+
## Security
|
|
524
|
+
|
|
525
|
+
```sh
|
|
526
|
+
lf security # ssh passwords, root login, firewall, fail2ban, automatic updates, pending reboot
|
|
527
|
+
lf harden # all of: ssh (keys only), fail2ban, updates; or name the parts
|
|
528
|
+
lf harden ssh # asks first; refuses while a user logs in with a password only (--force)
|
|
529
|
+
lf keys add --generate -u anna # new pair at ~/.ssh/<server>_anna, its public key on the server
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
`lf setup` and `lf server add` end with the same advice, and the web UI shows it on the system tab with a
|
|
533
|
+
button per fix. Each fix is journaled, so `lf undo` takes it back. Automatic updates know apt
|
|
534
|
+
(unattended-upgrades) and dnf (dnf-automatic). Without root or sudo landfall only checks sshd's settings.
|
|
535
|
+
|
|
522
536
|
## Web UI
|
|
523
537
|
|
|
524
538
|
```sh
|
|
@@ -615,7 +629,9 @@ lf undo -s box -y # revert the last run
|
|
|
615
629
|
| `lf services restart\|start\|stop <service>` | Controls a service. Stopping ssh needs `--force`; stopping or restarting docker asks first. Start and stop can be undone. |
|
|
616
630
|
| `lf services logs <service> [-f] [-n lines]` | Shows a service's log: journald, else its log file. |
|
|
617
631
|
| `lf keys [--json]` | Lists the SSH keys in each user's `authorized_keys` (root and `/home/*`). ★ marks the key this machine logs in with. Alias: `keys ls`. |
|
|
618
|
-
| `lf keys add <key\|file.pub> [--user u]` | Adds a public key, to the login user by default. Undoable. |
|
|
632
|
+
| `lf keys add <key\|file.pub> [--user u] [--generate]` | Adds a public key, to the login user by default. `--generate` makes a new pair at `~/.ssh/<server>_<user>` instead. Undoable. |
|
|
633
|
+
| `lf security [--json]` | Checks ssh password and root login, firewall, fail2ban, automatic updates and a pending reboot, and names the command that fixes each. |
|
|
634
|
+
| `lf harden [ssh\|fail2ban\|updates…] [--force]` | Turns ssh passwords off, installs and starts fail2ban, turns on automatic security updates; all three without arguments. `ssh` refuses to lock out password-only users without `--force`. Undoable. |
|
|
619
635
|
| `lf keys rm <fingerprint\|comment> [--user u]` | Removes a key by comment or fingerprint prefix. Refuses the key this machine uses without `--force`. Undoable. |
|
|
620
636
|
| `lf bans [--json]` | Shows banned IPs per fail2ban jail. |
|
|
621
637
|
| `lf unban <ip>` | Unbans an IP in every jail that bans it. Undo bans it again. |
|