From Fedora Project Wiki
This page is a draft only
It is still under construction and content may change. Do not rely on the information on this page.

Firewalld services

Firewalld service is a set of predefined firewall settings for a particular system service or program, like for example ssh or httpd. In its simplest form it might be just a combination of port and/or protocol entries. Service configuration options and generic information about services are described in firewalld.service(5). Service files are installed into /usr/lib/firewalld/services/ directory. The installed service file can be immediately used in firewalld's permanent configuration but for it to be directly usable also in runtime configuration, it is needed to reload firewalld in %post with a %firewalld_reload macro. The directory as well as the macro are part of firewalld-filesystem package.

BuildRequires: firewalld-filesystem
Requires: firewalld-filesystem
Requires(post): firewalld-filesystem

%files
%{_prefix}/lib/firewalld/services/myservice.xml

%post
%firewalld_reload