LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Wireless Networking (http://www.linuxquestions.org/questions/forumdisplay.php?f=41)
-   -   Help with wireless Ad-hoc wpa & wep security (http://www.linuxquestions.org/questions/showthread.php?t=4175450430)

ssenuta 02-16-2013 08:55 AM

Help with wireless Ad-hoc wpa & wep security
 
I have a working peer-to-peer Ad-hoc wireless (wlan0) network setup in Fedora-17 via Network Manager.
However, it only works if Network Manager wireless-security option is set to "NONE".

The past few days I have been trying to get WEP or WPA security working but without success & I've
concluded that both of these security measures only support "Managed" wireless networks that use
(AP) Access Points.

Is my conclusion correct?

Since I don't have a Managed Wireless setup, I can't even verify that that WEP & Wpa will work with
there either.

Beside Network Manager, I tried to setup WEP & WPA on wlan0 manually via /usr/sbin/wpa_supplicant
as follows.

wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
ssid="homenet"
key_mgmt=NONE
wep_key0="abcde"
#wep_key1=0102030405
#wep_key2="1234567890123"
wep_tx_keyidx=0
priority=5
}


Here are the commands I tried:
wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf
wpa_supplicant -iwlan0 -Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf
wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf -d
wpa_supplicant -iwlan0 -Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf -d


Here is the output:
stan@localhost ~]$ wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -d
wpa_supplicant v1.0-rc3
random: Trying to read entropy from /dev/random
Initializing interface 'wlan0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group='wheel'
Priority group 5
id=0 ssid='homenet'
WEXT: cfg80211-based driver detected
wext: interface wlan0 phy: phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
ioctl[SIOCSIWPMKSA]: Operation not permitted
ioctl[SIOCSIWMODE]: Operation not permitted
Could not configure driver to use managed mode
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf flags 0x0
netlink: Operstate: linkmode=1, operstate=5
WEXT: SIOCSIWAUTH(param 7 value 0x1) failed: Operation not permitted)
l2_packet_init: socket(PF_PACKET): Operation not permitted
Failed to add interface wlan0
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Operation not permitted
Driver did not support SIOCSIWENCODEEXT
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Operation not permitted
Driver did not support SIOCSIWENCODEEXT
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Operation not permitted
Driver did not support SIOCSIWENCODEEXT
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Operation not permitted
Driver did not support SIOCSIWENCODEEXT
wlan0: State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
wpa_driver_wext_set_countermeasures
WEXT: SIOCSIWAUTH(param 4 value 0x0) failed: Operation not permitted)
wlan0: No keys have been configured - skip key clearing
wlan0: Cancelling scan request
wlan0: Cancelling authentication timeout
WEXT: SIOCSIWAUTH(param 7 value 0x0) failed: Operation not permitted)
netlink: Operstate: linkmode=0, operstate=6
Could not set interface wlan0 flags: Operation not permitted

unSpawn 02-17-2013 07:29 AM

Moved: This thread is more suitable in the Wireless Networking forum and has been moved accordingly to help your thread/question get the exposure it deserves.
BTW try:
Code:

network={
 ssid="homenet"
 proto=WPA
 key_mgmt=WPA-NONE
 pairwise=NONE
 group=TKIP
 psk="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

and apparently not all cards seem to be able to do WPA in Ad-hoc mode so check your cards chipset details against the Wireless tools HCL.

ssenuta 02-19-2013 08:46 PM

I finally got wireless (wlan0) WEP securuty working on Fedora-17 but WPA security still refuses to work.

Here are the NetworkManager settings I used to get WEP working:
System Settings * Network (icon):
[x] System Connection

security (tab)
WEP
keytype: Hex or Ascii (For 64 or 128 Bit)
key: xxxxxxxxxxxxx
[x] show password

authentication: shared key

Here is the proof WEP security is working:
[stan@localhost ~]$ nmcli dev wifi
SSID BSSID MODE FREQ RATE SIGNAL SECURITY ACTIVE
'homenet' 2E:70:6C:88:92:AB Ad-Hoc 2412 MHz 54 MB/s 100 WEP yes

Here is the message I got while trying to get WPA wireless security working:
[root@localhost stan]# ifup wlan0
Error: Connection activation failed: WPA Ad-Hoc disabled due to kernel bugs

Note: I use Kernel-3.7.1 which I built from source code. It is not a Fedora
distribution Kernel. This could be the problem but I seem to recall seeing
somthing about kernel bugs & WPA on the web.

Any, I plan to upgrade & build a new kernel shortly. I'll give WPA security
another try then. If it works then, I'll post the results.


All times are GMT -5. The time now is 09:58 PM.