Netsh port forwarding/Port ing tool in Windows

Source: Internet
Author: User

Netsh features

Windows comes with support for IPv4 and IPv6, and the command takes effect immediately. After the system is restarted, the configuration still exists.
Disadvantage: UDP is not supported.

Install Netsh

XP/2003 requires security first? IPV6, comes with Win7 and later systems.

Netsh interface ipv6 install

Common Commands

Add-add a configuration item in a table.
Delete-delete a configuration item from a table.
Dump-displays a configuration script.
Help-display the command list.
Reset-reset the port proxy configuration status.
Set-set configuration information.
Show-display information.

Command

Netsh interface portproxy add v4tov4-add listening items connected through IPv4 and proxy.
Netsh interface portproxy add v4tov6-add a listener project connected to IPv4 and proxy through IPv6.
Netsh interface portproxy add v6tov4-add a listener project that is connected to IPv4.
Netsh interface portproxy add v6tov6-add listeners connected to IPv6 and proxies.
Take netsh interface portproxy add v4tov4 as an example. The following is a qualified formula:

Usage

Add v4tov4 [listenport =] <integer> | <servicename>
[Connectaddress =] <IPv4 address >|< hostname>
[[Connectport =] <integer> | <servicename>]
[[Listenaddress =] <IPv4 address >|< hostname>]
[[Protocol =] tcp]
Netsh-add-1

Parameters

Tag value
Listenport-IPv4 listening port.
Connectaddress-IPv4 connection address.
Connectport-IPv4 connection port.
Listenaddress-IPv4 listening address.
Protocol-the protocol used. Only TCP
 
Description: Adds a listener that is connected through IPv4 and proxy.

 

Column

It is also based on the netsh interface portproxy add v4tov4 column

Netsh interface portproxy add v4tov4 listenport = 8080 connectaddress = 192.168.8.108 connectport = 8080

Forward data from local port 8080 to port 8080 on 192.168.8.108
 

Netsh interface portproxy add v4tov4 listenport = 8080 connectaddress = 192.168.8.108 connectport = 9090

Forward data from local port 8080 to port 9090 on 192.168.8.108
The preceding method adds port forwarding for netsh.

Show port forwarding

Generally, netsh interface portproxy show all is used for viewing. If you have many settings, the following command is suitable for you.


Netsh interface portproxy show all-show all port proxy parameters.
Netsh interface portproxy show v4tov4-displays the parameters that the IPv4 Proxy connects to another IPv4 port.
Netsh interface portproxy show v4tov6-displays the parameters for IPv4 Proxy to connect to IPv6.
Netsh interface portproxy show v6tov4-displays the IPv6 proxy parameters connected to IPv4.
Netsh interface portproxy show v6tov6-displays the parameters that the IPv6 proxy connects to another IPv6 port.
Netsh-show-1

For example, after "netsh interface portproxy show all" is used, the following figure is displayed.
Netsh-show-2
Modify port forwarding

I will not go into detail here. If you learn how to add, the following is to replace the added add with the set command to change it.
Command


Netsh interface portproxy set v4tov4-update the listening items connected through IPv4 and proxy.
Netsh interface portproxy set v4tov6-update the listener item connected to IPv4 and proxy through IPv6.
Netsh interface portproxy set v6tov4-update the listener project connected to through IPv4 IPv6 and proxy.
Netsh interface portproxy set v6tov6-update the listener item connected to IPv6 and the agent.

For example

Netsh interface portproxy set v4tov4 listenport = 8080 connectaddress = 192.168.8.108 connectport = 8090

Change the local port 8080 to the port 8090 forwarded to 192.168.8.108.
 
Delete port forwarding
Command

Netsh interface portproxy delete v4tov4-delete listening items connected through IPv4 and proxy.
Netsh interface portproxy delete v4tov6-delete the listening items that are connected to IPv4 addresses and proxies through IPv6.
Netsh interface portproxy delete v6tov4-delete a listener project that is connected to IPv6.
Netsh interface portproxy delete v6tov6-delete the listener items connected to IPv6 and the agent.
Column

Netsh interface portproxy delete v4tov4 listenport = 8080

Commands are relatively simple. Generally, servers in Hong Kong are used to forward to servers in the United States.
So this command still needs to be learned. After all, it is convenient for many settings.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.