windows下的端口转发 [英] port forwarding in windows
问题描述
我的电脑里有两个网卡:
I have two network board in my pc:
主要的有本地ip -> 192.168.1.111次要的具有本地 ip -> 192.168.0.200
The main one has the local ip -> 192.168.1.111 The secondary ones has the local ip -> 192.168.0.200
主要的有互联网连接,第二个连接到IP为192.168.0.33的设备,它在端口80有一个http服务器.
The main one has internet connection and the second one is connected to a device with the IP 192.168.0.33, it has a http server in port 80.
我在主连接(端口 4422)中有一个 apache 服务器,我可以从任何地方访问,我现在想要的是当我检测到来自 4422 的连接时,我想将此连接重定向到 192.168.2.33:80
I have an apache-server in the main connection (port 4422), and I can access from anywhere, what I want now is when I detect a connection from 4422 i want to redirect this connection to 192.168.2.33:80
我怎样才能用 Windows 做到这一点?
How can I do this with windows?
推荐答案
我已经解决了,可以执行了:
I've solved it, it can be done executing:
netsh interface portproxy add v4tov4 listenport=4422 listenaddress=192.168.1.111 connectport=80 connectaddress=192.168.0.33
要删除转发:
netsh interface portproxy delete v4tov4 listenport=4422 listenaddress=192.168.1.111
这篇关于windows下的端口转发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!