The default firewall on Ubuntu operating system is called UFW. The full form of UFW is Uncomplicated Firewall. According to the official website of Ubuntu, “ufw is not intended to provide complete firewall functionality via its command interface, but instead provides an easy way to add or remove simple rules. It is currently mainly used for host-based firewalls.” So, UFW has a user friendly way of managing IPv4 and IPv6 simple firewall rules. You can’t replace iptables with UFW. But, you can setup basic firewalls with UFW very easily.
In this article, I will show you how to open and block ports through the Ubuntu’s default firewall, UFW. Let’s get started.