Operation not permitted linux ifconfig

SIOCSIFFLAGS: Operation not permitted

Note: I intentionally set the MAC address and inet6 to all 0’s for posting this. I know it exists because i ran 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:~# 
 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:~# 

I never used to have this problem with my old wifi adapter Edimax N150. Any help will be greatly appreciated!! Edit: This is the output of my linux version:

 root@kali:~# cat /proc/version Linux version 4.9.0-kali3-amd64 (devel@kali.org) (gcc version 6.3.0 20170321 (Debian 6.3.0-11) ) #1 SMP Debian 4.9.18-1kali1 (2017-04-04) 
 root@kali:~# ip link 1: lo: 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: 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: 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 
 root@kali:~# iw ra0 scan dump root@kali:~# 

It may help to know that I’m running a virtual machine with VirtualBox Version 5.1.20 r114628 (Qt5.6.2) with Guest Additions installed. Edit 2: I installed the driver from this github repository using the directions in its README file. When I run lsmod the following entry appears in the list:

 root@kali:~# airmon-ng PHY Interface Driver Chipset Warn ON: USB null ra0 . Ralink Technology, Corp. 
 [ 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] 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 

Here is what appears in dmesg —follow after I attempt ifconfig ra0 up . It seems that at the end an error occurs due to a firmware problem:

 [ 452.409459] -->RTUSBVenderReset [ 452.412895] 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 . 

Источник

Читайте также:  Поиск папок linux команда

OpenVPN Support Forum

[SOLVED] Linux ifconfig failed: external program exited

[SOLVED] Linux ifconfig failed: external program exited

Post by damog » Fri Apr 26, 2013 7:34 pm

To start, I’ll say that I’m a bit new in this VPN thing, and my problem is probably a stupid question, and easy to solve, but anyway, I’m here to learn, so I’ll go on.

My university offers a VPN service to access de local net, and I’d like to use this service to create what I read is called ‘tunnel’ and thus gain access, via ssh, to the computer in my office, so I can work from home (or really from anywhere).

Thing is, from my university web, they give certain instructions in order to connect via VPN. The instructions may be a bit simple, and there are no solutions for possible problems, buuut.

The first thing they’re saying is that I need to download two files: one config file, and one certificate.

And then, once the VPN is installed in my laptop, I have to enter the following command (I’m using Ubuntu 12.04):

Obviously, where it says ‘config file’ and ‘certificate file’ I substitute the path and the name of the files (although, just to make things easier, I go inside the directory where this files are, and I simply write the files’ names).

Well, once I enter the previous command, I get the following output:

