Skip to main content

4-1: Enable UFW

The Uncomplicated Firewall (UFW) is a security tool that helps you protect your server from attacks. It provides an easy way to manage ports and services that you want to make available while keeping unnecessary ports disabled.

Ports you need to open

For running a Pocket node, you'll need to open the following ports:

  • 80: HTTP
  • 443: HTTPS
  • 8081: For the Pocket HTTP API
  • 26656: For the Pocket RPC API
  • 22: SSH

Enabling UFW

sudo ufw enable

Note: Type y to confirm.

Default to deny all

sudo ufw default deny

Allow SSH

sudo ufw allow ssh

Allow nginx (80, 443)

sudo ufw allow 'Nginx Full'

Allow port 8081

sudo ufw allow 8081

Allow port 26656

sudo ufw allow 26656

Confirm ufw status

That's it for the ufw setup. Let's just check the ufw status to confirm the ports are open. To do that, run the following command:

sudo ufw status