Im using latest Kali 5.4.0-kali2-amd64 in a VM (vmware) with a TP-Link TL-WN722N v2 dongle, Im trying to setup an access point routed through my Kali VM so that I can connect an android device to it for testing but hostapd refuses to start up

apt-get install isc-dhcp-server hostapd

As per the Ubuntu Documentation I have set my TP Link into master mode says "What we need for a wireless "base-station" or "access-point" is a wireless network card that does "master mode"" which can be set using iwconfig:


$ sudo iwconfig wlan0 mode master

root@kali:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     unassociated  ESSID:""  Nickname:"<WIFI@REALTEK>"
        Mode:Master  Frequency=2.412 GHz  Access Point: Not-Associated   
        Retry:off   RTS thr:off   Fragment thr:off
        Encryption key:off
        Power Management:off
        Link Quality=0/100  Signal level=0 dBm  Noise level=0 dBm
        Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
        Tx excessive retries:0  Invalid misc:0   Missed beacon:0

using the following hostapd config data:

        wpa_pairwise=TKIP CCMP

$ hostapd -dd /etc/hostapd/hostapd.conf

    root@kali:~# hostapd -dd /etc/hostapd/hostapd.conf
    random: getrandom() support available
    Configuration file: /etc/hostapd/hostapd.conf
    nl80211: Driver does not support authentication/association or connect commands
    nl80211: deinit ifname=wlan0 disabled_11b_rates=0
    nl80211: Remove monitor interface: refcount=0
    netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
    nl80211: Set mode ifindex 3 iftype 2 (STATION)
    nl80211: Failed to set interface 3 to mode 2: -19 (No such device)
    nl80211 driver initialization failed.
    hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
    wlan0: interface state UNINITIALIZED->DISABLED
    hostapd_bss_deinit: deinit bss wlan0
    wlan0: AP-DISABLED 
    hostapd_cleanup(hapd=0x5615cd882000 (wlan0))
    hostapd_free_hapd_data: Interface wlan0 wasn't started
    hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
    hostapd_interface_free: free hapd 0x5615cd882000
    hostapd_cleanup_iface: free iface=0x5615cd8809b0

Other output from ifconfig and lsusb

    root@kali:~# ifconfig
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet  netmask  broadcast
            inet6 fe80::20c:29ff:fee1:f92e  prefixlen 64  scopeid 0x20<link>
            ether 00:0c:29:e1:f9:2e  txqueuelen 1000  (Ethernet)
            RX packets 2759  bytes 4084142 (3.8 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 1407  bytes 98190 (95.8 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet  netmask
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 8  bytes 396 (396.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 8  bytes 396 (396.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            ether 50:3e:aa:7c:79:f4  txqueuelen 1000  (Ethernet)
            RX packets 788  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    root@kali:~# lsusb
    Bus 001 Device 002: ID 2357:010c TP-Link TL-WN722N v2
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
    Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

additional info, ran airmon-ng check kill in case something could be interefering with it but no luck

  • You should try booting kali directly (eg from an USB key), without VM environment and see if the problem still exists. That would avoid looking in the wrong direction – A.B Feb 7 at 1:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.