The default firewall configuration tool for Ubuntu is ufw (Uncomplicated FireWall). Developed to ease iptables firewall configuration, ufw provides a user friendly way to create an IPv4 or IPv6 host-based firewall. By default UFW is disabled.
Enabling ufw is recommended at a minimum if not using other firewall tools with the command:
sudo ufw enable
By default, the policy is set to block all inbound requests. To learn more, use the command:
where the full manual page is presented.