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
: HTTP443
: HTTPS8081
: For the Pocket HTTP API26656
: For the Pocket RPC API22
: 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