Firewall Services, Ports Aliases. |
modules/SuSEFirewallServices.ycp |
| Definition of Supported Firewall Services and Port Aliases. | |
|
|
|
This module has an unstable interface. |
Global Definition of Firewall Services
Defined using TCP, UDP and RPC ports and IP protocols and Broadcast UDP
ports. Results are cached, so repeating requests are answered faster.
Imports
StructuresGlobal Functions
Local Variables |
Format of SERVICES
"service-id" : $[
"name" : _("Service Name"),
"tcp_ports" : list
These definitions will be removed and replaced by definitions in packages. FATE #300687: Ports for SuSEfirewall added via packages.
Returns whether the service ID is defined by package.
- Parameters:
-
service
- Example
-
ServiceDefinedByPackage ("http-server") -> false ServiceDefinedByPackage ("service:http-server") -> true
Creates a file name from service name defined by package. Service MUST be defined by package, otherwise it returns 'nil'.
- Parameters:
-
service
- Return value:
-
file name (e.g., 'abc')
- Example
-
GetFilenameFromServiceDefinedByPackage ("service:abc") -> "abc" GetFilenameFromServiceDefinedByPackage ("abc") -> nil
Reads definition of services that can be used in FW_CONFIGURATIONS_[EXT|INT|DMZ] in SuSEfirewall2.
Function returns if the service_id is a known (defined) service
- Parameters:
-
service_id
- Return value:
-
if is known (defined)
Function returns the map of supported (known) services.
$[
"dns-server" : "DNS Server",
"vnc" : "Remote Administration",
]
- Return value:
-
$[service_id : localized_service_name]
Returns list of service-ids defined by packages.
- Return value:
-
service ids
Function returns needed TCP ports for service
- Parameters:
-
service
- Return value:
-
[string] of needed TCP ports
Function returns needed UDP ports for service
- Parameters:
-
service
- Return value:
-
[string] of needed UDP ports
Function returns needed RPC ports for service
- Parameters:
-
service
- Return value:
-
[string] of needed RPC ports
Function returns needed IP protocols for service
- Parameters:
-
service
- Return value:
-
[string] of needed IP protocols
Sets that configuration was modified
Sets that configuration was not modified
Returns whether configuration was modified
- Return value:
-
modified
Function returns needed ports allowing broadcast
- Parameters:
-
service
- Return value:
-
[string] of needed broadcast ports
Function returns needed ports and protocols for service. Function cares about if the service is defined or not.
- Parameters:
-
service
- Return value:
-
of needed ports and protocols
- Example
-
GetNeededPortsAndProtocols ("service:aaa") -> $[ "tcp_ports" : [ "122", "ftp-data" ], "udp_ports" : [ "427" ], "rpc_ports" : [ "portmap", "ypbind" ], "ip_protocols" : [], "broadcast_ports" : [ "427" ], ];
Immediately writes the configuration of service defined by package to the service definition file. Service must be defined by package, this function doesn't work for hard-coded services (SuSEFirewallServices).
- Parameters:
-
service store_definition
- Example
-
SetNeededPortsAndProtocols ( "service:something", $[ "tcp_ports" : [ "22", "ftp-data", "400:420" ], "udp_ports" : [ ], "rpc_ports" : [ "portmap", "ypbind" ], "ip_protocols" : [ "esp" ], "broadcast_ports" : [ ], ] );
Function returns list of possibly conflicting services. Conflicting services are for instance nis-client and nis-server.
- Return value:
-
of conflicting services