Skip to main content

UFW Settings

UFW is a firewall configuration tool that is included with Ubuntu. We use it to limit the available ports on our node.

Verify UFW configuration

To verify that UFW is installed and configured, do the following:

  1. First confirm that UFW is installed.

    ufw --version

    You should see something like this:

    ufw 0.36
    Copyright 2008-2015 Canonical Ltd.
  2. Check that UFW is enabled.

    ufw status

    You should see something like this:

    Status: active

    To Action From
    -- ------ ----
    Nginx Full ALLOW Anywhere
    8081 ALLOW Anywhere
    26656 ALLOW Anywhere
    22/tcp ALLOW Anywhere
    Nginx Full (v6) ALLOW Anywhere (v6)
    8081 (v6) ALLOW Anywhere (v6)
    26656 (v6) ALLOW Anywhere (v6)
    22/tcp (v6) ALLOW Anywhere (v6)

Installing UFW

If UFW is not installed, you can install it with the following command:

sudo apt-get install ufw  

Next, run the following commands to configure and enable UFW:

sudo ufw default deny incoming  
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow 443
sudo ufw allow 80
sudo ufw allow 8081
sudo ufw allow 26656
sudo ufw enable
sudo ufw status verbose