Netsh commands for Interface Portproxy

Applies To: Windows Server 2008

The Netsh Interface Portproxy commands provide a command-line tool for use in administering servers that act as proxies between IPv4 and IPv6 networks and applications. You can use these commands to establish proxy service in the following ways:

  • IPv4-configured computer and application messages sent to other IPv4-configured computers and applications.

  • IPv4-configured computer and application messages sent to IPv6-configured computers and applications.

  • IPv6-configured computer and application messages sent to IPv4-configured computers and applications.

  • IPv6-configured computer and application messages sent to other IPv6-configured computers and applications.

When writing batch files or scripts using these commands, each command must be preceded by netsh interface portproxy. For example, when using the delete v4tov6 command to specify that the portproxy server delete an IPv4 port and address from the list of IPv4 addresses for which the server listens, the batch file or script must use the following syntax:

netsh interface portproxy delete v4tov6 listenport= {Integer | ServiceName} [[listenaddress=] {IPv4Address| HostName}] [[protocol=]tcp]

You can run these commands at the command prompt in a Windows ServerĀ®2008 operating system or at the command prompt for the netsh interface portproxy context. For these commands to work at the command prompt in Windows Server 2008, you must type netsh interface portproxy before typing commands and parameters as they appear in the syntax below.

For more information about Netsh, see Netsh Overviewand Enter a Netsh Context

Interface Portproxy commands

To view the command syntax, click a command:

  • add v4tov4

  • add v4tov6

  • add v6tov4

  • add v6tov6

  • delete v4tov4

  • delete v4tov6

  • delete v6tov4

  • delete v6tov6

  • reset

  • set v4tov4

  • set v4tov6

  • set v6tov4

  • set v6tov6

  • show all

  • show v4tov4

  • show v4tov6

  • show v6tov4

  • show v6tov6

For information on how to interpret netsh command syntax, see Formatting Legend.

add v4tov4

Specifies that the portproxy server listen for messages sent to a specific port and IPv4 address, and maps a port and IPv4 address to which to send the messages received after establishing a separate TCP connection.

Syntax

add v4tov4listenport= {Integer | ServiceName} [[connectaddress=] {IPv4Address | HostName}] [[connectport=] {Integer | ServiceName}] [[listenaddress=] {IPv4Address| HostName}] [[protocol=]tcp]

Parameters

  • listenport
    Required. Specifies the IPv4 port, by port number or service name, on which to listen.
  • connectaddress
    Specifies the IPv4 address to which to connect. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • connectport
    Specifies the IPv4 port, by port number or service name, to which to connect. If connectport is not specified, the default is the value of listenport on the local computer.
  • listenaddress
    Specifies the IPv4 address for which to listen. Acceptable values are IP address, computer NetBIOS name, or computer Domain Name System (DNS) name. If an address is not specified, the default is the local computer.
  • protocol
    Specifies the protocol to use. Currently, only Transmission Control Protocol (TCP) is supported.
  • /?
    Displays help at the command prompt.

add v4tov6

Specifies that the portproxy server listen for messages sent to a specific port and IPv4 address, and maps a port and IPv6 address to which to send the messages received after establishing a separate TCP connection.

Syntax

add v4tov6listenport= {Integer | ServiceName} [[connectaddress=] {IPv6Address | HostName}] [[connectport=] {Integer | ServiceName}] [[listenaddress=] {IPv4Address| HostName}] [[protocol=]tcp]

Parameters

  • listenport
    Required. Specifies the IPv4 port, by port number or service name, on which to listen.
  • connectaddress
    Specifies the IPv6 address to which to connect. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • connectport
    Specifies the IPv6 port, by port number or service name, to which to connect. If connectport is not specified, the default is the value of listenport on the local computer.
  • listenaddress
    Specifies the IPv4 address on which to listen. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • protocol
    Specifies the protocol to use. Currently only TCP is supported.
  • /?
    Displays help at the command prompt.

add v6tov4

Specifies that the portproxy server listen for messages sent to a specific port and IPv6 address, and maps a port and IPv4 address to which to send the messages received after establishing a separate TCP connection.

Syntax

add v6tov4listenport= {Integer | ServiceName} [[connectaddress=] {IPv4Address | HostName}] [[connectport=] {Integer | ServiceName}] [[listenaddress=] {IPv6Address| HostName}] [[protocol=]tcp]

