Installing TP-Link Archer T2UH (AC600) on VMWare for Kali Linux

Honson Tran
6 min readFeb 23, 2017

--

I’m sure for the majority of everyone reading this article (including myself), we have struggled to get Kali Linux working with the Archer T2UH on Kali. You’ve probably Googled endlessly many blogs, sites, and YouTube videos to try to get your adapter working. Well, (hopefully), your search ends here.

After 6 hours of researching and troubleshooting, I have finally gotten my T2UH working.

Just for clarification, this is the dongle I have ordered on Amazon to hook up to Kali.

Initial Research

Initially, I have followed this YouTube video:

For those who have tried all the solutions mentioned in the comments such as:

make[1]: * /lib/modules/4.6.0-kali1–686-pae/build: No such file or directory. Stop. Makefile:403: recipe for target ‘LINUX’ failed make: * [LINUX] Error 2
ifconfig ra0 up → SIOCSIFFLAGS: Operation not permitted

The Fix

After endlessly going through forum after forum, the quickest and easiest fix is to just download the VM from Kali here (download the VMWare or the VirtualBox depending on what you are using):

After this, simply extract the .zip file that you have downloaded and follow the same instructions in the video. For those who don’t want to watch the video, simply follow these steps.

Extract your files, and launch the .vmx (if you are using VMWare) file to import the VM.

After this, to log into Kali, your username at default should be “root” as the username, and “toor” as the password.

Instructions: Installation (don’t plug in your adapter yet)

Step 1
  1. Download this zip file inside your Kali OS: https://github.com/chenhaiq/mt7610u_wifi_sta_v3002_dpo_20130916.git
  2. Now, open up the GUI’s file explorer and double click on zip file. It should extract it.
  3. Now, open up terminal. Type in these commands. Every time you see blue letters with a blinking input line asking for some input, you can enter in the next step. Do not copy and paste all these commands all at once. Each new line in the following command should be entered in one line at a time until you are done.

cd Downloads/mt7610u_wifi_sta_v3002_dpo_20130916-master
make
make install

Installation: This is where most people following the video get stuck.

Now, this is where those who are trying to get this working on VMWare get stuck. The next command typed is:

ifconfig ra0 up

This command essentially tells the WiFi adapter to enable itself. After the driver installation, this error usually shows up after typing in that terminal command.

SIOCSIFFLAGS: Operation not permitted

This is to enable the WiFi adapter for use in Kali. However, we must first have the adapter plugged in as well as allow the VMWare access to this adapter. For this go to your VMWare program, and on the top left menu bar (with Kali running), go to:

VM>Removable Devices>Ralink WiFi>Connect

You should notice that your adapter is now disconnected in from your PC, and actually directly connected to Kali. You can also observe this in the terminal by typing:

lsusb

Notice Ralink Technology, Corp. after typing in lsusb

Now, we have to change our connection settings. By default, VMWare usually shares the same internet connection as your actual PC’s OS (maybe it’s through Ethernet, or even through WiFi) via NAT.

Our goal right now is to change this to bridged. Go to:

VM>Removable Devices>Network Adapter>Settings…

Now, set it to these settings:

Click okay to confirm settings.

But wait, there’s more: Renaming the Driver

Lastly, we have to change the config file for our network manager, and also rename our driver file.

  1. Open terminal.
  2. Type in these commands:
  3. sudo -i nautilus
  4. The above command enables you to access the root directory of the OS. You should now see “Filesystem root” mounted as one of the devices on the sidebar of the file explorer. Go into it. Now, go to /etc/Wireless
RT2860STA is the wireless adapter driver.

Now, we need to make a copy of this same folder you see above. However, we have to rename this folder from “RT2860STA” to “RT2870STA”. Likewise, rename RT2860STA.dat inside the new folder and rename it to RT2870STA.dat.

and…. more. It’s the last step, promise. (Manage ifupdown)

  1. Open up a brand new terminal, and type in these commands:
  2. cd /etc/NetworkManager/
  3. nano NetworkManager.conf
  4. Now, this is where you go down to “managed=false” and change it to “managed=true”
  5. Press ctrl+o followed by an enter to save, and then ctrl+x to exit out of the text editor.
  6. From here, restart the network manager by typing this command (in the same terminal!):
  7. service network-manager restart

Now, it’s time to test this. Try:

ifconfig ra0 up

once more. If it shows no error and gives you another input line, then congrats! You can check that it’s up by typing in:

ifconfig

You should see something like this:

Notice how ra0 is not broadcasting and up and running. Your WiFi adapter should be up. Click the power button on the top right of the Kali desktop and you should see there is a new button to connect to WiFi.

NOTE: IF YOU DO NOT SEE THE WiFi ICON

If you don’t see it, a quick restart of the network manager will aid in fixing the issue.

  1. Unplug the adapter, replug the adapter.
  2. Open up Terminal
  3. Type in these commands:
  4. cd /etc/NetworkManager/
  5. service network-manager restart
  6. Now, try typing ifconfig ra0 up once more.
  7. If it gives you “SIOCSIFFLAGS: Operation not permitted”, just press the up arrow on your keyboard and press enter (this conveniently just inputs the same command as what you have typed previously). Try this a good 3–5 times to see if it budges.
  8. If all goes well, you should be able to see the WiFi logo. If not, unplug/replug and repeat these steps starting from step 2.

Re-enable the Adapter After VM Suspension/Shut Down

Everytime you restart or shut down the VM instance that is running, you will have to just repeat a variation of the above note.

  1. Try out the note above.
  2. If this doesn’t work, disconnect and reconnect the adapter through VM>Removable Devices>Ralink WiFi>/Disconnect/Connect
  3. Check if Ralink is listed after typing in the terminal command “lsusb”
  4. If it is, reattempt “ifconfig ra0 up”. If you get an error, retry another couple times.
  5. If this doesn’t work, unplug and replug, then restart the network manager (steps 4 and 5 of the note)
  6. Repeat these steps in any variation until you don’t get the SIOCSIFFLAGS error.

Check if it works.

Connect to your network. Check that your internet is working by going to the terminal and typing something to access such as:

ping google.com

If you are seeing responses, you are set!

Conclusion

Although this seems like a lot of work for the initial setup, every time you boot back into Kali, re-enabling the adapter isn’t too bad. You’ll get the hang of what your computer likes and doesn’t like after a while.

Best of luck to everyone, and remember to follow this Medium ;)

YouTube tutorial coming soon ;D….

--

--

Honson Tran

Rutgers University. Sophomore. Electrical Computer Engineering, Computer Science, IT, and Entrepreneur. Visit me at http://honsontran.me