https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands
sudo apt install ufw
ufw enable
reboot

sudo ufw status verbose
sudo ufw status numbered
sudo ufw delete 1
sudo ufw delete 3389/tcp
sudo ufw delete allow from 203.0.113.101
sudo iptables -L -n -v | grep :53
sudp iptable -t filter -L INPUT -n -v | more

#!/usr/bin/env bash

sudo ufw --force disable \
&& sudo ufw --force reset \
&& sudo ufw default deny incoming \
&& sudo ufw default allow outgoing \
&& sudo ufw allow from 192.168.1.0/24 to any port 22 \
&& sudo ufw --force enable \
&& sudo ufw reload


# && sudo ufw allow Bind9 \
# && sudo ufw allow 53/tcp \
# && sudo ufw allow 53/udp \
# && sudo ufw allow from 192.168.2.254 to any port 53 \
# && sudo ufw allow from 192.168.2.0/24 to any port 53
# && sudo ufw allow from 192.168.2.0/24 to 192.168.2.18 port 53
# && sudo ufw allow 22/tcp \
# && sudo ufw allow 3389/tcp \
# && sudo ufw allow from 192.168.1.0/24 to any port 3389 \
# && sudo ufw allow proto tcp from 192.168.1.0/24 to any port 5432 \
