Trusted Web Hosting | SECURE_INFRA: CAN_NODE_01 | ENCRYPTION: AES-256-GCM | Documentation |
VPS & Dedicated Servers

How to Set Up a Firewall on Your VPS with UFW

Published on Mar 07, 2026 Updated on Jul 31, 2026 1 views

UFW (Uncomplicated Firewall) simplifies Linux firewall configuration into a handful of readable commands, instead of raw iptables rules.

Basic Setup

Allow SSH access first (ufw allow OpenSSH) before enabling the firewall, to avoid accidentally locking yourself out.

Allowing Web Traffic

Once SSH is allowed, permit standard web traffic with ufw allow http and ufw allow https, then enable the firewall.

Checking Your Rules

ufw status shows exactly what's currently allowed and blocked, useful for confirming your configuration matches what you intended.

Further Reading


Back to Knowledgebase: Knowledgebase
Was this helpful?