The exclude-port command enables a device to filter out packets with a specified port number or a specified range of port numbers.
The undo exclude-port command disables a device from filtering out packets with a specified port number or a specified range of port numbers.
By default, no any port or port range is filtered.
This command is supported only on the NetEngine 8000 F1A.
Parameter | Description | Value |
---|---|---|
port |
Specifies the number of a single port, a start port. The start port number must be less than the end port number. |
The value is an integer ranging from 1 to 65535. |
to port |
Specifies the number of an end port. The start port number must be less than the end port number. |
The value is an integer ranging from 1 to 65535. |
all |
Deletes all filtered port numbers. |
- |
Usage Scenario
To maintain network security and prevent virus invasion, deploy the port filtering function for NAT services. The function prevents a port from being converted into a filtered port after NAT.
Configuration Impact
If the exclude-port command is run more than once, all configurations take effect. After the exclude-port command is run, the filtered ports in the NAT instance view are displayed in ascending order, and consecutive ports are displayed after combination. For example, the exclude-port 1 2 3 4 5 command is combined into exclude-port 1 to 5.
Precautions
<HUAWEI> system-view [~HUAWEI] nat instance cpe1 id 1 [*HUAWEI-nat-instance-cpe1] exclude-port 1 2 3 4 to 10 Warning: Excluded ports cannot be used by sessions, and the total number of available ports in a NAT pool will decrease. Continue? [Y/N]: Y