tcpproxy

This command creates a TCP Proxy that redirects an incoming TCP packet stream to a remote address.

Syntax

tcpproxy name local-address local-port destination-address destination-port timeout [priority]

no tcpproxy name

Parameters

name
The name of the configuration. The name cannot be only one or more periods. The name can contain a maximum of 128 alphanumeric characters and the following special characters: . - _
local-address
Specifies an IP address (primary or secondary) of an interface. With the local port, identifies the incoming TCP traffic stream to redirect.
local-port
Identifies a specific port on the local host. With the local host, identifies the incoming TCP traffic stream to redirect.
destination-address
Identifies the destination host. With the destination port, identifies the recipient of the redirected TCP packet stream. The value can be an IP address or hostname.
destination-port
Identifies a port on destination host, Enter a value in the range 0 - 65535. With the destination host, identifies the recipient of the redirected packet stream.
timeout
Specifies the maximum idle time that is allowed for the front-end connection and the back-end connection in seconds. After the time is reached, the idle connections are terminated. Enter a value in the range 0 - 86400. The default value is 360. The value of 0 disables the idle timer.
priority
Indicates the priority to assign for scheduling or for resource allocation. The default value is normal.
low
Receives less than normal priority.
normal
Receives normal priority.
high
Receives greater than normal priority.

Guidelines

The TCP Proxy closes the inbound TCP connection and initiates an outbound TCP connection to the destination address.

Use the no tcpproxy command to delete a TCP Proxy.

Examples

  • Create the ForwardHTTP TCP Proxy that redirects incoming traffic that is received on local interface 192.68.14.12:80 to host 10.10.20.100:80, the front-end connection and the back-end connection can stay idle for an unlimited time.
    # tcpproxy ForwardHTTP 192.168.14.12 80 10.10.20.100 80 0
    #
  • Create the TCPRelay TCP Proxy that redirects incoming traffic that is received on local interface 192.168.14.12: 6130 to port 49000 on host ragnarok, the front-end connection and the back-end connection can be idle for a maximum of 20 seconds.
    # tcpproxy TCPRelay 192.168.14.12 6130 ragnarok 49000 20
    #
  • Delete the ForwardHTTP TCP Proxy.
    # no tcpproxy ForwardHTTP
    #