LMI_FirewalldService

Class reference

Subclass of 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

Local properties

string Name

Name of the service.

uint8 IPv6DestinationPrefixLength

Optional IP network prefix. IPv6Destination must be specified if this property is set.

string[] modules

List of kernel netfilter helpers that will be used.

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.

uint8 IPv4DestinationPrefixLength

Optional IP network prefix. IPv4Destination must be specified if this property is set.

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.

string Description

Optional description of the service.

Local methods

uint32 AddPort (uint16 Port, uint16 Protocol, uint16 Mode, 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 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 InstanceID
uint64 Generation
string Caption

Inherited methods

Table Of Contents

Previous topic

LMI_FirewalldRuleComponent

Next topic

LMI_FirewalldSource

This Page