Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to get TP-Link Wifi USB adapter to work in Kali Linux?

Posted on 2015-02-21
29
Medium Priority
?
2,480 Views
Last Modified: 2015-12-30
Hello Experts,

I've spent way too much time trying to find answers to this so I'm posting the question on here.  I am working with Virtualbox Version 4.2.22 r91556 and I am running Kali Linux as one of my virtual machines.  I'm trying to get my TP-Link TL-WN722N wifi USB adapter to work inside of my virtual machine, but I keep getting "no wireless extensions" when I run "iwconfig" in the terminal.  I've messed around with the settings over and over and can't seem to get the thing to work no matter what I try.  Can someone who knows what they are doing please walk me through this and make sure I have all of the settings correct and what not?  I'd greatly appreciate it.
0
Comment
Question by:Brent Johnson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 7
  • 5
  • +2
29 Comments
 
LVL 97

Assisted Solution

by:John Hurst
John Hurst earned 300 total points
ID: 40623776
I thought Virtual Box provided network adapters to the VM. Certainly in VMware Workstation, you do not install network devices inside the guest. The guest should see a Virtual Box network adapter.
0
 
LVL 37

Assisted Solution

by:bbao
bbao earned 600 total points
ID: 40623781
firstly, you need to enable USB support for the VM. check below official manual about how to change the settings.

https://www.virtualbox.org/manual/ch03.html#idp93064144

secondly, is your WiFi adapter a USB 3 device? be aware USB 3 devices are NOT yet supported hence you can't expect the guest OS to see a USB 3 adapter.

however, some people reported that connecting a USB 2 hub to your computer and then connecting your USB 3 device to the hub will convert the USB 3 to 2 though you can't expect USB 3 performance.

FYI - https://www.virtualbox.org/ticket/8873
0
 

Author Comment

by:Brent Johnson
ID: 40623851
It's USB 2.0, not 3.  I will follow your suggestions and report back after I do so.
0
Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

 
LVL 88

Assisted Solution

by:rindi
rindi earned 600 total points
ID: 40623955
You first have to make sure the wireless adapter isn't being used by your host OS. Disable any connections.

Then you must make sure the VBox guest additions are installed in Kali. Many Linux distro's automatically load those additions when they are booted up as they realize they are being run as a VBox VM, but some don't. In that case you can normally install those additions via the package manager (on kali that would be synaptics, and search for VirtualBox).

Then just click on the "Devices" menu option of the VM Window, and your WLan adapter should be available in the USB or Network Devices. Click on it so it gets enabled for the VM. After that it should be available inside kali.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40624642
You must install Virtualbox extensions for USB 2.0 support. Then you can map USB network card to VM as USB device without low end hub trick.
0
 
LVL 37

Expert Comment

by:bbao
ID: 40625467
> You must install Virtualbox extensions for USB 2.0 support.

agree with gheist. but... just wondering if the extension is also available for that particular OS?
0
 
LVL 97

Expert Comment

by:John Hurst
ID: 40625526
@Brent Johnson  - Also, why not just use the host network connection. That should work just fine with less fuss.
0
 
LVL 37

Assisted Solution

by:bbao
bbao earned 600 total points
ID: 40625571
> why not just use the host network connection.

@John Hurst per the official manual here, can you please clarify which one of the following modes is "host network connection"?

* Not attached
* Network Address Translation (NAT)
* NAT Network (new)
* Bridged networking
* Internal networking
* Host-only networking
* Generic networking

thanks.
0
 
LVL 88

Expert Comment

by:rindi
ID: 40625582
The Guest additions for VBox are usually included with most linux distro's as I suggested earlier, and they can be installed via the Distro's package manager if they aren't already loaded by default. Kali is based on Ubuntu, and in Ubuntu you can definitely install them via the package manager.
0
 
LVL 97

Expert Comment

by:John Hurst
ID: 40625585
NAT networking, Bridged Networking and Generic Networking should all get a working NIC device that is connected to the host. I am not sure I said this perfectly, but my VM's have working NIC's supplied by VMware and the guest NIC is attached to the host NIC. I assume Virtual Box works similarly.
0
 
LVL 88

Expert Comment

by:rindi
ID: 40625595
The reason for wanting Kali to use it's own Wifi interface directly is probably for penetration testing or auditing or similar purposes, as Kali was built with specifically that in mind, and then it needs direct access to the wireless adapter.