Parameters

  • listenport
    Required. Specifies the IPv6 port, by port number or service name, on which to listen.
  • connectaddress
    Specifies the IPv4 address to which to connect. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • connectport
    Specifies the IPv4 port, by port number or service name, to which to connect. If connectport is not specified, the default is the value of listenport on the local computer.
  • listenaddress
    Specifies the IPv6 address on which to listen. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • protocol
    Specifies the protocol to use. Currently only TCP is supported.
  • /?
    Displays help at the command prompt.

add v6tov6

Specifies that the portproxy server listen for messages sent to a specific port and IPv6 address, and maps a port and IPv6 address to which to send the messages received after establishing a separate TCP connection.

Syntax

add v6tov6listenport= {Integer | ServiceName} [[connectaddress=] {IPv6Address | HostName}] [[connectport=] {Integer | ServiceName}] [[listenaddress=] {IPv6Address| HostName}] [[protocol=]tcp]

Parameters

  • listenport
    Required. Specifies the IPv6 port, by port number or service name, on which to listen.
  • connectaddress
    Specifies the IPv6 address to which to connect. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • connectport
    Specifies the IPv6 port, by port number or service name, to which to connect. If connectport is not specified, the default is the value of listenport on the local computer.
  • listenaddress
    Specifies the IPv6 address on which to listen. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • protocol
    Specifies the protocol to use. Currently only TCP is supported.
  • /?
    Displays help at the command prompt.

delete v4tov4

Specifies that the portproxy server delete an IPv4 address from the list of IPv4 ports and addresses for which the server listens.

Syntax

delete v4tov4listenport= {Integer | ServiceName} [[listenaddress=] {IPv4Address| HostName}] [[protocol=]tcp]

Parameters

  • listenport
    Required. Specifies the IPv4 port to delete.
  • listenaddress
    Specifies the IPv4 address to delete. If an address is not specified, the default is the local computer.
  • protocol
    Specifies the protocol to use. Currently only TCP is supported.
  • /?
    Displays help at the command prompt.

delete v4tov6

Specifies that the portproxy server delete an IPv4 port and address from the list of IPv4 addresses for which the server listens.

Syntax

delete v4tov6listenport= {Integer | ServiceName} [[listenaddress=] {IPv4Address| HostName}] [[protocol=]tcp]

Parameters

  • listenport
    Required. Specifies the IPv4 port to delete.
  • listenaddress
    Specifies the IPv4 address to delete. If an address is not specified, the default is the local computer.
  • protocol
    Specifies the protocol to use. Currently only TCP is supported.
  • /?
    Displays help at the command prompt.

delete v6tov4

Specifies that the portproxy server delete an IPv6 port and address from the list of IPv6 addresses for which the server listens.

Syntax

delete v6tov4listenport= {Integer | ServiceName} [[listenaddress=] {IPv6Address| HostName}] [[protocol=]tcp]

Parameters

  • listenport
    Required. Specifies the IPv6 port to delete.
  • listenaddress
    Specifies the IPv6 address to delete. If an address is not specified, the default is the local computer.
  • protocol
    Specifies the protocol to use. Currently only TCP is supported.
  • /?
    Displays help at the command prompt.

delete v6tov6

Specifies that the portproxy server delete an IPv6 address from the list of IPv6 addresses for which the server listens.

Syntax

delete v6tov6listenport= {Integer | ServiceName} [[listenaddress=] {IPv6Address| HostName}] [[protocol=]tcp]

Parameters

  • listenport
    Required. Specifies the IPv6 port to delete.
  • listenaddress
    Specifies the IPv6 address to delete. If an address is not specified, the default is the local computer.
  • protocol
    Specifies the protocol to use. Currently only TCP is supported.
  • /?
    Displays help at the command prompt.

reset

Resets the IPv6 configuration state.

Syntax

reset

set v4tov4

Modifies the parameter values of an existing entry on the portproxy server created with the add v4tov4 command, or adds a new entry to the list that maps port/address pairs.

Syntax

set v4tov4listenport= {Integer | ServiceName} [[connectaddress=] {IPv4Address | HostName}] [[connectport=] {Integer | ServiceName}] [listenaddress=] {IPv4Address| HostName}] [[protocol=]tcp]

