Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't connect over wifi to a WEP-network using ipw2200
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
totycro
n00b
n00b


Joined: 14 May 2007
Posts: 26

PostPosted: Wed Dec 10, 2008 9:04 am    Post subject: Can't connect over wifi to a WEP-network using ipw2200 Reply with quote

Hello,

I want to connect to a wireless network that is WEP-encrypted (the router doesn't support something safer) with my laptop, which has this wifi chip (called eth1):
Code:
Network controller: Intel Corporation PRO/Wireless 2200BG Network Connection (rev 05)
.
Two windows machines are successfully connected to this network.

I did the config basically with the help of thinkwiki and some small wpa_supplicant tutorials, it looks like this:
Code:
/etc/conf.d/net:

modules=( "wpa_supplicant" )
wpa_supplicant_eth1="-Dwext"

Code:
/etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1

network={
        ssid="WG"
        bssid=00:09:5B:A9:8D:70
        scan_ssid=1
        key_mgmt=NONE
        wep_tx_keyidx=0
        wep_key0="mypwishere"
        priority=10
}


Then i ran these commands (exactly those would be executed by the init-script, but without the debug output):
Code:
sudo /usr/sbin/wpa_supplicant -Dwext -c /etc/wpa_supplicant/wpa_supplicant.conf -W  -i eth1 -P /var/run/wpa_supplicant-eth1.pid -dd
sudo /usr/bin/wpa_cli -a /etc/wpa_supplicant/wpa_cli.sh -p /var/run/wpa_supplicant -i eth1 -P /var/run/wpa_cli-eth1.pid


which gives me this wpa_supplicant output:
Code:
Initializing interface 'eth1' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'wext' 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'
update_config=1
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group='0' (DEPRECATED)
ap_scan=1
Line: 13 - start of a new network block
ssid - hexdump_ascii(len=2):
     57 47                                             WG             
BSSID - hexdump(len=6): 00 09 5b a9 8d 70
scan_ssid=1 (0x1)
key_mgmt: 0x4
wep_tx_keyidx=0 (0x0)
wep_key0 - hexdump(len=13): [REMOVED]
priority=10 (0xa)
Priority group 10
   id=0 ssid='WG'
Initializing interface (2) 'eth1'
SIOCGIWRANGE: WE(compiled)=22 WE(source)=18 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf flags 0x0
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:16:6f:14:26:0e
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wpa_driver_wext_set_drop_unencrypted
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Using existing control interface directory.
ctrl_interface_group=0
ctrl_iface bind(PF_UNIX) failed: Address already in use
ctrl_iface exists, but does not allow connections - assuming it was leftover from forced program termination
Successfully replaced leftover ctrl_iface socket '/var/run/wpa_supplicant/eth1'
Added interface eth1
CTRL_IFACE - eth1 - wait for monitor to attach
CTRL_IFACE monitor attached - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 31 35 37 36 2d 30 00
State: DISCONNECTED -> SCANNING
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=2):
     57 47                                             WG             
Trying to get current scan results first without requesting a new scan to speed up initial association
Received 2400 bytes of scan results (11 BSSes)
CTRL-EVENT-SCAN-RESULTS
CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 31 35 37 36 2d 30 00
Selecting BSS from priority group 10
Try to find WPA-enabled AP
0: 00:1c:4a:02:c3:69 ssid='realtime' wpa_ie_len=24 rsn_ie_len=20 caps=0x11
   skip - SSID mismatch
1: 00:1c:df:7e:c8:69 ssid='Audioslave Wi-Fi' wpa_ie_len=28 rsn_ie_len=24 caps=0x11
   skip - SSID mismatch
2: 00:09:5b:a9:8d:70 ssid='WG' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
3: 00:12:17:dd:c9:95 ssid='TheLeckAttack' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
4: 00:14:6c:a1:77:98 ssid='NETGEAR' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
5: 00:40:10:10:00:02 ssid='zuHause' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
6: 00:22:6b:48:68:a3 ssid='myWLan' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
7: 00:22:3f:18:70:5a ssid='George' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
8: 00:0f:b5:7b:71:24 ssid='claudia ' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
9: 00:30:bd:c9:52:1c ssid='BelkinRouter' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
10: 00:1d:0f:d6:c1:f8 ssid='FLOW' wpa_ie_len=0 rsn_ie_len=0 caps=0x1
   skip - no WPA/RSN IE
