1

我想知道使 vm(我使用的是 debian/linux 机器)充当 virtualbox 中两个网络之间的路由器/转发流量的步骤是什么。我正在尝试使用一堆系统创建一个虚拟网络。我希望其中一台机器在两个子网之间路由流量。

我已经开始配置多个接口并在这些接口上添加内部网络。我不确定是否应该向我的虚拟机添加一些规则以使其像路由器一样工作并转发数据包。

4

1 回答 1

1

You can install your virtual router as if it were a metal router. The host will have network cards for each network but most likely the external network will be isolated through iptables (firestarter is an easy way to configure this). The guest will get connected to those networks as bridged adapters. The host must have a valid connection to each network (valid address or similar) just to have the adapter up an working. Note that iptables filtering for the host occurs after redirection by vbox connection, so iptables affect the host only, and the guest will have to use its own security. You can use Internal networks to generate virtualized networks to connect several hosts.

于 2013-05-22T16:44:46.357 回答