The apply redirect command enables a device to redirect the traffic matching a filtering rule.
The undo apply redirect command cancels the configuration.
By default, no traffic is redirected.
Parameter | Description | Value |
---|---|---|
vpn-target vpn-target-import |
Specifies the name of a target VPN to which attack traffic is redirected. |
The value is in the format of AS number (in the range from 0 to 65535):user-defined number (in the range from 0 to 4294967295), ipv4-address:AS number (in the range from 0 to 65535), AS number (in the range from 0 to 65535).AS number (in the range from 0 to 65535):AS number (in the range from 0 to 65535), or user-defined number (in the range from 65536 to 4294967295):AS number (in the range from 0 to 65535). The AS number and user-defined number cannot both be 0s. Specifically, a VPN target cannot be 0:0 or 0.0:0. |
ip redirect-ip-rt |
Specifies a redirected IP address.
|
The value is in the format of ipv4-address:0 or ipv4-address:1. ipv4-address is in dotted decimal notation. The value 0 indicates that traffic can be forwarded only through redirection. The value 1 indicates that the original forwarded traffic is not affected and traffic is copied and then redirected. Currently, traffic can be forwarded only through redirection regardless of whether the value is in the format of ipv4-address:0 or ipv4-address:1. |
Usage Scenario
The apply redirect command is used to redirect the traffic matching a filtering rule to a specified VPN instance or next-hop IP address to protect the target device from attacks.
Prerequisites
A BGP Flow Specification route or BGP VPN Flow Specification route has been configured using the flow-route command in the system view.
Configuration Impact
If the apply redirect command is run multiple times for the same BGP Flow Specification route or BGP VPN Flow Specification route, only the latest configuration takes effect.
Precautions
The BGP IPv6 Flow Specification action does not support redirection to a next-hop IPv6 address.
If the BGP Flow Specification route received from a peer carries the redirection next hop attribute configured using the apply redirect ip command, the device can process this attribute only after the peer redirect ip command is run.<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpna [*HUAWEI-vpn-instance-vpna] quit [*HUAWEI] flow-route Rule1 vpn-instance vpna [*HUAWEI-flow-route-vpna] if-match port equal 24 [*HUAWEI-flow-route-vpna] apply redirect vpn-target 4:4