Fri Apr 26 21:10:47 2013 WARNING: Make sure you understand the semantics of —tls-remote before using it (see the man page).
Fri Apr 26 21:10:47 2013 NOTE: OpenVPN 2.1 requires ‘—script-security 2’ or higher to call user-defined scripts or executables
Fri Apr 26 21:10:47 2013 LZO compression initialized
Fri Apr 26 21:10:47 2013 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Fri Apr 26 21:10:47 2013 Socket Buffers: R=[229376->131072] S=[229376->131072]
Fri Apr 26 21:10:47 2013 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Fri Apr 26 21:10:47 2013 Local Options hash (VER=V4): ‘41690919’
Fri Apr 26 21:10:47 2013 Expected Remote Options hash (VER=V4): ‘530fdded’
Fri Apr 26 21:10:47 2013 UDPv4 link local: [undef]
Fri Apr 26 21:10:47 2013 UDPv4 link remote: [AF_INET]130.206.31.230:1194
Fri Apr 26 21:10:47 2013 TLS: Initial packet from [AF_INET]130.206.31.230:1194, sid=a0bbf5f9 e6845359
Fri Apr 26 21:10:48 2013 VERIFY OK: depth=2, /CN=UIB_CA/ST=IB/C=ES/emailAddress=xcti@uib.es/O=Universitat_de_les_Illes_Balears/OU=CTI_Centre_de_Tecnologies_de_la_Informaci_xC3_xB3
Fri Apr 26 21:10:48 2013 VERIFY OK: depth=1, /CN=UIB_Network_CA/ST=IB/C=ES/emailAddress=xcti@uib.es/O=UIB/OU=CTI_Area_de_Xarxes_i_Comunicacions
Fri Apr 26 21:10:48 2013 Validating certificate key usage
Fri Apr 26 21:10:48 2013 ++ Certificate has key usage 00a0, expects 00a0
Fri Apr 26 21:10:48 2013 VERIFY KU OK
Fri Apr 26 21:10:48 2013 Validating certificate extended key usage
Fri Apr 26 21:10:48 2013 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Fri Apr 26 21:10:48 2013 VERIFY EKU OK
Fri Apr 26 21:10:48 2013 VERIFY X509NAME OK: /CN=sonvich.uib.es/O=UIB/C=ES
Fri Apr 26 21:10:48 2013 VERIFY OK: depth=0, /CN=sonvich.uib.es/O=UIB/C=ES
Fri Apr 26 21:10:48 2013 Data Channel Encrypt: Cipher ‘BF-CBC’ initialized with 128 bit key
Fri Apr 26 21:10:48 2013 Data Channel Encrypt: Using 160 bit message hash ‘SHA1’ for HMAC authentication
Fri Apr 26 21:10:48 2013 Data Channel Decrypt: Cipher ‘BF-CBC’ initialized with 128 bit key
Fri Apr 26 21:10:48 2013 Data Channel Decrypt: Using 160 bit message hash ‘SHA1’ for HMAC authentication
Fri Apr 26 21:10:48 2013 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Fri Apr 26 21:10:48 2013 [sonvich.uib.es] Peer Connection Initiated with [AF_INET]130.206.31.230:1194
Fri Apr 26 21:10:50 2013 SENT CONTROL [sonvich.uib.es]: ‘PUSH_REQUEST’ (status=1)
Fri Apr 26 21:10:50 2013 PUSH: Received control message: ‘PUSH_REPLY,route-gateway 10.150.0.13,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 130.206.33.1,ping 10,ping-restart 60,ifconfig 10.150.98.6 255.255.0.0’
Fri Apr 26 21:10:50 2013 OPTIONS IMPORT: timers and/or timeouts modified
Fri Apr 26 21:10:50 2013 OPTIONS IMPORT: —ifconfig/up options modified
Fri Apr 26 21:10:50 2013 OPTIONS IMPORT: route options modified
Fri Apr 26 21:10:50 2013 OPTIONS IMPORT: route-related options modified
Fri Apr 26 21:10:50 2013 OPTIONS IMPORT: —ip-win32 and/or —dhcp-option options modified
Fri Apr 26 21:10:50 2013 ROUTE default_gateway=192.168.1.1
Fri Apr 26 21:10:50 2013 Note: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)
Fri Apr 26 21:10:50 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Fri Apr 26 21:10:50 2013 /sbin/ifconfig 10.150.98.6 netmask 255.255.0.0 mtu 1500 broadcast 10.150.255.255
SIOCSIFADDR: Permission denied
: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: Permission denied
SIOCSIFMTU: Operation not permitted
SIOCSIFBRDADDR: Permission denied
: ERROR while getting interface flags: No such device
Fri Apr 26 21:10:50 2013 Linux ifconfig failed: external program exited with error status: 255
Fri Apr 26 21:10:50 2013 Exiting

Читайте также:  Manjaro linux установка btrfs

And it goes back to the prompt.

And, to say truth, I’m as lost as an octopus in a garage (as we say in Spain), because I don’t have any idea about where the problem could be.

EDIT: Sorry I wrote it in Spanish! I dont know why but my head messed up and made me think this was a Spanish forum. xD

Источник

В чем ошибка при реализации скрипта для смены мак адреса?

Я новичок в этом. Пытаюсь реализовать обычный скрипт для смены мак адреса.
В командной строке я могу его менять с помощью:
sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether adress
sudo ifconfig eth0 up

Когда делаю скрипт то получаю ошибку постоянно. В чем проблема?

SIOCSIFFLAGS: Operation not permitted SIOCSIFHWADDR: Operation not permitted SIOCSIFFLAGS: Operation not permitted
#!/usr/bin/env python import subprocess subprocess.call("ifconfig eth0 down", shell=True) subprocess.call("ifconfig eth0 hw ether 00:11:22:33:44:66", shell=True) subprocess.call("ifconfig eth0 up", shell=True)
eth0: flags=4163 mtu 1500 inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255 inet6 fe80::a00:27ff:fea6:1f86 prefixlen 64 scopeid 0x20 ether 08:00:27:a6:1f:86 txqueuelen 1000 (Ethernet) RX packets 333400 bytes 497332684 (474.2 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 158722 bytes 9660948 (9.2 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 118 bytes 18510 (18.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 118 bytes 18510 (18.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Простой 1 комментарий

Источник

Оцените статью
Adblock
detector