Netsh Port Forwarding in Windows
来源:互联网 发布:php 工程师应聘 编辑:程序博客网 时间:2024/05/21 17:14
In Microsoft Windows, starting from Windows XP, there is a built-in ability to set up network ports forwarding (port forwarding). Due to it, any connection coming to any port can be forwarded to another local port or even to port on remote computer. Not necessarily that the system has a service listens on this port.
Port forwarding in Windows can be configured using Portproxy mode of the command Netsh. The syntax of this command is as follows:
where
- listenaddress is a local ip address waiting for a connection
- listenport listening port (the connection is waited on it)
- connectaddress is an IP address or DNS name to which the connection will be forwarded
- connectport is a TCP port to which the connection from listenport is forwarded to
Suppose, that our task is to make the RDP service to respond on a non-standard port, for example 3340 (the port can be changed in the settings of the service, but we will use RDP to make it easier to demonstrate forwarding).
Start the command prompt as an administrator and perform the following command:
Using netstat make sure that port 3340 is listened now
You can find out what process is listening to this port use its PID (in our example, the PID is 336):
Let’s try to connect to this computer from a remote system using any RDP client. Port 3340 should be specified as the RDP port. (It is specified after the column following the RDP server address):
The connection should be established successful.
Display the list of forwarding rules in the system:
In our case there is only one forwarding rule from port 3340 to 3389:
To remove a forwarding rule:
To clear all current forwarding rules:
If you wont to forward an incoming TCP connection to another computer, the command can look like this:
This rule forwards all incoming RDP requests to the IP address 192.168.100.101
Another portproxy feature is an opportunity to make it look like any remote network service is operating locally.
For example, forward the connection from the local port 5555 to the remote address 157.166.226.25 (CNN website):
Now if you go to http://localhost:5555/ in your browser, CNN Start page will open. So despite the browser addresses the local computer, it opens a remote page.
Port forwarding can also be used to forward a port from an external address of a network card to a virtual machine port running on the same computer.
- Netsh Port Forwarding in Windows
- VirtualBox NAT Port Forwarding Settings(Windows XP)
- Windows 2008 端口代理 转发 Port forwarding
- port forwarding
- Port Forwarding & Port Triggering
- Port Forwarding & Port Triggering
- port forwarding in yosemite, a way to replace ipfw
- (port forwarding )Windows 2008之端口代理转发
- NAT&Port Forwarding&Port Triggering
- SSH Port Forwarding
- What is Port Forwarding?
- ssh port forwarding
- What is Port-Forwarding ?
- iptables remote port forwarding
- ssh端口转发(port forwarding)
- Configure port forwarding with NAT
- Tools - rinetd - port forwarding/redirection
- 使用port forwarding 连接 TimesTen
- 设置AFNetworking网络请求的超时时间
- 黑马程序员——Eclipse快捷键
- [leetcode]Gray Code
- c进程读取按键输入,通过socket传输给qt,qt按键线程接收到后,提交到Qt的事件处理系统中
- hiho 第六周
- Netsh Port Forwarding in Windows
- Spark MLlib Logistic Regression逻辑回归算法
- 静态链表
- strtok和strtok_r
- case与decode的区别
- 小红椒带你玩转网络营销
- 微博营销与微信营销不存在竞争
- 趣文:编程语言拟人化(第一弹)
- 编译前的一些设置