Debian 9 on VirtualBox does not have eth0 and cannot ssh.

Asked 2 years ago, Updated 2 years ago, 92 views

I'm trying to build a network with Debian9 in VirtualBox on my Mac.

Set up your network in VirtualBox here

Adapter 1 NAT Adapter 2 Host Only Adapter vboxnet0

This is the configuration.


I'm trying to divert settings from another network. I wrote the following settings.

Enter a description of the image here

auto
iface loinet loopback

allow-hotplug eth0
auto eth0
iface eth0inet dhcp

allow-hotplug eth1
autoeth1
iface eth1 int static
address 192.168.33.15
network192.168.33.0
netmask 255.255.255.0
broadcast 192.168.33.255

In my previous environment (Kali Linux), it worked fine here.
So this time, I'll follow this
Enter a description of the image here

auto
iface loinet loopback

allow-hotplug enp0s3
auto enp0s3
iface enp0s3inet dhcp

allow-hotplug enp0s3
auto enp0s3
iface enp0s3 int static
address 192.168.33.17
network192.168.33.0
netmask 255.255.255.0

I wrote it like this.
It won't work this time.

If you look at route, you can see
Enter a description of the image here

It looks like this.
I can communicate to the network (ping 8.8.8.8 goes through), but I can't ssh from the host.
Ifconfig does not assign the configured address and looks like this:

Enter a description of the image here

Apparently, the only network interfaces are enp0s3, enp0s8 instead of eth0, eth1.

Just in case, Regarding the case where eth0 was missing when Ubuntu 16.04 LTS
I looked around here, but I couldn't solve it.Could someone please tell me the correct interfaces?

virtualbox debian

2022-09-29 22:34

1 Answers

It has been resolved.Sorry for the trouble.

#cat/etc/network/interfaces

# This file descriptions 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
iface loinet loopback

allow-hotplug enp0s3
auto enp0s3
iface enp0s3inet dhcp

allow-hotplug enp0s8
auto enp0s8
iface enp0s8inet static
address 192.168.33.17
network192.168.33.0
netmask 255.255.255.0
broadcast 192.168.33.255

The above settings resolved the issue.


2022-09-29 22:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.