Setting Static IP of NAT network interface in VirtualBox

As stated in the VirtualBox user manual, section 9.10.1 Configuring the address of a NAT network interface

In NAT mode, the guest network interface is assigned to the IPv4 range 10.0.x.0/24 by default where x corresponds to the instance of the NAT interface +2. So x is 2 when there is only one NAT instance active. In that case the guest is assigned to the address, the gateway is set to and the name server can be found at

This means that for Ubuntu, the /etc/network/interfaces entry for the network card settings are something as below:

iface <interface> inet static
    address <static IP> (e.g.

Also, add the following nameserver entry to /etc/resolv.conf


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.