Try to find non-WPA AP
0: 00:1c:4a:02:c3:69 ssid='realtime' wpa_ie_len=24 rsn_ie_len=20 caps=0x11
   skip - SSID mismatch
1: 00:1c:df:7e:c8:69 ssid='Audioslave Wi-Fi' wpa_ie_len=28 rsn_ie_len=24 caps=0x11
   skip - SSID mismatch
2: 00:09:5b:a9:8d:70 ssid='WG' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   selected non-WPA AP 00:09:5b:a9:8d:70 ssid='WG'
Trying to associate with 00:09:5b:a9:8d:70 (SSID='WG' freq=2422 MHz)
CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 31 35 37 36 2d 30 00
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: clearing own WPA/RSN IE
No keys have been configured - skip key clearing
wpa_driver_wext_set_key: alg=1 key_idx=0 set_tx=1 seq_len=0 key_len=13
wpa_driver_wext_set_drop_unencrypted
State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
wpa_driver_wext_associate
wpa_driver_wext_set_psk
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - portControl=ForceAuthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
Added BSSID 00:09:5b:a9:8d:70 into blacklist
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 31 35 37 36 2d 30 00
State: ASSOCIATING -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b19 len=8
Received 2400 bytes of scan results (11 BSSes)
CTRL-EVENT-SCAN-RESULTS
CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 31 35 37 36 2d 30 00
Selecting BSS from priority group 10
Try to find WPA-enabled AP
0: 00:1c:4a:02:c3:69 ssid='realtime' wpa_ie_len=24 rsn_ie_len=20 caps=0x11
   skip - SSID mismatch
1: 00:1c:df:7e:c8:69 ssid='Audioslave Wi-Fi' wpa_ie_len=28 rsn_ie_len=24 caps=0x11
   skip - SSID mismatch
2: 00:09:5b:a9:8d:70 ssid='WG' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
3: 00:12:17:dd:c9:95 ssid='TheLeckAttack' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
4: 00:14:6c:a1:77:98 ssid='NETGEAR' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
5: 00:40:10:10:00:02 ssid='zuHause' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
6: 00:22:6b:48:68:a3 ssid='myWLan' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
7: 00:22:3f:18:70:5a ssid='George' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
8: 00:0f:b5:7b:71:24 ssid='claudia ' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
9: 00:30:bd:c9:52:1c ssid='BelkinRouter' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
10: 00:1d:0f:d6:c1:f8 ssid='FLOW' wpa_ie_len=0 rsn_ie_len=0 caps=0x1
   skip - no WPA/RSN IE
Try to find non-WPA AP
0: 00:1c:4a:02:c3:69 ssid='realtime' wpa_ie_len=24 rsn_ie_len=20 caps=0x11
   skip - SSID mismatch
1: 00:1c:df:7e:c8:69 ssid='Audioslave Wi-Fi' wpa_ie_len=28 rsn_ie_len=24 caps=0x11
   skip - SSID mismatch
2: 00:09:5b:a9:8d:70 ssid='WG' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   selected non-WPA AP 00:09:5b:a9:8d:70 ssid='WG'
Trying to associate with 00:09:5b:a9:8d:70 (SSID='WG' freq=2422 MHz)
CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 31 35 37 36 2d 30 00
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: clearing own WPA/RSN IE
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=1 key_idx=0 set_tx=1 seq_len=0 key_len=13
wpa_driver_wext_set_drop_unencrypted
State: DISCONNECTED -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
wpa_driver_wext_associate
wpa_driver_wext_set_psk
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - portControl=ForceAuthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b04 len=12
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b1a len=10
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
BSSID 00:09:5b:a9:8d:70 blacklist count incremented to 2
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 31 35 37 36 2d 30 00
State: ASSOCIATING -> DISCONNECTED

This goes on and on until i kill wpa_supplicant, i put a longer log here.
What i thought was strange is this line:
Code:
Added BSSID 00:09:5b:a9:8d:70 into blacklist


Could anyone tell me what might go wrong here?

If you need more info, please just ask me!
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 874

PostPosted: Wed Dec 10, 2008 12:57 pm    Post subject: Reply with quote

wpa_supplicant does not support wep.
you should use sth like
Code:
ifconfig eth1 up (maybe)
iwconfig eth1  essid wg key abcdfeabcdfeab ap 00:09:5B:A9:8D:70
ifconfig eth1 <your config>

read the manpage for iwconfig, esp on how to put in the key; some ifs somehow need to be kicked awake with the ifconfig-statement on top, some don't.
why don't you use the in-kernel driver? i like it much better. also check that you have all the relevant encryption-opts enabled in your kernel.
GOOD LUCK!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
monsm
Guru
Guru


