SIOCSIFFLAGS:操作不允许

SIOCSIFFLAGS:操作不允许

我正在尝试通过 USB 端口连接我的 TP-Link AC600 无线适配器,以连接到 Kali Linux Rolling,但我遇到了无法显示的问题ifconfig

    root@kali:~# ifconfig
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.1.139  netmask 255.255.255.0  broadcast 192.168.1.255
    inet6 0000::000:0000:0000:0000  prefixlen 64  scopeid 0x20<link>
    ether 00:00:00:00:00:00 txqueuelen 1000  (Ethernet)
    RX packets 125  bytes 20180 (19.7 KiB)
    RX errors 0  dropped 1  overruns 0  frame 0
    TX packets 72  bytes 14284 (13.9 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
    inet 127.0.0.1  netmask 255.0.0.0
    inet6 ::1  prefixlen 128  scopeid 0x10<host>
    loop  txqueuelen 1  (Local Loopback)
    RX packets 20  bytes 1116 (1.0 KiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 20  bytes 1116 (1.0 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    root@kali:~# 

注意:为了发布此信息,我故意将 MAC 地址和 inet6 设置为全 0。

我知道它存在,因为我运行了iwconfig

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

    eth0      no wireless extensions.

    ra0       Ralink STA  

    root@kali:~# 

我尝试将其调出但收到错误:

    root@kali:~# ifconfig ra0 up
    SIOCSIFFLAGS: Operation not permitted
    root@kali:~# 

我已经确认 Kali 知道我的适配器已插入:

    root@kali:~# lsusb
    Bus 001 Device 002: ID 148f:761a Ralink Technology, Corp. 
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    root@kali:~# 

我的旧 wifi 适配器 Edimax N150 从未出现过这个问题。

任何帮助将不胜感激!!

编辑:

这是我的 Linux 版本的输出:

    root@kali:~# cat /proc/version
    Linux version 4.9.0-kali3-amd64 ([email protected]) (gcc version 6.3.0 
    20170321 (Debian 6.3.0-11) ) #1 SMP Debian 4.9.18-1kali1 (2017-04-04)

输出ip link(再次,我审查了我的 MAC 地址)

    root@kali:~# ip link
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode 
    DEFAULT group default qlen 1
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast 
    state UP mode DEFAULT group default qlen 1000
        link/ether 01:01:01:01:01:01 brd ff:ff:ff:ff:ff:ff
    3: ra0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode 
    DEFAULT group default qlen 1000
        link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff

没有输出iw ra0 scan dump

    root@kali:~# iw ra0 scan dump
    root@kali:~# 

了解我正在运行的虚拟机安装了 Guest Additions,并且安装了 VirtualBox 版本 5.1.20 r114628(Qt5.6.2)。

编辑 2:我从github 存储库使用其 README 文件中的说明。

当我运行时,lsmod列表中会出现以下条目:

    mt7650u_sta           913408  0

这是我运行时得到的结果airmon-ng

    root@kali:~# airmon-ng

    PHY Interface   Driver      Chipset

    Warn ON: USB
    null    ra0     ??????      Ralink Technology, Corp. 

这是我运行dmesg --follow并插入适配器后出现的内容:

    [   96.244532] usb 1-1: new high-speed USB device number 2 using ehci-pci
    [   96.626526] usb 1-1: New USB device found, idVendor=148f, idProduct=761a
    [   96.626528] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [   96.626529] usb 1-1: Product: WiFi
    [   96.626530] usb 1-1: Manufacturer: MediaTek
    [   96.626531] usb 1-1: SerialNumber: 1.0
    [   97.370532] rtusb init rt2870 --->
    [   97.370717] 

           === pAd = ffffac2782215000, size = 884464 ===

    [   97.370755] <-- RTMPAllocTxRxRingMemory, Status=0
    [   97.370843] <-- RTMPAllocAdapterBlock, Status=0
    [   97.374196] ==>RT65xx_WLAN_ChipOnOff(): OnOff:1, Reset= 0, pAd-                        >WlanFunCtrl:0x0, Reg-WlanFunCtrl=0xff000002
    [   97.407040] MCUType = 2
    [   97.413761] NVM is EFUSE
    [   97.413763] Endpoint(8) is for In-band Command
    [   97.413764] Endpoint(4) is for WMM0 AC0
    [   97.413764] Endpoint(5) is for WMM0 AC1
    [   97.413765] Endpoint(6) is for WMM0 AC2
    [   97.413765] Endpoint(7) is for WMM0 AC3
    [   97.413766] Endpoint(9) is for WMM1 AC0
    [   97.413766] Endpoint(84) is for Data-In
    [   97.413767] Endpoint(85) is for Command Rsp
    [   97.413962] usbcore: registered new interface driver rt2870

dmesg --follow这是我尝试后出现的内容ifconfig ra0 up。似乎最后由于固件问题而发生错误:

    [  452.409459] -->RTUSBVenderReset
    [  452.412895] <--RTUSBVenderReset
    [  452.417861] fw version:0.1.00 
    [  452.417862] build:7640
    [  452.417862] build time:
    [  452.417862] 2
    [  452.417863] 0
    [  452.417863] 1
    [  452.417863] 3
    [  452.417864] 0
    [  452.417864] 8
    [  452.417864] 2
    [  452.417865] 2
    [  452.417865] 1
    [  452.417865] 6
    [  452.417866] 5
    [  452.417866] 5
    [  452.417866] _
    [  452.417866] _
    [  452.417867] _
    [  452.417867] _

    [  452.417868] ilm length = 68780(bytes)
    [  452.417868] dlm length = 11476(bytes)
    [  452.499268] #
    [  452.584208] #
    [  452.669704] #
    [  452.751712] #
    [  452.835845] #
    [  452.921746] #
    [  453.002859] #
    [  453.086978] #
    [  453.171254] #
    [  453.254671] #
    [  453.259703] RTUSB_VendorRequest failed(-110),TxFlags=0x0,                 ReqType=OUT, Req=0x6, Idx=0x800,pAd->Flags=0x0
    [  453.259703] VendrCmdMultiWrite_nBytes failed!
    [  453.339791] #
    [  453.425475] #
    [  453.511495] #
    [  453.595779] #
    [  453.678897] #
    [  453.762715] #
    [  453.846344] #
    [  453.930761] #
    [  454.015048] #
    [  454.101210] #
    [  454.106299] RTUSB_VendorRequest failed(-110),TxFlags=0x0,         ReqType=OUT, Req=0x6, Idx=0x9a0,pAd->Flags=0x0
    [  454.106299] VendrCmdMultiWrite_nBytes failed!
    [  454.187120] #
    [  454.271227] #
    [  454.356669] #
    [  454.438907] #
    [  454.522086] #
    [  454.606318] #
    [  454.691650] #
    [  454.774580] #
    [  454.861492] #
    [  454.946881] #
    [  454.951937] RTUSB_VendorRequest failed(-110),TxFlags=0x0,         ReqType=OUT, Req=0x6, Idx=0x9a4,pAd->Flags=0x0
    [  454.951937] VendrCmdMultiWrite_nBytes failed!
    [  455.030339] #
    [  455.113684] #
    [  455.198504] #
    [  455.281715] #
    [  455.366429] #
    [  455.457864] #
    [  455.541956] #
    [  455.627037] #
    [  455.712217] #
    [  455.793512] #
    [  455.798542] RTUSB_VendorRequest failed(-110),TxFlags=0x0,         ReqType=OUT, Req=0x6, Idx=0x9c4,pAd->Flags=0x0
    [  455.798542] VendrCmdMultiWrite_nBytes failed!
    [  455.877982] #
    [  455.961774] #
    [  456.045695] #
    [  456.131480] #
    [  456.215752] #
    [  456.297832] #
    [  456.382229] #
    [  456.465221] #
    [  456.549737] #
    [  456.635715] #
            [  456.640787] RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=OUT, Req=0x6, Idx=0xa6c,pAd->Flags=0x0
    [  456.640787] VendrCmdMultiWrite_nBytes failed!
    [  456.719216] #
    [  456.801377] #
    [  456.889631] #
    [  456.976462] #
    [  457.061738] #
    [  457.144773] #
    [  457.228654] #
    [  457.313486] #
    [  457.397397] #
    [  457.481365] #
    [  457.486455] RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=IN,         Req=0x7, Idx=0x238,pAd->Flags=0x0
    [  457.564521] #
    [  457.648699] #
    [  457.732465] #
    [  457.817127] #
    [  457.900727] #
    [  457.984601] #
    [  458.068554] #
    [  458.152929] #
    [  458.236699] #
    [  458.321164] #
    [  458.326274] RTUSB_VendorRequest failed(-110),TxFlags=0x0,         ReqType=OUT, Req=0x6, Idx=0x238,pAd->Flags=0x0
    [  458.326275] VendrCmdMultiWrite_nBytes failed!
    [  458.405021] #
    [  458.489897] #
    [  458.575184] #
    [  458.660094] #
    [  458.747811] #
    [  458.832438] #
    [  458.915785] #
    [  458.999740] #
    [  459.084463] #
    [  459.168569] #
    [  459.173586] RTUSB_VendorRequest failed(-110),TxFlags=0x0,         ReqType=OUT, Req=0x6, Idx=0x238,pAd->Flags=0x0
    [  459.173586] VendrCmdMultiWrite_nBytes failed!
    [  459.173590] loading fw
    [  459.255437] #
    [  459.341691] #
    [  459.426935] #
    [  459.512550] #
    [  459.595554] #
    [  459.682797] #
    [  459.769404] #
    [  459.851295] #
    [  459.939827] #
    [  460.023352] #
    [  460.028362] RTUSB_VendorRequest failed(-110),TxFlags=0x0,         ReqType=OUT, Req=0x42, Idx=0x230,pAd->Flags=0x0
    [  460.028363] set fce dma descriptor fail
    [  460.108241] #
    [  460.195122] #
    [  460.280030] #
    [  460.367394] #
    [  460.455716] #
    [  460.538948] #
    [  460.623427] #
    [  460.711544] #
    [  460.795256] #
    [  460.878787] #
    [  460.883846] RTUSB_VendorRequest failed(-110),TxFlags=0x0,         ReqType=OUT, Req=0x6, Idx=0x800,pAd->Flags=0x0
    [  460.883847] VendrCmdMultiWrite_nBytes failed!
    [  460.883848] ERROR!!! 
    [  460.883848] NICLoadFirmware failed, Status[=0x00000001]
    [  460.883849] !!! rt28xx init fail !!!

答案1

您需要做的就是:

sudo ifconfig ra0 up

在命令前使用 sudo 它就会起作用。

如果你使用的是 eth0 或 wlan0,

sudo ifconfig eth0 up/down
sudo ifconfig wlan0 up/down 

这也能正常工作,并且不会给出“操作不允许”的消息

相关内容