By default, VirtualBox assigns a address to a VM attached to NAT. Is it possible to change NAT to a different network?

This is not a duplicate question. I know it is possible to define a separate "NAT network" and assign it, but that is not what I want to do. I want to change the default network for the NAT, but I see no way to do that.


The Virtualbox manual has a section describing how to adjust the default NAT interface behavior, Fine-tuning the VirtualBox NAT engine. You can alter the IP address range and submask, change the behavior of the DNS resolver, and other things.

The actual changes are made through the VBoxManage command (in other words, there's no GUI). For example, to change the IP address range for the network, you'd run something like this while the guest isn't running:

VBoxManage modifyvm "VM name" --natnet1 "192.168/16"
  • 3
    The OP asked to change it for all of VirtualBox, and not just a particular VM. modifyvm subcommand fails to meet the criteria because it only changes it for a particular VM. – jww Jun 19 '15 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.