0

I managed to install drivers for my Wifi adapter and VM Linux (virtual box) manages to recognize it as wlan0, however if it NEVER shows avaiable networks, which there are. I've gone and reinstalled the drivers. Set up iwd and removed it. Edited the /etc/networkmanager/networkmanager.conf file. And oh so many others things.

What specific steps and configurations can I undertake to address the persistent challenges in getting the Realtek 8811CU Wireless LAN 802.11ac USB NIC to successfully detect and display available wireless connections within a virtual machine running Kali Linux?

Honestly I've encountered severe difficulties, and a detailed troubleshooting guide or recommendations for resolving this issue would be greatly appreciated.

2
  • 2
    Do not crosspost https://unix.stackexchange.com/questions/763342/unstable-wifi-adpter-connection-in-virtualbox-machine Commented Dec 8, 2023 at 10:34
  • 1. Make sure you're using the USB passtrough correctly and 2. you probably need this newer driver: github.com/morrownr/8821cu-20210916 Commented Dec 8, 2023 at 18:28

1 Answer 1

0

Get Wifi On Kali 2023.3

  • Network Card: Alpha AWUS036NH
  • Driver: rt2800usb
  • Chipset: Ralink Technology, Corp. RT2870/RT307
  • Interface: WLAN0

Issue: When I start kali for the first time in VirtualBox, I want to be able to connect to Wi-Fi. However, when I click the internet icon in the top right, Wi-Fi Networks, Disconnected, and Available networks are all grayed out. When I run networking commands to check if linux (kali) can see my network card by running airmon-ng, my adapter is recognized

Question: How do I get my Alpha AWUS036NH to connect to Wi-Fi and get kali to display available Wi-Fi networks

Answer: It's probably an issue with drivers and/or NetworkManager. Whether a beginner, or experienced user of kali linux through vmware or virtual box, you know how much of a pain it is to get it to connect to Wi-Fi. This is what worked for me.

  • Make sure USB device is 3.0 with the network card enabled

    [At this point, your virtual machine is off and you are in VirtualBox settings]

    Click Virtual Machine -> Settings -> USB -> Enable USB Controller -> USB3.0 (xHCI) Controller -> [Your network adapter]

  • Make sure Network is set to NAT and keep default advanced settings (1000 MT adapter type, deny, mac address, cable connected checked ect.)

    [At this point, your virtual machine is off and you are still in VirtualBox settings] [Please note that because you are associating the USB to the virutal machine, it will be disconnected from your local machine]

    [The USB must be disconnected from your local machine (still plugged in, but not appearing in device manager)]

  • Load your virtual machine

    [Reminder: Default Username -> kali | Default Password -> kali]

  • Check internet connections

    [At this point, I have no internet connection (it says wired connection 1, but that does not work which is normal]

  • Run ifconfig

    [At this point, I have not ran sudo apt-get update, or upgraded any packages]

    You should have these results:

    lo
    

    You may have these results:

    eth0
    wlan0
    

    [We are only concerned with WLAN0 at this point]

  • Check to see if the USB adapter is connected

    [If you do not see wlan0 after running ifcongfig, you will need to make sure the network adapter is connected]

    Within virtual machine window select Devices -> USB -> [your network adapter]

    [Wait a few seconds and try ifconfig again, wlan0 should be there now. I will not be going over if it is not in this solution]

  • Check to see if network-manager is installed

    dpkg -s network-manager
    apt list network-manager
    

    (Mine said it was)

  • Check to see if wlan0 is scanning

    sudo iwlist wlan0 scan
    

    (Mine said no networks found or something of the sort)

  • Check if wlan0 is recognized and UP

    ifconfig
    

    [wlan0 should say flags=[a number]<UP,Broadcast,Multicast> [and so forth]

  1. If wlan0 does not say "UP"

    sudo ip link set wlan0 down
    sudo ip link set wlan0 up
    

Recap:

  • Configured usb and network settings in VirtualBox
  • Connected the usb adapter to the virutal machine (if it was not already done)
  • Checked available networks (wired was there, Wi-Fi was grayed out)
  • Checked to see the adapters and ip configurations (wlan0 was there)
  • Have not ran any updates or installations yet

Fix: [At this point, we know the Wi-Fi is not working, but the network adapter and wlan0 is there] [I am also now in sudo su]

  1. Check if wifi adapter is recognized

    lspci | grep -i network
    

    (mine returned nothing, so seems to be recognized)

  2. Install necessary iwlwifi drivers

    apt-get install firmware-iwlwifi
    
  3. Load the necessary driver modules

    modprobe iwlwifi
    
  4. Restart network manager (I did not use sudo or sudo su)

    systemctl restart NetworkManager
    

    Default password (if prompted): kali

  5. Restart kali after completed (not from virtual box. Restart it from the powerbutton within kali at the top right)

    [At this point, you may see available Wi-Fi networks before the restart. You should still restart your virtual machine]

  6. Check the connection at the top right and see if wifi networks show up

    (mine did show up)

  7. Recheck ifconfig wlan0

    [At this point, I have not connected to an available network] (Shows almost the same results)

  8. Recheck iwlist wlan0 scan

    (Shows available surrounding network connections

    You should now see available Wi-Fi networks on kali using the Alpha AWUS036NH adapter!

More steps I did after:

  1. Connect to an available network
  2. Updated kali
  3. Took a snapshot of the current virtual machine state

You must log in to answer this question.

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