This is a beginner’s guide shows you how to enable, disable, and configure firewall in Ubuntu using UFW.
Firewall is a network security system that monitors incoming and outgoing network traffic, and decides whether to allow or block specific traffic based on pre-defined security rules.
Linux Kernel has the Netfilter subsystem, which is implemented as a packet filter and firewall. Iptables (and nftables, the successor of iptables) is the user-level command line tool to configure the firewall by adding/removing netfilter rules.
Iptables (and nftables) is much more flexible but really hard for beginners. UFW (Uncomplicated Firewall), the user-friendly front-end for iptables, is which I’m going to talk about below.