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

查看:135
本文介绍了如何模拟不同的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中:

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天全站免登陆