Parameters

  • listenport
    Required. Specifies the IPv4 port, by port number or service name, on which to listen.
  • connectaddress
    Specifies the IPv4 address to which to connect. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • connectport
    Specifies the IPv4 port, by port number or service name, to which to connect. If connectport is not specified, the default is the value of listenport on the local computer.
  • listenaddress
    Specifies the IPv4 address for which to listen. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • protocol
    Specifies the protocol to use. Currently, only Transmission Control Protocol (TCP) is supported.
  • /?
    Displays help at the command prompt.

Remarks

  • You can change any parameter values for an existing portproxy server entry. If values are not supplied, no changes are made.

set v4tov6

Modifies the parameter values of an existing entry on the portproxy server created with the add v4tov6 command, or adds a new entry to the list that maps port/address pairs.

Syntax

set v4tov6listenport= {Integer | ServiceName} [[connectaddress=] {IPv6Address | HostName}] [[connectport=] {Integer | ServiceName}] [[listenaddress=] {IPv4Address| HostName}] [[protocol=]tcp]

Parameters

  • listenport
    Required. Specifies the IPv4 port, by port number or service name, on which to listen.
  • connectaddress
    Specifies the IPv6 address to which to connect. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • connectport
    Specifies the IPv6 port, by port number or service name, to which to connect. If connectport is not specified, the default is the value of listenport on the local computer.
  • listenaddress
    Specifies the IPv4 address on which to listen. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • protocol
    Specifies the protocol to use. Currently only TCP is supported.
  • /?
    Displays help at the command prompt.

Remarks

  • You can change any parameter values for an existing portproxy server entry. If values are not supplied, no changes are made.

set v6tov4

Modifies the parameter values of an existing entry on the portproxy server created with the add v6tov4 command, or adds a new entry to the list that maps port/address pairs.

Syntax

set v6tov4listenport= {Integer | ServiceName} [[connectaddress=] {IPv4Address | HostName}] [[connectport=] {Integer | ServiceName}] [[listenaddress=] {IPv6Address| HostName}] [[protocol=]tcp]

Parameters

  • listenport
    Required. Specifies the IPv6 port, by port number or service name, on which to listen.
  • connectaddress
    Specifies the IPv4 address to which to connect. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • connectport
    Specifies the IPv4 port, by port number or service name, to which to connect. If connectport is not specified, the default is the value of listenport on the local computer.
  • listenaddress
    Specifies the IPv6 address on which to listen. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • protocol
    Specifies the protocol to use. Currently only TCP is supported.
  • /?
    Displays help at the command prompt.

Remarks

  • You can change any parameter values for an existing portproxy server entry. If values are not supplied, no changes are made.

set v6tov6

Modifies the parameter values of an existing entry on the portproxy server created with the add v6tov6 command, or adds a new entry to the list that maps port/address pairs.

Syntax

set v6tov6listenport= {Integer | ServiceName} [[connectaddress=] {IPv6Address | HostName}] [[connectport=] {Integer | ServiceName}] [[listenaddress=] {IPv6Address| HostName}] [[protocol=]tcp]

Parameters

  • listenport
    Required. Specifies the IPv6 port, by port number or service name, on which to listen.
  • connectaddress
    Specifies the IPv6 address to which to connect. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer.
  • connectport
    Specifies the IPv6 port, by port number or service name, to which to connect. If connectport is not specified, the default is the value of listenport on the local computer.
  • listenaddress
    Specifies the IPv6 address on which to listen. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If you do not specify an address, the default is the local computer.
  • protocol
    Specifies the protocol to use. Currently only TCP is supported.
  • /?
    Displays help at the command prompt.

Remarks

  • You can change any parameter values for an existing portproxy server entry. If values are not supplied, no changes are made.

show all

Displays all portproxy parameters, including port/address pairs for v4tov4, v4tov6, v6tov4, and v6tov6.

Syntax

show all

show v4tov4

Displays v4tov4 portproxy parameters.

Syntax

show v4tov4

show v4tov6

Displays v4tov6 portproxy parameters.

Syntax

show v4tov6

show v6tov4

Displays v6tov4 portproxy parameters.

Syntax

show v6tov4

show v6tov6

Displays v6tov6 portproxy parameters.

Syntax

show v6tov6

For information on how to interpret netsh command syntax, see Formatting Legend.