Watch the video:
Timestamps:
0:00 - Intro/Explanation
0:19 - Installing UFW
0:40 - Configuring UFW
1:13 - Allow SSH (& optionally HTTP)
2:08 - Enabling UFW firewall
2:50 - Allow specific ports in UFW
3:24 - Allow specific port ranges in UFW
4:00 - Removing rules from UFWv
A firewall is an important part of Linux servers, and networked systems. This video shows you how to set up and use UFW to add and remove rules, ports and port ranges as well as other basic tasks to get you set up as quickly as possible.
Install UFW:
sudo apt install ufw
sudo ufw status
Configuring:
sudo nano /etc/default/ufw
sudo ufw disable
Allowlist firewall:
sudo ufw default deny incoming
sudo ufw default allow outgoing
Allow SSH
sudo ufw allow ssh
sudo allow http
sudo allow https
Enable firewall:
sudo ufw enable