Need to:
That from a host the guest OS, namely Ubuntu Server with webmin, and also Internet access with guest OS was available on a local area network.

Problem:
I put Ubuntu Server, initially the Internet works, but, of course, there is no network. I am trying to configure the network, changing the 1st adapter to the Virtual Host Adapter, the second to NAT. I register in /etc/network/interfaces

  # The hostonly network interface auto eth0 iface eth0 inet static address 192.168.56.101 netmask 255.255.255.0 network 192.168.56.0 broadcast 192.168.56.255 

The network seems to appear. If you register ping 192.168.56.101 on the host - everything is ok. But the Internet on the guest is already out.

How to properly set up this case, and what exactly could be the problem?

  • five
    This is exactly solved in two ways: 1. Adding host-only and nat adapters 2. Adding a bridged adapter that will force the VM to register as a full-fledged network device, although with the same MAC address you are trying to implement the first option, and obviously the VM tries to use the first adapter to send packets to the Internet, and it “ends” with the host machine (and it needs the second one). - etki
  • one
    In Windows 7, VirtualBox with ubuntu in Settings-> network-> Adapter 1 costs Network Bridge and ping 8.8.8.8 from the guest to the Internet works (the browser and all other clients, as well as the exchange between the guest and the host also work). - avp
  • @Etki, can you detail how to fix it? Change places in some places?)) @Avp, changed, does not work .. What should be in / etc / network / interfaces? - Eugene Shilin
  • @ Yevgeny Shilin, if it is rude, then yes. In general, I would not touch the interfaces file at all. I have everything on the network bridges hanging, everything is ok, maybe dhcp simply does not exist and the local computer does not issue an IP address? - etki
  • one
    As far as I remember, I did not set anything up at all. I put it out of the box a few years ago (maybe he answered some questions, but I don’t remember). And interfaces: avp @ avp-xub11: hash_misc $ cat / etc / network / interfaces auto lo iface lo inet loopback avp @ avp-xub11: hash_misc $ - avp

1 answer 1

response from comment:

This is exactly solved in two ways: 1. Adding host-only and nat adapters 2. Adding a bridged adapter that will force the VM to register as a full-fledged network device, although with the same MAC address you are trying to implement the first option, and obviously the VM tries to use the first adapter to send packets to the Internet, and it “ends” with the host machine (and it needs the second one).