Windows中的端口转发 [英] port forwarding in windows

查看:369
本文介绍了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

主要的一个具有Internet连接,第二个连接到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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