.. _LMI-FirewalldService: LMI_FirewalldService -------------------- Class reference =============== Subclass of :ref:`LMI_FirewalldRule ` LMI_FirewalldService represents known service. Apart from properties defined in this class, Service also can have FirewalldPorts associated via LMI_FirewalldRuleComponent association. Firewalld service makes it easier to enable and disable access to a service. Key properties ^^^^^^^^^^^^^^ | :ref:`InstanceID ` Local properties ^^^^^^^^^^^^^^^^ .. _LMI-FirewalldService-Name: ``string`` **Name** Name of the service. .. _LMI-FirewalldService-IPv6DestinationPrefixLength: ``uint8`` **IPv6DestinationPrefixLength** Optional IP network prefix. IPv6Destination must be specified if this property is set. .. _LMI-FirewalldService-modules: ``string[]`` **modules** List of kernel netfilter helpers that will be used. .. _LMI-FirewalldService-IPv6Destination: ``string`` **IPv6Destination** Optional destination network IP address (with prefix possibly specified in the IPv6DestinationPrefixLength property) or plain IP address. The use of hostnames is not recommended, because these will only be resolved at service activation and transmitted to the kernel. .. _LMI-FirewalldService-IPv4DestinationPrefixLength: ``uint8`` **IPv4DestinationPrefixLength** Optional IP network prefix. IPv4Destination must be specified if this property is set. .. _LMI-FirewalldService-IPv4Destination: ``string`` **IPv4Destination** Optional destination network IP address (with prefix possibly specified in the IPv4DestinationPrefixLength property) or plain IP address. The use of hostnames is not recommended, because these will only be resolved at service activation and transmitted to the kernel. .. _LMI-FirewalldService-Description: ``string`` **Description** Optional description of the service. Local methods ^^^^^^^^^^^^^ .. _LMI-FirewalldService-AddPort: ``uint32`` **AddPort** (``uint16`` Port, ``uint16`` Protocol, ``uint16`` Mode, :ref:`LMI_FirewalldPort ` FirewalldPort) Add port (or port range to the service configuration. Range of ports can be allowed by setting PortRangeEnd property of LMI_FirewalldPort instance returned from this method. **Parameters** *IN* ``uint16`` **Port** Port to be allowed in given zone *IN* ``uint16`` **Protocol** Allow traffic using given protocol ======== ====== ValueMap Values ======== ====== 1 TCP 2 UDP ======== ====== *IN* ``uint16`` **Mode** Mode parameter determines whether the port will be enabled in current runtime configuration only or if it will be applied after all future reboots (or reconfigurations) or both. ======== ========= ValueMap Values ======== ========= 0 Current 1 Permanent 2 Both ======== ========= *OUT* :ref:`LMI_FirewalldPort ` **FirewalldPort** Instance of LMI_FirewalldPort class that represents that given port (or range of ports) is allowed in the given zone. Inherited properties ^^^^^^^^^^^^^^^^^^^^ | ``string`` :ref:`ElementName ` | ``string`` :ref:`InstanceID ` | ``uint64`` :ref:`Generation ` | ``string`` :ref:`Caption ` | ``string`` :ref:`ConfigurationName ` | ``uint16`` :ref:`ChangeableType ` Inherited methods ^^^^^^^^^^^^^^^^^ | :ref:`AddRuleComponent `