Guides › Hosting, domain & email › Security & hacks

Firewall Basics (UFW, CSF): Open Only What You Need

Fewer open ports means less risk.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
Security and hacking

Steps

  1. Allow 80, 443 and your SSH port.
  2. Deny the rest.
  3. Test before disconnecting.

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-21.