0

I'm new to linux and am running a fresh install of Kali Linux on hyper-v and am having issues with connecting to the internet via my ethernet cable, which appears when I run ifconfig. I am confused on how I was able to install Kali Linux, but not that I have it running, the internet won't connect.

enter image description here


Things I have done to try and resolve:

  • Updated /etc/resolv.conf to "nameserver 8.8.8.8", as it was a symbolic link beforehand.
  • Changed my /etc/NetworkManager/NetworkManager.conf settings so managed is set to true.
  • Ran ifconfig to check if my network is being picked up at all (it is). enter image description here
  • Ran sudo apt update and tried reinstalling the resolvconf service. It failed because I can't access the internet to install it. enter image description here enter image description here
  • Reinstalled Kali Linux, and tried installing ParrotOS. Both times the same issue with resolvconf occured.

I have come across a few key errors which may be of importance:

  • Your network may not be using DHCP
  • Temporary failure in name resolution enter image description here
  • resolvconf service does not exist
  • package 'resolvconf' has no installation candidate (from when I try to install resolvconf)
1
  • Please configure a connection with DHCP to get an IP address. You can do so via the graphical network manager Feb 16, 2022 at 16:36

2 Answers 2

0

The output from ifconfig does not show an IP address assigned to your eth0 adapter. Typically the IP address is automatically assigned by a service called DHCP. This service is typically ran on your router (assuming you are in a small home network). With your given information I would assume there is something wrong with you physical network connection (e.g. try other cable).

But if this is all correct and you do not have DHCP in your network you can assign an IP address to your eth0 adapter with following command:

ip addr add 192.168.178.5/24 dev eth0

The IP above is a typical address for home netwworks (there is a few IP ranges reserved for this purpose). Make sure you change it to match to your network.

2
  • Thanks so much for taking the time to answer! I still need a little help though. I am using a vm for this and have assigned an ipv4 address, subnet mask, and default gateway for my network. I have tried assigning the address using the snippet you sent and there was no error, but it did not fix the problem either. I'm happy to know the root of my problem now though!
    – oparry
    Feb 16, 2022 at 17:00
  • Which VM do you use, e.g. VWware, VirtualBox, QEMU? In general you do have a few options on how to connect your VM to your host and the network in general. The simplest approach is to have your VM guest being added to your host network. E.g. on VMware this is called 'bridged networking'. Following article gives you some insight to the different modes: docs.vmware.com/en/VMware-Workstation-Pro/16.0/… That setting would provide your VM access to the DHCP of your physical LAN which is probably the step you are missing.
    – mutoroglin
    Feb 17, 2022 at 8:08
0

It turns out to be an issue with my hyper-v network configuration. If anyone else has this issue, they can fix it by creating a new network switch inside the hyper-v settings. The new switch should be set to external, and be assigned to the ethernet you are trying to use. Once this was done I reinstalled Kali Linux and to my amazement the problem was solved!

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Mar 3, 2022 at 5:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .