For beginners, I recommend ufw (which is not only available for Ubuntu but for other systems as well):
https://wiki.ubuntu.com/UncomplicatedFir...tuFirewall
It's basically a more user-friendly console frontend to iptables/nftables.
There is also a graphical front-end available:
https://help.ubuntu.com/community/Gufw
https://wiki.ubuntu.com/UncomplicatedFir...tuFirewall
It's basically a more user-friendly console frontend to iptables/nftables.
There is also a graphical front-end available:
https://help.ubuntu.com/community/Gufw