firewalld services

Each service file contains a list of ports that need to be opened for a particular service. Optionally, the service files may contain one or more destination addresses, or call in any needed modules, such as for connection tracking. For some services, all you need to do is to open just one port. Other services, such as the Samba service, require that multiple ports be opened. Either way, it's sometimes handier to remember the service name, rather than the port numbers, that goes with each service.

The services files are in the /usr/lib/firewalld/services directory. You can look at the list of them with the firewall-cmd command, just as you could do with the list of zones:

[donnie@localhost ~]$ sudo firewall-cmd --get-services ...

Get Mastering Linux Security and Hardening now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.