Creating and using service definitions for firewalld
Service definitions for firewalld are stored in the /usr/lib/firewalld/services
directory. Let's take a look at a simple service, such as the ssh
service stored in the ssh.xml
file, which has the following content:
<?xml version="1.0" encoding="utf-8"?> <service> <short>SSH</short> <description>Secure Shell (SSH) is a protocol for logging into and executing commands on remote machines. It provides secure encrypted communications. If you plan on accessing your machine remotely via SSH over a firewalled interface, enable this option. You need the openssh-server package installed for this option to be useful.</description> <port protocol="tcp" port="22"/> </service>
Here, we can see that we only need an XML file with three sections to describe a basic service:
short
: The short name for the service...