Uncomplicated Firewall (ufw) — The Uncomplicated Firewall (ufw, and gufw - a Graphical User Interface version of the same) is a frontend for iptables and is particularly well-suited for host-based firewalls. Ufw provides a framework for managing netfilter, as well as a command-line interface for manipulating the firewall.
Install
apt install ufw
My Configuration
ufw enable
ufw default deny incoming
ufw default allow outgoing
ufw status verbose
Add rules
ufw allow ssh
ufw app list
ufw allow 1000:2000/tcp
ufw allow 1000:2000/udp
Deletng rules
ufw delete allow ssh
ufw status numbered
ufw delete 2