Kali Activation Of Network Connection Failed

1 view
Skip to first unread message

Etta Lesniak

unread,
Aug 3, 2024, 5:13:33 PM8/3/24
to hepittlynchsoft

I just put a Kali Linux VM on VMware Workstation Pro 15, but it keeps giving me the error: Connection Failed: Activation of network connection failed. In the VM's network adapter is set to NAT right now but I have also tried bridged. It seems to not be getting dhcp but I am not sure how to fix that.

Under Vmware settings for that particular VM. Add an additional network adapter. Once the VM updates, it should show a connection. If it doesn't, add a new connection profile in "Wired Settings". Once it's connected, you can remove the adapter that isn't working.

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

Recently I installed WSL Ubuntu 18.04 on my Windows machine, but nothing seems to work properly, because I have no internet access.
I tried a few commands and sudo apt update says 'Connection failed' and ping google.com literally takes forever as you can see in this screenshot:


I also checked nano /etc/resolv.conf and made sure that the nameservers are right, completely disabled Kaspersky and its firewall, disabled Hyper-V, reinstalled WSL a few times and even disabled Windows Defender. Nothing helped.

So do you have any ideas what the issue could be here?

For me this issue arise when I switch from one network to another. Lets say for example I was working at office wifi and then I went home and start using home wifi. The above answer worked for me. It seems like this is an actual isse, so till Windows comes up with a solution I had to find an easier way to do it every time. I copied the commands and created a bat file, kept it on desktop. So, everytime I switch the wifi connection/network I run the bat file as administrator and restart the system. I hope this helps to someone who is trying to figure out why it is happening and how to know an easy way to fix it,(not a permanent) one though.

In my case if not on VPN, the internet on my WSL works. When I connect to VPN it suddenly stops working.There is a relevant discussion (still open the day I'm posting) on internet loss on WSL while on VPN here.

The drawback of this solution (as for the previous ones) is that you need to do it at every new launch of your WSL.To make it a bit easier one can create a short .sh script to automate it.On your WSL:

Then installed Ubuntu 18.04 LTS with WSL2 and ran into exactly the same problem - no internet. All I really want to be able to do is build some docker images to test, on my work laptop, so WSL2 with no internet was a total no go for me.

The fix is to set the DNS of your Ethernet/WiFi adapter to your preferred choice. WSL uses the DNS of your host machine. commands like wget were working for me, however the commands like apt update didn't seem to work - basically it couldn't resolve the ubuntu archive URL.

Here is the image for adapter properties of the host machine where the DNS is provided manually. If you choose the automatic DNS option for the host, some things might not work on the DNS provided by your ISP.

It is recommended to use OpenDNS, Google DNS or CloudFlare DNS since these are quite fast and reliable. Use DNSBenchmark to find the fastest one for your connection. I would like to highlight that it is strictly your choice.

Okay, I know this thread hasn't had much activity in a while. I spent DAYS trying to fix this on a work laptop, because the corporate setup doesn't allow an 8.8.8.8 (Google DNS) address, not only did I have to edit the WSL2 /etc/wsl.conf

I also had to write a PowerShell script to write from Windows into the WSL2 folder the actual DNS server address. I don't know if it's because of how locked down my work PC is or what, but I can only use the DNS server my Windows machine uses, and WSL2 always pulls its own IP address to populate the resolv.conf file, which has no DNS server.

Anyone else suffering through this issue, here's how I fixed it. Save this off as whatever you want (in my case, debian.ps1, run from a Admin PowerShell prompt ./debian.ps1), I am using an imported customized Debian Buster WSL2 distro set as default; if you're using something else not set as default, you'll have to change the last line (wsl.exe) to launch the correct distribution:

Note if your distribution isn't under \wsl$\debian\ you'll need to change it to where it actually resides. I know this is not pretty, and pulls from many different solutions posted all over the internet, but it's the only one that works with my corporate administered PC and group policies. Hope this saves someone a lot of hassle on a company administered PC. Note if you're connecting via VPN I don't think this will work - I also haven't tested in the office with Coronavirus, it's running on home WiFi. There may be some adjustments needed if you're on a company network directly.

This happenned to me when I was trying to install MySQL-Server on WSL2 and messed up with ssh@local host trying to access root on Ubuntu.
The system itself got really weird (Sometimes I wish there were alternatives for Ubuntu) so I tried restarting the vEthernet(WSL) adapter and rebooting the computer, and it was back working again.

Before installing routersploit on my zorin os, my wifi connection was connecting with home network. However when starting routersploit, suddenly the wifi I was connected to says "Activation of Network Connection Failed". After this incident I've been unable to connect to my wifi.

Footnote: I know I do not provided much info, but it is all I got. If you need any additional information to debug this case, please add it on the comments and I will dump the terminal output right away.

Apparently the .crt file with the certificate was inside a folder with spaces in the name, and that was causing the error. The moment I removed the spaces from the path to the file, it worked on the first try.

Expanding on Enrique's answer: after consulting var/log/syslog I discovered that problem was that I'd configured serveral bluetooth devices ... none of which were available. The "network connection failed" message was triggered every time network manager attempted to connect to one of these devices.

So yesterday suddenly my laptop doesn't connect to any wifi connection anymore , i keep trying to connect to my home wifi connection but it keeps giving me the same message , connection failed : Activation of network connection failed . tried opening Hotspot from my phone to give it internet ( totally another wifi connection from a diffrent internet provider) but it sends the same messages, noting that my android and everyone's phone in my house connects just fine to the home wifi .. what can i do to solve this please

Also noting that i tried this link because i've seen someone answer this to a question similar to mine on this forum ( it didn't work) and i also tried to install --reinstall comand of network manger , it told me : temporary failure resolving 'eg.archive.ubuntu.com'
E: Failed to fetch -manager/network-manager_1.22.10-1ubuntu2.3_amd64.deb Temporary failure resolving 'eg.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

