LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Wireless encryption with Slackware 12.2 (WPA, WPA2): Best practice? (http://www.linuxquestions.org/questions/slackware-14/wireless-encryption-with-slackware-12-2-wpa-wpa2-best-practice-692268/)

gargamel 12-22-2008 12:59 PM

Wireless encryption with Slackware 12.2 (WPA, WPA2): Best practice?
 
Hi there,

I just managed to connect my old laptop to my wireless DSL box using WPA encryption. However, it wasn't quite as smooth as I hoped for, and I wonder, if the solution I found is really recommended. The reason I am unsure here is that all the more up-to-date documentation I found describes an even simpler method, that didn't, however, work for me. But maybe I missed something.

So here is what I have.

/etc/rc.d/rc.wireless.conf
Code:

VERBOSE=1

case "$HWADDR" in

*)
  INFO="Any ESSID"
  ESSID="any"
  ;;

[...]

# My wireless setup
fe80xxxxxxxxxxxx)
  INFO="Netgear WG511T"
  ESSID="GargamelNet"
  Key="OlympicWinter2010"
  ;;
esac


/etc/wpa_supplicant.conf
Code:

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1

# WPA protected network
network={
  scan_ssid=0
  ssid="GargamelNet"
  proto=WPA2
  key_mgmt=WPA-PSK
  pairwise=CCMP TKIP
  group=CCMP TKIP WEP104 WEP40
  #psk="OlympicWinter2010"
  psk=65xxxxxxxxxxxxxxxxxxxxxxxx
}

# Plaintext connection (no WPA, etc.)
network={
  key_mgmt=NONE
  priority=0
}


And in /etc/rc.inet1.conf I added the following lines.
Code:

# config information for ath0
ifname[4]="ath0"
ipaddress[4]=""
netmask[4]=""
wlan_essid[4]="yes"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"

So far, this is exactly, what I had for 12.1. Now, to get connected I have to issue the following command as root:

Code:

# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant.conf
I don't remember that this was necessary on 12.1. In fact, my laptop connected automatically to my wireless access point when booting, and as far as I recall I didn't use a script issuing this command, anywhere. But that maybe me, getting old and senile...

Anyhow, although the command answers with messages such as "Operation not supported" an encrypted connection is established.

The connection is not established automatically on boot, other than with the 12.1 system running previously on this computer. Finally, "the book" doesn't mention that /etc/rc.d/rc.inet1.conf needs to be edited, at all:

Slackbook Chapter NETWORK CONFIGURATION WIRELESS

And in fact, this all seems a bit redundant to me. Why do I have to specify the encryption key in one file and the passphrase in another one to make all of this work? And so on...

Please let me know your opinions:

Is the configuration above ok?
What's the recommended way to get connected automatically, instead of having to issue the wpa_supplicant command every time? (E. g., should I append this command to my /etc/rc.d/rc.local file?)
Or are there better options for WPA/WPA2 wireless encryption with Slackware 12.2?

Thanks again,

gargamel

bgeddy 12-22-2008 02:30 PM

It's a while since I've done this so I am probably a bit rusty ! Anyway - I don't think you need /etc/rc.d/rc.wireless - pretty sure WPA can be setup with /etc/rc.d/rc.net1.conf and /etc/wpa_supplicant.conf alone.

Just a few observations ..
Quote:

ipaddress[4]=""
You either need to supply an IP or set USE_DHCP[4]="yes" to get the interface brought up automatically. If you supply an IP you'll need to supply a gateway in /etc/rc.d/rc.inet1.conf and fill in your nameserver(s) in /etc/resolv.conf as these are returned from DHCPCD.
Quote:

wlan_essid[4]="yes"
I think this is for setting the ESSID of you network.

The wireless box I set up in the past isn't here right now so I can't refer back to compare setups.

There may be things I've missed but to be sure consult the defacto setup guide, it's from Alien Bob and may be found here. I highly recommend studying it.

gegechris99 12-22-2008 04:05 PM

Hello Gargamel,

Alien Bob's guide is definitely a must-read guidance. For 12.2, it is highly recommended to put all wireless settings into one file: /etc/rc.d/rc.inet1.conf (you can just forget about rc.wireless.conf)

In addition, I found that to get connected in 12.2 you use:

Code:

# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant.conf
which indicates that you use interface wlan0.

So in /etc/rc.d/rc.inet1.conf, you should put

Code:

ifname[4]="wlan0"

gargamel 12-22-2008 04:42 PM

Thanks a lot for pointing me to Alien Bob's great guide, and shame on me for posting here!

Here I am searching the web with multi-billion dollar search engines, but don't find the most valuable document right in front of me. No excuses for that, I guess.

Following Alien Bob's advice, everything seems to work quite well. Only exception is that the LEDs of my card are not controlled by the system (they were under 12.1), but that's only cosmetic and I can live with it.

Thanks a lot!

gargamel


All times are GMT -5. The time now is 12:47 AM.