Article 9.1 - UFW (Uncomplicated Firewall) — Recommended for Most Users — VPSGrid Knowledge Base
English
EnglishBeta EspañolPortuguês (Brasil)Coming soonFrançaisComing soonDeutschComing soon
Client Area

Article 9.1 - UFW (Uncomplicated Firewall) — Recommended for Most Users

0 found helpful

Article 9.1 - UFW (Uncomplicated Firewall) — Recommended for Most Users

Short answer

Install UFW, set default deny incoming, allow SSH/HTTP/HTTPS, enable only after SSH port is allowed. Full walkthrough linked below.

Updated Guide Available

This article has been superseded by How to Configure UFW Firewall on Ubuntu/Debian. Use the updated guide for the most accurate, current steps. The summary below is kept for reference.

Updated Guide Available

This article has been superseded by How to Configure UFW Firewall on Ubuntu/Debian. Use the updated guide for the most accurate, current steps. The summary below is kept for reference.

Overview

UFW is the recommended firewall front-end on Ubuntu/Debian VPS. Allow your SSH port before enabling or you may lock yourself out — recover via noVNC.

Quick commands

apt update && apt install ufw -y
ufw default deny incoming
ufw default allow outgoing
ufw allow 22/tcp comment "SSH"
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
ufw status verbose

Lockout recovery

If SSH stops working after enabling UFW, open noVNC and run ufw allow 22/tcp or disable UFW temporarily while fixing rules.

Full guide with diagrams: How to Configure UFW Firewall on Ubuntu/Debian.

Frequently Asked Questions

Should I use UFW or iptables?

Most users should start with UFW. Advanced custom rulesets may use iptables directly — see Article 9.2.

I locked myself out — help?

Open noVNC from Client Area, fix UFW rules, or see the UFW guide recovery section.

Related Articles

Need More Help?

Search this knowledgebase for related guides. If the issue persists, open a ticket at billing.vpsgrid.net with your service ID, primary IP, and steps already tried. See What Information to Include in a Support Request and Security Responsibilities on Unmanaged VPS for scope and required details.

Was this answer helpful?

Related Articles