But when i ran the command sudo apt-get install network-manager , it said network-manager is already the newest version (1.22.10-1ubuntu2.3) network-manager set to manually installed. 0 newly installed and 37 not upgraded ..

I tried but it didn't work , as i said when i tried the install --reinstall comand of network manger , it told me : temporary failure resolving 'eg.archive.ubuntu.com'
E: Failed to fetch -manager/network-manager_1.22.10-1ubuntu2.3_amd64.deb Temporary failure resolving 'eg.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

No because i couldn't, it isn't connecting to any wifi connection i have , but i tried wired network and it worked and i was able to reinstall network manger but wifi still isn't working , it isn't even showing wifi connections to choose from in visible networks so reinstalling network manager unfortunately didn't work

I did everything but i used gedit instead of nano because i couldn't use nano , i hope that's ok.. but unfortunately it didn't work ... now the wifi connections don't show in my visible networks menu so i don't even know if the activation error is still there or not

It worked one time using esc key and i booted using zorin 5.71 or sth , there were 4 options the higher one had a sequence of numbers starting with 5 and ending with 72 then second choice was recovery mode for the same sequence of numbers then the third choice was the same as the first choice except that it ends in 71 , and the fourth option is the third option but recovery mode , i booted using the third choice but the problem isn't solved , i still can't see any wifi network in visible networks menu ... right now i'm trying to boot in recovery mode but everytime i press esc it goes to the startup menu so it's going to take a while and i don't know if it's even worth it or if it's ok to do so..

I have been experiencing frequent disconnection to my wifi networks for a few weeks. After troubleshooting and resolving the issue for n-times, problems such as 'hardware and software issues', can't detect wifi 5.0ghz and unable to even detect wifi adapters still persist.

- results: Finally, I thought I fixed the issue. The connection lasted for a few days before I faced the same issue again. Right now, sometimes it works but sometimes it doesn't. I have to troubleshoot or uninstall the wifi adapter in Device Manager on my laptop to get back the connection after it stopped working.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages