The service command specifies a service in a NAT policy rule.
The undo service command removes a service from a traffic policy rule.
| Parameter | Description | Value |
|---|---|---|
| service-name | Specifies the name of a service or service group. | The service or service group must exist. A maximum of six services or service groups can be specified or deleted at a time. The value is a case-sensitive character string. The length of a name without spaces ranges from 1 to 32 characters. The length of a name with spaces ranges from 3 to 34 characters. If a name contains spaces, the name must be enclosed with quotation marks (for example, "user for test"). The name cannot contain any question marks (?), commas (,), or quotation marks ("). |
| any | Indicates any service. | - |
| all | Removes all services from the NAT policy rule. | - |
The service/service group referenced in a NAT policy can be either a predefined service or user-defined service/service group. You can use the ip service-set command to configure user-defined services/service groups. The system provides predefined services. You can run the display predefined-service command to display details on predefined services.
The NAT policies cannot reference the predefined services with dynamic ports, namely, the predefined services whose port is identified as dynamic port.
By default, no service is configured in a NAT policy rule.