Virtualbox debian нет интернета

Virtualbox debian нет интернета

This is an unofficial support community for Oracle VM VirtualBox, https://www.virtualbox.org/, which allows you to create virtual machines to install other operating systems on. We are NOT Oracle employees. Any advice you follow here is at your own risk. Please follow the posting rules, or your post will be removed!

i have issues getting a network connection in a debian vm, which previously worked just fine!

Arch-Linux with Kernel 5.6.15, freshly rebooted

Its a debian 10 vm with 2 cores, 4GB of RAM. No guest additions. I created three network interfaces. One bridged from my wifi-chip, one bridged from the LAN-chip and one NAT, so that i just have internet, no matter what.

It worked just fine. I got an IP on every Interface, which was connected on my notebook. I changed nothing intentionally which could cause a problem, as far as my knowledge goes.

Then from on point on, it stopped working. If i type ‘ip a’ in the terminal, the interface bridged to wifi has a ipv6 fe80 address, and thats it. I can’t ping any ip, any domain, nothing.

I then exported the vm to my Windows 10 PC and switched the bridged interface to the PCs network card, it works just fine!

Then i created a new ubuntu-vm on my notebook, with the exact same network configuration. It works just fine!

I don’t know what to check next. The vm works on annother PC and annother vm with the same network configuration works fine on my notebook. I rebooted everything.

Does somebody have an idea, what i can try?

I tried an ubuntu/vm, one new debian-vms and three old k3os-vms, all with the same network config in virtualbox. All work, they get an ip and have internet/local network connection. But this one debian vm does not get an ip. I am clueless.

I have the solution, but no clue why it worked. I just had to «remove» all network adapters via virtualbox-gui. I removed all checkboxes, saved the settings, reopened it and created the same settings i had again. Then it just worked. I have no idea why, but i hope it will help somebody in the future.

Источник

How do I enable the Internet on VirtualBox?

When we create a new Virtual machine in VirtualBox and install any Operating system in that machine, it is often faced that the internet is not working or not connected. There can be multiple reasons if the internet is not working on the Virtual machine in the VirtualBox. This post will help you and provide you a step-by-step guide on fixing or enabling the internet connection in a virtual machine of VirtualBox.

Читайте также:  Соединение общей сети с интернетом

Step 1: Ensure the internet connection
First, ensure that the wired network connection is already turned on by going to the network tab in the settings.

If the highlighted toggle button in the screenshot attached is OFF, then turn it ON and establish the internet connection.

Step 2: Turn OFF the Virtual Machine
If you still do not have the internet connection established, you need to change the machine’s network adapter settings from the Virtual machine settings.

For changing the network settings and for the modifications to take effect, turn off the virtual machine.

Step 3: Open network settings of Virtual Machine
After closing the Virtual Machine, open the virtual machine settings by right-clicking on the machine and selecting the settings option from the context menu.

In the settings window that appeared, click on the Network tab from the left bar.

Step 4: Enable the Network Adapter
In the machine’s Network Adapter settings, click on the “Enable Network Adapter” to enable the network adapter and modify its settings.

If it is unchecked, then definitely this was the reason behind the internet connection not working because there was no network adapter assigned to the Virtual machine by the VirtualBox.

Step 5: Select the Network Device
After enabling the network adapter for the virtual machine, you can select the preferred method from the “attached to” dropdown menu to attach the virtual network adapter to your host OS network.

We will suggest selecting the Bridged Adapter because this way, the virtual machine will be connected to the network using the host OS Ethernet adapter.

After selecting the appropriate method from the “Name” drop-down, select the right device that you want to choose.

Step 6: Save Settings and start the Virtual Machine
After configuring all the described settings, click on the OK button to save the settings.

And start the machine by double-clicking on the machine.

You will have the internet connection working perfectly fine on your virtual machine in the virtual box.

Conclusion

This post provides a step-by-step and easy-to-understand guide on how to enable the internet on VirtualBox. This post provides a step-by-step troubleshooting guide on configuring the network adapter settings of any machine in the VirtualBox. Using the method provided in this post, you can fix and enable any machine’s internet on VirtualBox.

Читайте также:  Мтс домашний интернет ошибка аутентификации

About the author

