Ah yes, the day I thought I should be more cybersecurity focused...
I had just finished setting up my shiny new server — Apache, MariaDB, users, groups, read/write permissions — everything was running perfectly. It was beautiful. The final step? Security. I wanted to do things “properly.” So I decided to configure UFW (Uncomplicated Firewall).
And that’s when the brain fog hit.
Instead of allowing SSH (port 22), I proudly typed:
sudo ufw allow 80
sudo ufw allow 443
sudo ufw enable
I hit Enter. The firewall activated.
Connection dropped.
Silence.
It took me a few seconds to realize what I’d done. I had just locked myself out of the only way into the server. No SSH. No console. Just… regret.
Did I take a snapshot of the server before doing this? Of course not! Did I have a failsafe plan? Why would I? I had everything under control… until I didn’t.
Everything I’d set up — gone. All the configurations — gone. My dignity? Also gone.
I sat there, staring at my terminal like a digital caveman who’d just invented fire and immediately burned down his hut.
So yes, that’s how I learned one of the golden rules of IT: > Never secure yourself out of your own system.
Now, whenever I touch a firewall, I whisper a little prayer to port 22. Because I’ve been there. I’ve felt the pain. And I will never underestimate the power of one missing rule again.