Install and Configure Firewall

This instruction guides you how to setup up firewall in Debian and Ubuntu using Anon ORPort 9001 and SSH port 22 as an example.

Update sources and install

Update your system and install the package and dependencies using these commands

sudo apt-get update -y
sudo apt-get install ufw -y

2. Enable firewall and add allow rules for SSH and ORport

sudo ufw allow 22
sudo ufw allow 9001
sudo ufw enable

When prompted with the message 'Command may disrupt existing ssh connections', type 'y' and hit ENTER.

Last updated