Shehroz Azam

A Javascript Developer & Linux enthusiast with 4 years of industrial experience and proven know-how to combine creative and usability viewpoints resulting in world-class web applications. I have experience working with Vue, React & Node.js & currently working on article writing and video creation.

Источник

Debian guest on VirtualBox with bridged adapter has no internet access

I have setup a Debian guest and I am messing around with it to learn more about VirtualBox, Debian, and later after that is done I’ll be messing around with a NodeJS server on it. After a while I noticed I couldn’t do some things with it when I had a Bridged adapter setup for the VM. NPM would not install packages because it timed out. I tried running «w3m google.com» and even looked up google.com’s ip to check for a DNS issue. No matter what, I cannot connect to any form of internet. But I can ping anything just fine. I can ping google, npmjs.org, etc. Thanks for the assistance. Update: I have been working on this more today, Newer router, asus, I read that people were having issues with belkin routers with bridged adapters so I switched, the asus is new anyways. The host is connected via ethernet wire. The VM shows up on the router just fine, And I connect to that device with the IP given by the router just fine. but I still cannot connect to google.com or anything.

2 Answers 2

This is too long to explain in a comment. Below is how the bridged adapter works.

Yet, if you can ping from the guest debian that means some form of DHCP happened and you must have and IP (which is a different IP from the host machine). I’d check router configuration to see if you’re not allowing/disallowing specific MACs and/or IPs from the usage of TCP/UDP protocols (that is a measure some people use on their routers).

Bridged adapter

A bridged adapter on VirtualBox simulates as if there was a bridge (well it is easier to think of this as a hub) on the cable connection to your (host) actual machine. Even if the connection is over wireless the simulation is similar.

For (almost) all purposes the guest (debian) and the router the host machine is connected to are connected directly. Have separate MAC, separate IP, they even give separate ARP requests.

router host machine running VirtualBox ^ | +-----> guest machine running Debian 

This is done by sending packets with a different hardware address (you can configure the hardware address in the adapter).

Читайте также:  Где можно оплатить домашний интернет мтс

You need to configure the guest system (Debian) to connect to the network as if it was a separate machine. For example, if you use a WPA connection from the host machine you need to configure WPA (including the username and password) in the guest machine.

Yes that is correct, I’m aware of how the Bridged adapter works. The pc host is wired, I’ve tried several things today, I will be updating the question to reflect what I have tried.

For now, i’m betting on a DNS issue (maybe caused by strange DHCP interaction). Since you do not have internet repositories installing dnsutils might not be possible. Instead a good way to check if DNS resolution is happening alright is a simple wget -v google.com , in normal conditions it shall first resolve DNS (over UDP) and then download a index.html (over TCP). If you could give the output of that it would be most helpful.

I am not an expert, but after some research I could solve a similar problem. I have a Mac hosting a Debian server. I used Bridged Adapter on interface en0 in my Mac.

1) My Mac is running on 192.168.10.101. I know that because I run the command:

and the interface en0 shows that IP

en0: flags=8863 mtu 1500 ether 6c:40:08:98:72:4c inet6 fe80::6e40:8ff:fe98:724c%en0 prefixlen 64 scopeid 0x4 inet 192.168.10.101 netmask 0xffffff00 broadcast 192.168.10.255 

2) Running netstat command at my Mac:

netstat -nr Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.10.1 UGSc 296 142 en0 

I see that the Mac Gateway is on 192.168.10.1

3) Mac and Debian must be in the same segment as the Gateway, I mean 192.168.10.xxx. So I decided that my Debian must run on the static IP 192.168.10.115.

I edited /etc/network/interfaces file at my Debian server to look this way:

# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.10.115 netmask 255.255.255.0 gateway 192.168.10.1 dns-nameservers 8.8.8.8 192.168.10.1 

Then I did ping from my Mac and ping from my Debian and they answered Ok. I also have access to internet from Debian, because I have the same Default Gateway as my Mac.

root@debian64:/home/myuser# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default TEW-711BR 0.0.0.0 UG 0 0 0 eth0 link-local * 255.255.0.0 U 1000 0 0 eth0 

I hope it helps and if anybody have better explanations I would like to learn.

Источник

Оцените статью
Adblock
detector