How to do it...

While most of this book can be generalized to multiple distributions, firewalls are one area that can differ.

In the CentOS family of distributions, firewall-cmd is the common way to interact with firewalls.

In the Ubuntu family, ufw is used instead.

Generally, iptables should work across distributions, for the foreseeable future at least.