The Linux kernel in Ubuntu provides a packet filtering system called netfilter, and the traditional interface for manipulating netfilter are the iptables suite of commands. The Uncomplicated Firewall (ufw) is a frontend for iptables and is particularly well-suited for host-based firewalls.
Allowing port from any
$ sudo ufw allow 122/tcp
Listing the app and app infor
$ sudo ufw app list
$ ufw app info Squid
UFW status
$sudo ufw status verbose
Aollowing the port in the IP
$ sudo ufw allow from 192.168.3.231 to any port 443