如何模拟不同的 NAT 行为 [英] How to simulate different NAT behaviours

查看:21
本文介绍了如何模拟不同的 NAT 行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 UDP 和 UDT 进行打孔.对于最终测试,我需要在不同的 NAT 类型(对称、全锥、受限锥、端口受限 NAT)上测试应用程序.

I am working on Holepunching using UDP and UDT. For the final testing I need to test the application on different NAT types (Symmetric,full cone,restricted cone, port restricted NATs).

有什么方法可以模拟这些吗?我在这里期望的是某种虚拟框设置.能不能把PC当成路由器,根据自己的需要进行配置?

Is there any method I can simulate these? What I expect here is some kind of virtual-Box setup. Can I use PC as a router so that I can configure according to my needs?

一般来说,我们如何针对不同的网络条件测试应用程序?

In general how do we test applications for different network conditions?

推荐答案

我想你已经回答了自己的问题,使用 VirtualBox(或 VMware、Xen 等).

I think you already answered your own question, use VirtualBox (or VMware, Xen, etc..).

我通过设置虚拟机的迷你局域网成功地完成了这件事.如果您正在寻找在 VM 中充当路由器的软件,我会从 http://www 开始.pfsense.org/ 看看是否满足您的需求.它是一个 FreeBSD 发行版,旨在成为一个易于安装的路由器/防火墙,具有漂亮的 Web 管理 UI 和所有这些.

I've done this very thing successfully by setting up mini-lans of VM's. If you're looking for software to act as your router inside a VM, I'd start off at http://www.pfsense.org/ and see if that meets your needs. It's a FreeBSD distribution tailored for being an easy to install router/firewall with a nice web management UI and all of that.

如果 pfsense 不能满足你的需求,还有很多其他的 linux/bsd 发行版是为这类东西量身定制的,你可以安装在 VM 中:http://en.wikipedia.org/wiki/List_of_router_or_firewall_distributions 以获得一个好的列表:) (我听说过关于 OpenWRT 和 ClearOS 的好消息好吧.)

If pfsense doesn't fit your needs, there are plenty of other linux/bsd distributions out there that are tailored for this kind of stuff and that you can install in a VM: http://en.wikipedia.org/wiki/List_of_router_or_firewall_distributions for a good list :) (I've heard good things about OpenWRT and ClearOS as well.)

这篇关于如何模拟不同的 NAT 行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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