Skip to main content
Every VPS exposed to the public internet is a target. UFW (Uncomplicated Firewall) is the simplest way to lock down your Opus Host VPS: you allow the ports you actually use, deny the rest, and stop worrying about random probes hitting unused services.
Always allow SSH before enabling UFW. If you enable the firewall without allowing port 22 first, you will lock yourself out of your own server and need to use the in-browser console to recover.

Install UFW

UFW is preinstalled on most images. If it is missing, install it with:

Set default rules

Block all incoming traffic by default and allow all outgoing traffic. This is the safe baseline.

Allow the ports you need

1

Allow SSH first

2

Allow web traffic if you run a website

3

Allow any custom ports your app needs

4

Enable the firewall

Check status and rules

Remove a rule

Disable UFW

Only open the ports you actually need. Every open port is one more thing to keep patched.