Jump to content

Connect to WPA 2 network?


Recommended Posts

So does anybody know how to connect to a WPA 2 network? So I have figured out that one needs to use a different executable than iwconfig, because iwconfig only works on wep and open networks. I have found some stuff online about the wpa_supplicant command, but the structure of the config file that is used to set it up eludes me.

Link to comment
Share on other sites

I am not sure if better is the word to be used overwraith.

It seems from the wiki at openwrt (previous link) wpad supports AP, Client and WPA Enterprise.

You may want to wait until Sebkinne chimes in.

Edit: oops he did while I was writing this post.

Edited by xrad
Link to comment
Share on other sites

I am not sure if better is the word to be used overwraith.

It seems from the wiki at openwrt (previous link) wpad supports AP, Client and WPA Enterprise.

You may want to wait until Sebkinne chimes in.

Edit: oops he did while I was writing this post.

Using the configuration file found at /etc/config/wireless allows you to set up everything you want. Executing the "wifi" command over SSH afterwards will run your configuration and connect to any networks.

I am curious though, why do you not use the webinterface for this? It does all this for you in a jiffy ;)

Either way, OpenWRT's wifi configuration sets up hostapd/wpa_supplicant/whatever up for you automatically - all it requires is a modified /etc/config/wireless file.

Edit: This works for open, WEP, WPA2 (and possibly radius) networks.

Best Regards,

Sebkinne

Link to comment
Share on other sites

Well, I now have managed to delete one of my devices, wlan1 by messing with the etc/wireless config file, and have a WPA 2 encrypted wlan0. I think I am going to have to re-flash. damn.

Quote: I think overwraith is trying to use the pineapple completely with cli other than the web interface.

Not sure why though. 

Yes, it would be nice to be able to script the pineapple to do everything, so you can just set a dip switch and leave the thing where you want to do your snooping. GUI is so yesteryear.

Edited by overwraith
Link to comment
Share on other sites

Just checked out the gui version of what I am trying to do. Wow, that was easy. I think I will try to learn how to do this on CLI though, just in case I ever need to make a bash script that uses this.

For tonight though, I will first watch game of thrones!

Edited by overwraith
Link to comment
Share on other sites

I am trying to get these configurations working, but I am not sure what mode to put the wifi configuration in. Here are the commands:

uci set wireless.@wifi-device[1].mode=wds
uci set wireless.@wifi-device[1].ssid=some_ssid
uci set wireless.@wifi-device[1].encryption=psk2+tkip+ccmp
uci set wireless.@wifi-device[1].key=some_key
uci commit wireless
wifi

I am not sure whether quotes should be used on some of the entries, it doesn't say I should or shouldn't put any.

Again, trying to connect wlan1 to a wpa2 encrypted network. I used iwlist command to determine that my home router uses psk2 tkip ccmp.

Link to comment
Share on other sites

I am trying to get these configurations working, but I am not sure what mode to put the wifi configuration in. Here are the commands:

uci set wireless.@wifi-device[1].mode=wds
uci set wireless.@wifi-device[1].ssid=some_ssid
uci set wireless.@wifi-device[1].encryption=psk2+tkip+ccmp
uci set wireless.@wifi-device[1].key=some_key
uci commit wireless
wifi

I am not sure whether quotes should be used on some of the entries, it doesn't say I should or shouldn't put any.

Again, trying to connect wlan1 to a wpa2 encrypted network. I used iwlist command to determine that my home router uses psk2 tkip ccmp.

Quotes are not required, but I do suggest single quotes.

In regards to mode, you need to set the mode to 'sta' for clientmode, 'ap' for access point (wlan1 doesn't support AP), and so on.

Best Regards,

Sebkinne

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...