Labthrift LabthriftWhat to buy. What to skip. Why.

Written 25 Aug 2026. This is a how-to, not a product card. Buy links are not tagged yet.

Turn on a simple firewall without locking yourself out

After SSH from the couch works, allow OpenSSH, then turn on ufw. The leftover box stays reachable. Surprise inbound ports do not.

This is a small safety step for a box that is already working. Allow the door you use first. Then turn on the guard.

Skip until SSH works

If you cannot log in with SSH from the couch, stop. Fix that first. Password SSH should already work. A key is optional, but logging in with a key is a nice next step once the password login is boring.

What ufw is

ufw is a simple on/off firewall on Debian and Ubuntu. It blocks surprise inbound ports that you did not mean to leave open. It is software on the leftover box, not a new appliance, and it is not pfSense. SSH must be allowed before you turn it on or you can lock yourself out.

Allow SSH first

While you are logged into the leftover box, run:

sudo ufw allow OpenSSH

This makes an exception for SSH before the firewall starts blocking inbound connections. If the OpenSSH profile is not available, sudo ufw allow 22/tcp is the direct version. The order matters. Allow first, enable second.

Turn it on

Now enable ufw:

sudo ufw enable

It warns that existing SSH connections may be disrupted. Because OpenSSH is already allowed, type yes and press Enter. Then check:

sudo ufw status

You should see Status: active and an OpenSSH rule marked ALLOW. Keep the current SSH window open while you test a second login from the laptop.

If you lock yourself out

Plug a screen and keyboard into the leftover box, log in at the console, and run sudo ufw disable. Then fix the SSH rule and try again. Do not solve this by opening port 22 on the router. SSH stays inside the house, as explained in keep the leftover box on the house network.

Samba or Pi-hole may need another rule

If you already run a file share or Pi-hole, those services may need their own local-network rules later. For a first enable on a box with only SSH, OpenSSH is enough.

What next

Once a week, keep the leftover box updated. That is enough for now. Do not buy a firewall appliance for this job.

Skip

Sources

Ubuntu Server: firewalls. Debian: ufw manual. Official pages only. For a working login, see SSH from the couch. For the house-network boundary, see keep the leftover box on the house network.

Also on this topic

Log in with a key, not the password every timeAfter password SSH works for a while, put a key on your laptop so the leftover box trusts that laptop. Keep the password as a backup at first. SSH from the couchType commands on the leftover box from your laptop, on the house network. Password login first. Do not open this to the internet. Keep the leftover box on the house networkSSH and Pi-hole belong on the house network. Skip this if you never opened the router settings. Do not forward port 22. Keep the leftover box updatedOnce a week, give the leftover box its fixes so SSH and Pi-hole are not sitting on last year's bugs.