restoring Networkmanager after airmon-ng check kill

2

1

When I put my wireless adapter Realtek RTL8812AU in monitor mode with the commands

airmon-ng check kill; iw dev wlan0 set type monitor

Killing these processes:

  PID Name
 1167 wpa_supplicant

Then when I want to restore it in normal mode it won't show anymore in Network manager, even if I try to switch it off with: ip link set wlan0 down and then up.

The only way to restore the use of the device with Nm is to unplug the device and re-plug it. Is there a better way to restore the functionality of the device? Maybe by restoring the wpa_supplicant process?

Giuliano Malatesta

Posted 2019-04-01T09:07:27.767

Reputation: 21

1Don't confuse "rfkill" (which turns on/off radio transmitters) with "kill" (which terminates running programs). – user1686 – 2019-04-01T09:25:56.833

What's the host OS? – Tim_Stewart – 2019-04-01T20:56:16.623

Fedora 29: 5.0.4-200.fc29.x86_64 – Giuliano Malatesta – 2019-04-02T08:22:43.520

Answers

1

I am not using fedora, I am writing this from (kali-2019.1)

So I don't know if these two operating systems handle the interfaces differently or not. I did notice you are using these commands in a odd way. (fedora specific?)

airmon-ng check kill; iw dev wlan0 set type monitor

    I usually call on airmon-ng like this:

    airmon-ng check 

    Found 3 processes that could cause trouble.
Kill them using 'airmon-ng check kill' before putting
the card in monitor mode, they will interfere by changing channels
and sometimes putting the interface back in managed mode

  PID Name
 2558 NetworkManager
 2573 wpa_supplicant
 2575 dhclient
Then "airmon-ng check kill"
Then use: "airmon-ng start wlan0"
Which creates the virtual interface "wlan0mon"

When you are done tinkering in monitor mode, and would like to use managed mode again.

  1. airmon-ng stop wlan0mon (or whatever the virtual interface name is)
  2. service NetworkManager start
  3. service wpa_supplicant start

And you may need to use "ifconfig wlan0 down/up". I have found it really depends on the card in use.

~Hope this helps you out

Tim_Stewart

Posted 2019-04-01T09:07:27.767

Reputation: 3 983

1the commands are exectutable also in fedora but they are not effective, I get: `# airmon-ng stop wlp0s26u1u4

PHY Interface Driver Chipset

phy1 wlp0s26u1u4 ?????? Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac 2T2R DB WLAN Adapter

You already have a wlp0s26u1u4 device but it is NOT in station mode.` I suppose it is a matter of drivers. With another wifi card I don't have such problems – Giuliano Malatesta – 2019-04-06T08:06:11.883