LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-22-2008, 11:59 AM   #1
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,605

Rep: Reputation: 142Reputation: 142
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

Last edited by gargamel; 12-22-2008 at 12:06 PM.
 
Old 12-22-2008, 01:30 PM   #2
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
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.
 
Old 12-22-2008, 03:05 PM   #3
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.1 64bit
Posts: 728
Blog Entries: 3

Rep: Reputation: 77
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"
 
Old 12-22-2008, 03:42 PM   #4
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,605

Original Poster
Rep: Reputation: 142Reputation: 142
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
scripts (kommander and command line) to start wireless devices with wpa/wpa2/wpa-aes Fluxx Linux - Wireless Networking 4 06-28-2010 02:51 AM
Configuring Solaris to do Wireless WPA or WPA2? as400 Solaris / OpenSolaris 1 09-17-2008 12:55 PM
CNet Wireless-G USB Dongle 54 Mbps 802.11g, WPA/AES/WPA2 compatible to SuSe 10.1? ungua Linux - Hardware 2 06-14-2007 05:31 AM
wireless nic work w/o encryption, but not wpa coho66 Linux - Wireless Networking 2 02-20-2007 11:00 PM
Wireless-G and WPA encryption ?? lawadm1 Linux - Wireless Networking 1 06-19-2004 05:03 PM


All times are GMT -5. The time now is 04:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration