windows下TCP数据包拦截与重定向
我一直在尝试寻找一些在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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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
请参阅此处的 BarbaTunnel 并使用其端口重定向
BarbaTunnel 项目
see BarbaTunnel here and use its port redirecting
BarbaTunnel project