How to Fix the SIOCSIFFLAGS Error in Kali Linux

I recently rebuilt my laptop and reloaded the applications I use for pentesting including Virtualbox and Kali Linux. If you need help setting up Kali Linux in Virtualbox here is a great link that walks through the setup process.

Once I had Kali up and running in my virtual environment I plugged in my ALFA wireless adapter and made sure the USB device was running in the virtual environment.

I ran iwconfig to verify the wireless interface.


So far so good and I ran ifconfig to verify the interface was up, but the only interface returned was the loopback.


After discovering the wireless interface was not up and I ran ifconfig wlan0 up to bring it up and got the SIOCSIFFLAGS error.


I wrote about this error a while back when I was running Backtrack 5 and I first started using the Fern WiFi Cracker. I decided to expand on that post plus I was asked about creating a script to run all the commands at one time instead of typing them individually. The script should be run every time Kali is booted, but after your adapter is plugged in and recognized.

First open a text editor and type in the script shown in the screen shot below. I prefer the gedit text editor and since that is not loaded in Kali I used Leafpad and coming from the Windows world it reminds me of Notepad.


Name the file and save it to the Root directory.


Open the Terminal window and do a quick ls command to verify the file is present.


To run the script type ./<file name>


You’ll probably get an error message about permissions denied and running the chmod 755 <file name> command will adjust the permissions on the file as needed.


Rerun the script ./<file name>


If there are no errors you are good to go and can run ifconfig to verify the wireless interface is up.


I will run the script every time I boot Kali whether or not the interface shows as being up in the ifconfig results.

Trouble shooting wireless issues in Kali Linux can be a frustrating process, but use your Google Fu skills and you’ll find a lot of good links and people offering up advice. Good Luck!

Fern WiFi Cracker Maintenance and Support

Some support issues and other odd things I have researched while using the Fern WiFi Cracker program on Kali Linux and/or Backtrack 5.

Installing Fern

I’m not sure what version of Backtrack started including Fern, but to install the program use the following command.

# apt-get install fern-wifi-cracker

Issue #1: When I started using Fern the program locked up or froze, and updating the program seemed to fix the issue. There are times when the program seems to not respond after clicking on buttons, but after a few seconds it starts working.

After starting Fern look in the lower left corner to see if any updates are available. An internet connection is required to check for and download any updates. Click the update button to download and install the update.


Fern will show the progress.


Restart of the Fern program.


The Fern program will report no more available updates.


Issue #2: After updating Fern the program would not open and running this command fixed the issue. (I only experienced this with Kali and not in any of the Backtrack 5 distros)

#chmod +x /usr/share/fern-wifi-cracker/

I found the above fix in this discussion thread with a Google search.

Wireless Adapter Issues in Kali

If you’re getting the SIOCSIFFLAGS (see screen shot below) error message when bringing up your wireless adapter run the following commands.

#rmmod rtl8187
#rfkill block all
#rfkill unblock all
#modprobe rtl8187
#rfkill unblock all
#ifconfig wlan0 up


I discovered that if I shutdown or restart Kali the error does show up again with the next login. You can read more on this post about the error and creating a batch file to run all the commands at the same time.

General Wireless Troubleshooting Help on the Kali Support Site

If you’re having issues with your wireless adapter check the Kali support documentation or do some Google searches. I found a lot of good information on the internet. Good luck and happy pentesting!