In some ways, firewalld on systemd systems is easier to manage and configure than iptables.
Managing Firewalld and Configuring Rules
Now that we have firewalld running, we can get down to set the configuration. We can open ports, allow services, whitelist IPs for access, and more. In all of these examples, we include the –permanent flag. This is important to make sure a rule is saved even after you restart firewalld, or reboot the server. Once you’re done adding new rules, you need to reload the firewall to make the new rules active.
Add a Port for TCP or UDP
You do have to specify TCP or UDP and to open a port for both. You will need to add rules for each protocol.(more…)