setting up virtual box to SNAT/DNAT

Dave Cramer davec-zxk95TxsVYDyHADnj0MGvQC/G2K4zDHf at public.gmane.org
Thu Jan 14 18:03:01 UTC 2010


On Wed, Jan 13, 2010 at 5:06 PM, E K <ekg_ab-FFYn/CNdgSA at public.gmane.org> wrote:
> Hi Dave,
>
> If you setup NAT networking I don't think you can access the virtual machine because the masquerading rule is set by VirtualBox and I don't know how or where it does that. Your iptable rule applies to the host network and not the virtual network.

Yes, this can be done easily, but my end goal is asterisk which needs
a large set of ip's natted. So vbox NAT is not a good solution
>
> You can bridge the virtual network card with the host network card but that got to be done when the host machine boots after the network interfaces are up. You first need to install the bridging utilities. In that case you don't need DNAT/SNAT as the virtual machine will be on the host network with its own ip address.

Yes, this is the easiest, however I don't want to use another ip
address, it's at my ISP's facility

>
> You can google to find which packages you need to install for network bridging (something like tun and bridge-utils on Ubuntu) as well as the configuration for VirtualBox.

I did get it to work using HostOnlyIf, as long as you use the supplied
vboxnet0 interface it all works great.


Thanks,

Dave
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list