If on the other hand you just need to connect to the LAN or Internet, then of course it doesn't need to control the wireless adapter and you can use NAT or bridged networking as provided by the host OS.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40625606
It is not about guest additions, it is about USB 2.0 support from host extensions. It needs Administrator/gksu/kdesu access to install kernel drivers for USB2.0 bridge. I assume asker intends to run USB device in monitor mode, which is not possible using bridge network.
0
 

Author Comment

by:Brent Johnson
ID: 40626458
Okay, on my host machine in network connections, I have VirtualBox Host-Only Network, Network Bridge, and Wireless Network Connection 2 (which is the TP-Link Wireless USB Adapter).  I have a few other network connections, but I've disabled those.  To get Kali online with the USB adapter, how should these network connections be configured?  Should VB Host-only network connection be bridged to the network bridge?  Which connections should be bridged to what, if at all? I also already installed the USB 2.0 extension pack for VirtualBox and I installed it successfully.  I don't need to have wireless access on my host machine and my Kali vm at the same time...
0
 
LVL 97

Expert Comment

by:John Hurst
ID: 40626485
Set your guest for NAT or bridged networking. I only use Host only for sand boxing. If the guest does not need Internet, then Host Only could work
0
 
LVL 88

Expert Comment

by:rindi
ID: 40626520
Just follow my instructions I first posted. You don't need to nat, bridge or host-only anything.
0
 

Author Comment

by:Brent Johnson
ID: 40626522
When you say guest, you are referring to my Kali box, correct?  If so, let me clarify... I DO NEED internet on the GUEST VM, but I don't need internet on both, my host and my guest vm at the same time.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40626542
Install host extensions to enable USB 2.0 passthrough. And prove it with lsusb screenshot from the guest.
0
 

Author Comment

by:Brent Johnson
ID: 40626549
gheist, do I do all of that within Kali, or in the settings of Kali in VirtualBox?
0
 
LVL 88

Expert Comment

by:rindi
ID: 40626585
You just need to click on "Devices" in the Windows of Kali, Where you have the other options like "Machine, View and Help". Then expand "USB Devices", and your TP-Link adapter should be shown there. Enable it by clicking on it, so it gets a tick, and after that it is available within kali.
0
 

Author Comment

by:Brent Johnson
ID: 40626606
lsusbhost network connectionskali settings networkkali settings usb
0
 
LVL 62

Expert Comment

by:gheist
ID: 40626619
That adapter is supported with kali linux. (and ubuntu 14.04.2 for that matter)

"modprobe ath9k"

and check end of dmesg whats wrong
0
 

Author Comment

by:Brent Johnson
ID: 40626623
kali devices
0
 

Author Comment

by:Brent Johnson
ID: 40626628
Are all these settings in the screenshots how they should be??
0
 
LVL 88

Expert Comment

by:rindi
ID: 40626661
The last one is how it should be. The one with your Windows network connections, it shouldn't be available, and in USB device Filters shouldn't be necessary either.
0
 

Author Comment

by:Brent Johnson
ID: 40626705
kalikali2
0
 

Author Comment

by:Brent Johnson
ID: 40626706
It's still showing as no wireless extensions and internet is still not working...
0
 

Author Comment

by:Brent Johnson
ID: 40626733
Is there a command I need to enter to bring up wifi networks?
0
 
LVL 88

Accepted Solution

by:
rindi earned 600 total points
ID: 40650797
Sorry for the late reply, I had missed your comments somehow.

You must disable the adapter for your Windows host first, or it won't be available in Kali. It can only be available on one system at a time, either the host, or a VM. If it is being used by the Windows Host, then VBox will just present Kali with a Virtual LAN adapter (in your last screenshot as eth0), and not as a WLAN adapter. That way you get connectivity within the VM, but you won't be able to do any Wireless penetration testing that way.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40650810
virtualbox takes over used USB adapters just fine...
0

Featured Post

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following article is comprised of the pearls we have garnered deploying virtualization solutions since Virtual Server 2005 and subsequent 2008 RTM+ Hyper-V in standalone and clustered environments.
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
In this video tutorial I show you the main steps to install and configure  a VMware ESXi6.0 server. The video has my comments as text on the screen and you can pause anytime when needed. Hope this will be helpful. Verify that your hardware and BIO…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question