hostapd configuration for WEP network

7.3k views Asked by At

I want to create fake access point in WEP mode using hostapd. I found some configuration samples like this:

interface=wlan0
driver=nl80211
ssid=myAp
hw_mode=g
channel=1
macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
wep_default_key=1
wep_key1="abcde"
wep_key_len_broadcast="5"
wep_key_len_unicast="5"
wep_rekey_period=300

It created the access point in WEP mode properly. But when I attempted to connect to this fake access point, it remains on authentication and can't connect to that. any helps?

2

There are 2 answers

1
Jelle On BEST ANSWER

The wep_key1 property is a HEX string. See here what makes a valid WEP key: https://www.speedguide.net/faq/what-is-a-valid-wep-key-110

wep_key1=abcde will be interpreted as 5 HEX characters instead of 5 ASCII characters, and you need 10 HEX characters. Therefore, a valid key would have double the length: wep_key1=abcdeabcde.

As the other answer said, you should also remove the quotes.

Edit: You should probably also remove your auth_algs line. For me, this setup works:

interface=wlan0
driver=nl80211
ssid=myAp
hw_mode=g
channel=1
ignore_broadcast_ssid=0
wep_default_key=1
wep_key1=abcdeabcde
wep_key_len_broadcast=5
wep_key_len_unicast=5
wep_rekey_period=300
1
Ismael On

Only thing I can think of is removing the quotes from wep_key1.

I found this on the raspbian guide to setup a bridge:

https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md#internet-sharing