Joined: 26 Sep 2007
Posts: 467
Location: London, UK

PostPosted: Wed Dec 10, 2008 3:05 pm    Post subject: Reply with quote

DawgG wrote:
wpa_supplicant does not support wep.


Now you are telling me! 8O
I was battling with this for several days a few weeks ago, didn't find that crucial sentence anywhere. Lots of examples have wpa_supplicants and wep though. A bit strange. Do you know if they intend to add it, or do they consider wep to be out of date?

Anyway, I am not too worried about security. My street is a quiet one and I don't have a lot of secrets on my machines which in any case have iptable firewalls running. So I intend to continue using wep for now.

So yes, totycro, looks like you'll have to use iwconfig. You'll find lots of examples out there on that. One thing I found was that I needed to add:
Code:
iwconfig eth1 ap auto


For some reason it wouldn't automatically associate with the access point even though I specified the essid too. I also found it easier to get it to work with a script I added to be called by /etc/conf.d/local rather then adding the settings to /etc/conf.d/net. This might be problems for my particular wireless card (not the same one you have).

Mons
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 874

PostPosted: Thu Dec 11, 2008 10:36 am    Post subject: Reply with quote

Quote:
they consider wep to be out of date

WEP IS horribly insecure AND out of date and really shoud not be used anymore.

Quote:
Anyway, I am not too worried about security. My street is a quiet one and I don't have a lot of secrets on my machines which in any case have iptable firewalls running. So I intend to continue using wep for now.

so, what do you think about putting an ethernet-switch connected to your network and dsl-router out on the street and inviting ppl to plug in?
i don't think anybody is interested in YOUR machines but rather in your network connection. someone can use your network to do BAD stuff (spread viruses, send spam, ...) or do some illegal filesharing wizth the address registered in your name.
i know a guy who had this (illegal filesharing over his wlan connected to his dsl-gw) happen to him, and he only noticed when a letter by some kind of riaa-lawyer arrived. it cost him a hell of a lot of time and money, and today he still does not know who did this, just that it was some neighbor (in a small town, too).

so, don't worry too much, but security can only give you advantages.
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
monsm
Guru
Guru


Joined: 26 Sep 2007
Posts: 467
Location: London, UK

PostPosted: Thu Dec 11, 2008 11:21 am    Post subject: Reply with quote

Well, WEP is an acronym for Wired Equivalent Privacy, so putting an ethernet cable to be available outside is probably not a million miles away. I do know it only takes a few seconds to crack it.
However half the houses here already have wifi so there are lots of connections to choose from already. It takes sufficient number of coincidences for me not to worry. Firstly that they come into this street, secondly that they happen to try my connection from all the ones available (some are completely open, not even wep), and then that they use my connection for illegal download or uploads and lastly that the authorities discover it. So all on all, I am not worried.

As far as viruses are concerned; I use Gentoo Linux.... :)

Mons
Back to top
View user's profile Send private message
totycro
n00b
n00b


Joined: 14 May 2007
Posts: 26

PostPosted: Thu Dec 11, 2008 11:49 am    Post subject: Reply with quote

DawgG wrote:
wpa_supplicant does not support wep.

I want to thank you for this information too, i'm trying to get iwconfig-WEP to work, although it seems to not want to work.. Well, i'll post again if i'll fail on my own.
Back to top
View user's profile Send private message
Flarkis
Apprentice
Apprentice


Joined: 06 Aug 2008
Posts: 198
Location: Tallinn, Estonia

PostPosted: Thu Dec 11, 2008 5:39 pm    Post subject: Reply with quote

I would actually like to point out wpa_supplicant DOES work with WEP. In fact that is how i am typing this message.


My Current wpa_supplicant.conf (i added "*" in some places so i dont put my wireless info on the internet)

Code:
# This is a network block that connects to any unsecured access point.
# We give it a low priority so any defined blocks are preferred.

# allow frontend (e.g., wpa_cli) to be used by all users in 'wheel' group
# ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1

network={
        ssid="WLESS"
        bssid=00:**:e3:**:83**
        key_mgmt=NONE
        priority=10
}

network={
        ssid="Wolfgang"
        bssid=00:**:e3:**:cf:**
        key_mgmt=NONE
        wep_key0=***f23***b6f***c2a***d6f**
        priority=5
}

network={
        key_mgmt=NONE
        priority=-9999999
}
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum