Netsh for the first time with this command

Source: Internet
Author: User

Reproduced from

The goal is WIN7 X64, and opened the firewall, want to use his machine to access other machines, and do not want to login his system, the general method is generally upload a htran, and then forwarded, but the other side has to kill soft, there is the possibility of being killed, so I use another way to achieve my purpose.

For convenience, first shut down his firewall.

netsh  advfirewall set allprofiles state off

(Win2003&xp is closed with Netsh firewall set opmode DISABLE)

You can also release listenport, the specific order to check the information yourself. Then use the netsh interface portproxy to forward to the target server, but there is a small flaw, the port can be seen in the system, after all, is R3 layer of things, not like the iptables of Linux, so must choose a confusing port.

After the operation is complete, restore the firewall netsh advfirewall set allprofiles state to on. Then retreat.

regarding netsh forwarding, please refer to the following content : Windows lower port forwarding.

Add to:

netsh interface portproxy add v4tov4 listenport= port listenaddress= native IP connectport= target port connectaddress= target IP

Example:

netsh interface portproxy add v4tov4 8002 202.112.58.200 8002//Local all IP turn target IP8002

netsh interface portproxy add v4tov4 listenport=5200 listenaddress=1.1.1.1 connectport=3389 connectaddress=2.2.2.2// Specifies IP rotation.

xp/2003 need to install IPV6 first.

netsh interface ipv6 install

Delete:

netsh interface portproxy delete v4tov4 listenport= port listenaddress= native IP

To configure IP routing rotation:

netsh interface ipv4 set int forwarding=enabled

26 is a network interface number that can be viewed with the netsh interface IPv4 show interfaces.

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.