UFW (Uncomplicated Firewall) is a simple-to-use firewall utility with plenty of options for all kinds of users.
It is actually an interface for iptables, which is the classic low-level tool (and harder to get comfortable with) to set up rules for your network.
Using Firewall With UFW in Ubuntu #Linux [Beginner’s Guide]