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 packets of a specified port number or a range of port numbers are filtered out.
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 secure networks from virus, configure the port filter function on a NAT64 service board to prevent an unwanted port from being translated to a filtered port and resulting in a packet forwarding failure.
On a centralized NAT64 network, a carrier deploys the port filter function on two network interfaces of a core router (CR) to filter out packets on destination port 1434 (Worm.NetKiller2003). When a packet from the public network side reaches the private network side, the CR checks the packet's destination port. If the port is within the filtered port range, the CR discards the packet. The port filter function may cause the CR to discard returned packets. A NAT64 service board translates a private source port into a filtered port used to forward packets from a private network to a public network. After packets are returned from the public network to the private network, the CR finds that the packets' destination port is within a range of filtered ports and unexpectedly discards the packets, which interrupts user services. To prevent such an error, configure the port filter function on a NAT64 service board so that the board can filter out the ports that the CR is configured to filter out. The NAT64 service board is prevented from translating the source port into a filtered port. This prevents returned user packets from being discarded by the CR.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 NAT64 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] nat64 instance nat1 id 11 [*HUAWEI-nat64-instance-nat1] 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