sudo apt update
sudo apt upgrade
sudo apt install ufw
sudo ufw enable To Enable Firewall
sudo ufw disable To Disable Firewall
sudo ufw allow 22 To Allow Port 22 Access
sudo ufw deny 22 To Deny Port 22
sudo ufw status Check Settings For Firewall
The Following Video Shows How To Install UFW And More