![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
| View Poll Results: Has this thread been helpful? | |||
| Yes |
|
498 | 68.50% |
| No |
|
92 | 12.65% |
| Somewhat |
|
137 | 18.84% |
| Voters: 727. You may not vote on this poll | |||
|
|
Thread Tools | Display Modes |
|
|
#1 | ||||||||||||||||||||
|
Himbeer Brombeer Macchiato
![]() Join Date: May 2006
Location: 100acrewood
Beans: 7,262
Kubuntu 9.10 Karmic Koala
|
HOWTO: Wireless Security - WPA1, WPA2, LEAP, etc.
This guide was tested with:
Gutsy Gibbon (7.10) Hardy Heron (8.04) Intrepid Ibex (8.10) Jaunty Jackalope (9.04) -- Since it appears that very few people take wireless security seriously, I'd like to come up with my first HOWTO and explain how I was able to configure a secure home network using WPA2, the latest encryption & authentication standard. There are also other types of configuration (WPA1, mixed mode, LEAP, PEAP, DHCP, etc.) shown in the appendix. Feedback is much appreciated. Common stumbling blocks - Make sure that: 1. Ethernet cable is unplugged. 2. No firewall & configuration tool is running (e.g. Firestarter). 3. MAC filtering is disabled. 4. NetworkManager, Wifi-Radar & similar wireless configuration tools are disabled/turned off and not in use. 5. Some cards/drivers (e.g. Madwifi) do not support WPA2 (AES). Try WPA1 (TKIP) if WPA2 secured connections fail. 6. Set router to BG-Only if using ndiswrapper (and perhaps Broadcom 43xx as I don't know about others). My Requirements: 1. WPA2 / RSN 2. AES / CCMP 3. Hidden ESSID (no broadcast) 4. Static IP (because I use port forwarding & firewall, etc.) 5. Pre-shared key (no EAP) If you want to know more about WPA / RSN & 802.11i security specification, I recommend this site. Now let's get started (wpa-suplicant is usually installed by default): 0. Install "wpa-supplicant": Quote:
Quote:
Quote:
2. Open "/etc/network/interfaces": Quote:
Quote:
Quote:
Now convert your WPA ASCII password using the following command: Quote:
Quote:
Quote:
*****************************Revoking read-permission from 'others'********************************* Quote:
*****************************Sample configuration WPA2 & DHCP, ESSID broadcast enabled*************** Quote:
*****************************Sample configuration WPA1 & DHCP, ESSID broadcast enabled*************** Quote:
****************************Sample configuration mixed mode (WPA1, WPA2) & DHCP, ESSID broadcast***** Quote:
****************************Sample conf. LEAP, WEP, DHCP, ESSID broadcast*************************** Quote:
****************************Sample conf. PEAP, AES, DHCP, ESSID broadcast*************************** Quote:
*****************************Sample conf. TTLS, WEP, DHCP, ESSID broadcast************************** Quote:
*****************************NOT TESTED: Sample conf. EAP-FAST, WPA1/WPA2, DHCP, ESSID broadcast**** Quote:
*****************************Tested adapters****************************************** ********* Quote:
*****************************Post this if you are stumped****************************************** Quote:
*****************************Other useful commands****************************************** *** Quote:
CHANGE LOG: 08/11/2006: Added section "Post this if you are stumped" (SquibT). 08/11/2006: Added sample configuration for WPA2 with DHCP & ESSID broadcast (Wieman01). 08/11/2006: Added sample configuration for WPA1 with DHCP & ESSID broadcast (Wieman01). 08/11/2006: Added section "Tested adapters" (Wieman01). 08/11/2006: Added section "Useful commands" (SquibT). 08/11/2006: Added section "Common stumbling blocks" (Wieman01). 08/11/2006: Changed section "wpa-driver" and added new drivers (Wieman01). 08/11/2006: Added section "Revoking read-permission from group 'others'" (Wieman01). 09/11/2006: Minor changes in layout (Wieman01). 09/11/2006: Added sample configuration for mixed mode (WPA1, WPA2) with DHCP & ESSID broadcast (Wieman01). 09/11/2006: Added experimental sample configuration for LEAP with WEP, DHCP & ESSID broadcast (Wieman01). 09/11/2006: Added section "Install wpa-supplicant" (Wieman01). 10/11/2006: Added experimental sample configuration for TTLS with WEP, DHCP & ESSID broadcast (Wieman01). 15/11/2006: Added experimental sample configuration for EAP-FAST with WPA1/WPA2, DHCP & ESSID broadcast (Wieman01). 04/12/2006: Changed "wpa_passphrase" section & added quotes ("") for encryption keys containing special characters (Wieman01). 04/01/2007: Added various security options (Wieman01). 15/01/2007: Added valid script for EAP-LEAP (Wieman01). 31/01/2007: Added valid script for EAP-PEAP (Wieman01). 21/04/2007: Removed "wpa-conf" for Edgy Eft (Wieman01). 22/04/2007: Simplified section concerning static network settings (Wieman01). 02/05/2007: Added note concerning WPA2 support for Atheros cards & drivers (Wieman01). 13/05/2007: Added note on Ralink drivers (Wieman01). 15/04/2008: Tested with HardyHeron (Wieman01). 04/09/2008: Added note on wireless B/G/N (Wieman01). 06/12/2008: Note for Intrepid Ibex users (Wieman01). 07/03/2009: Closed thread (Wieman01). 05/04/2009: Re-opened and enhanced thread (Wieman01). Last edited by wieman01; May 8th, 2009 at 01:29 PM.. |
||||||||||||||||||||
|
|
|
|
|
#2 | ||||
|
Himbeer Brombeer Macchiato
![]() Join Date: May 2006
Location: 100acrewood
Beans: 7,262
Kubuntu 9.10 Karmic Koala
|
HOWTO: Wireless Security - WPA1, WPA2, LEAP, etc.
Some users reported (including myself) that the network has to be restarted every time after startup... Apparently this is a bug.
Here is a workaround that helps restart the network during boot so that one does not have to do it manually after logging on to the system. Create startup script: Quote:
Quote:
Quote:
Quote:
Restart... Last edited by wieman01; April 7th, 2009 at 02:23 PM.. |
||||
|
|
|
|
|
#3 | |
|
5 Cups of Ubuntu
![]() Join Date: Sep 2006
Beans: 40
|
Re: WPA2 / RSN, NDiswrapper, Static IP, Hidden ESSID, WUSB54G V4
How to adapt this to WPA(1)?
I got everything setup and running ok, except that it is not automated even though I included the wpa_supplicant command in /etc/network/interfaces so everytime I start my computer I need to run wpa_supplicant manually and then dhclient manually as well in order to access to internet. Any idea why automation is not working? my interfaces file as follow: Quote:
|
|
|
|
|
|
|
#4 | |
|
Himbeer Brombeer Macchiato
![]() Join Date: May 2006
Location: 100acrewood
Beans: 7,262
Kubuntu 9.10 Karmic Koala
|
Re: WPA2 / RSN, NDiswrapper, Static IP, Hidden ESSID, WUSB54G V4
For WPA1 my example would look like this:
Quote:
So my advice is to follow post #2 and restart the network during the boot process. Not sure if this is a bug but I have not found a solution ever since. |
|
|
|
|
|
|
#5 |
|
Himbeer Brombeer Macchiato
![]() Join Date: May 2006
Location: 100acrewood
Beans: 7,262
Kubuntu 9.10 Karmic Koala
|
Re: WPA2 / RSN, NDiswrapper, Static IP, Hidden ESSID, WUSB54G V4
By the way... This also works for Atheros chipsets ("ath0") as shown in here:http://www.ubuntuforums.org/showthread.php?t=225290
|
|
|
|
|
|
#6 |
|
5 Cups of Ubuntu
![]() Join Date: Sep 2006
Beans: 40
|
Re: WPA2 / RSN, NDiswrapper, Static IP, Hidden ESSID, WUSB54G V4
I followed all the instructions but it won't connect, when issuing iwconfig i get
essid: off/any |
|
|
|
|
|
#7 | |
|
5 Cups of Ubuntu
![]() Join Date: Sep 2006
Beans: 40
|
Re: WPA2 / RSN, NDiswrapper, Static IP, Hidden ESSID, WUSB54G V4
here's my wpa_supplicant.conf
Quote:
|
|
|
|
|
|
|
#8 | |
|
5 Cups of Ubuntu
![]() Join Date: Sep 2006
Beans: 40
|
Re: WPA2 / RSN, NDiswrapper, Static IP, Hidden ESSID, WUSB54G V4
Commands that i use to invoke wpa_supplicant is
sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -Bw and for dhcp sudo dhclient wlan0 I invoke this commands with Quote:
|
|
|
|
|
|
|
#9 |
|
Just Give Me the Beans!
![]() Join Date: Oct 2006
Location: Nanaimo BC
My beans are hidden!
Ubuntu 6.10 Edgy
|
Re: WPA2 / RSN, NDiswrapper, Static IP, Hidden ESSID, WUSB54G V4
@weiman01,
Hi again weiman01...I reinstalled Edgy just to get a fresh start and tried to use this guide to setup my Interfaces file and not use the wpa_supplicant.conf file. If you recall I did have the wpa_supplicant.conf file working and connecting but I wanted to go your route with the Interfaces file. Good news and bad...My (Linksys wpc54gs)lsbcmnds drivers work fine and report as installed and present, card lights up and flashes connectivity, "iwlist wlan0 scan" reports my AP info correctly (encryption on, correct ESSID ****, etc...) I have a wireless signal meter on the taskbar 100% This is with the Networking GUI though...and a etc/init.d/network restart reports the key is wrong (obviously..no wpa- in front of any items in the Interfaces file yet. After setting up your/my Interfaces file (see below): No internet access, can't get a ping reply from my AP, Iwlist wlan0 scan shows no results . I have the Interfaces file shown below taken from this HowToo (my IPs are different): auto wlan0 iface wlan0 inet static wpa-driver wext (tried ndiswrapper also) wpa-conf managed wpa-ssid <my_essid> wpa-ap-scan 2 wpa-proto RSN wpa-pairwise CCMP wpa-group CCMP wpa-key-mgmt WPA-PSK wpa-psk <my_64_hex_key> address 192.168.168.40 netmask 255.255.255.0 network 192.168.168.0 broadcast 192.168.168.255 gateway 192.168.168.230 dns-nameservers 192.168.168.230 I tried enabeling wireless via the GUI. Are you also using the Networking GUI and enabling your wireless there also? When I do and I enter the basic information it writes in to the bottom of your/my Interfaces file this: My_ip_information.... wireless-essid <my-essid> wireless-key <my-hex-key> auto wlan0 Basically adding these lines again...incorrectly. If I modify the file it does not work... And "/etc/init.d/network restart" cant read the Interfaces file. And if I just use your/my config file exactly as you wrote it, "/etc/init.d/network restart" reads the Interfaces file OK but still no connection...like it is not communicating with WPA_Supplicant...or my router....router is setup correctly though. Iwconfig shows not associated with AP ( of course) Iwlist wlan0 scan shows no results. Your file seems to be the closest I have got to getting this going...no errors when I "/etc/init.d/network restart"...just says Reconfiguring then OK which is great. Using just a basic Interfaces file with no security "iwlist wlan0 scan" reports my AP info correctly (encryption on, correct ESSID ****, etc...) I have a wireless signal meter on the taskbar 100%... I am missing something... Any ideas? I dont want to take a lot of your time but if you can think of anything I am missing let me know. Thanx, squibt |
|
|
|
|
|
#10 |
|
Just Give Me the Beans!
![]() Join Date: Oct 2006
Location: Nanaimo BC
My beans are hidden!
Ubuntu 6.10 Edgy
|
Re: WPA2 / RSN, NDiswrapper, Static IP, Hidden ESSID, WUSB54G V4
Success!
I was using my 64 char hex key from my router (WPA-PSK AES) and not using the directions on page 4 of your instructions. I entered my hex key and it would not work in the Network-Applet Hex box or in the Interfaces file. It seems I have to use an Ascii pass-phrase like BillyBob on my router and then in the Network-Applet enter my info and then run wpa_passphrase <my-essid> <BillyBob (my ascii-key)> to generate a psk hex key....this new key is entered into your Interfaces file like you state on page 4. Let me experiment with this a little and get back to you...gonna try to use my hex key as a ascii key and regenerate it. BTW...nice HowToo...if you follow it.... squibt Last edited by squibT; October 31st, 2006 at 06:30 AM.. |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|