windows下TCP数据包拦截与重定向

发布于 2024-09-14 23:11:08 字数 268 浏览 11 评论 0原文

我一直在尝试寻找一些在Windows下重定向出站TCP数据包的方法,但到目前为止还没有成功。有谁知道有什么软件/代码可以做类似的事情吗? 我什至不确定 Windows 堆栈是否可行。

我正在考虑做一些类似于 iptables 的“-j REDIRECT”的事情。

编辑:更准确地说,这里需要做的是透明地(即原始应用程序无需执行任何操作)将具有特定目标端口的传出 TCP 数据包重定向到特定 ip。(或者将它们重定向到本地端口也可以,因为我可以使用 rinetd 或任何端口转发器之类的东西)

I have been trying to find some way of redirecting outbound TCP packets under windows, but so far have not been successful. Does anyone know of any software/code bit that would do something like that?
I am not even sure it is possible with the windows stack.

I am looking at doing something similar to what "-j REDIRECT" is to iptables.

EDIT: to be more precise, what needs to be done here, is to transparently(ie without the original application having to do anything) redirect outgoing tcp packet with a certain destination port to a specific ip.(alternatively redirecting them to a local port would be fine too since I can then just use something like rinetd or any port forwarder)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梓梦 2024-09-21 23:11:08

Netsh 是一个命令行脚本实用程序,允许您在本地或远程显示或修改当前正在运行的计算机的网络配置。
netsh 接口 portproxy 添加 v4tov4 监听地址=本地地址 监听端口=本地端口 连接地址=目标地址 连接端口=目标端口

Netsh is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a computer that is currently running.
netsh interface portproxy add v4tov4 listenaddress=localaddress listenport=localport connectaddress=destaddress connectport=destport

另类 2024-09-21 23:11:08

请参阅此处的 BarbaTunnel 并使用其端口重定向

BarbaTunnel 项目

see BarbaTunnel here and use its port redirecting

BarbaTunnel project

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文